17 lines
342 B
JavaScript
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
|