TypeScript/tests/baselines/reference/arrowFunctionInConstructorArgument1.js
2014-07-12 17:30:19 -07:00

17 lines
326 B
JavaScript

//// [arrowFunctionInConstructorArgument1.ts]
class C {
constructor(x: () => void) { }
}
var c = new C(() => { return asdf; } ) // should error
//// [arrowFunctionInConstructorArgument1.js]
var C = (function () {
function C(x) {
}
return C;
})();
var c = new C(function () {
return asdf;
});