TypeScript/tests/baselines/reference/arrowFunctionInConstructorArgument1.js

17 lines
342 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;
}); // should error