mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
384 B
TypeScript
16 lines
384 B
TypeScript
//// [tests/cases/compiler/arrowFunctionInConstructorArgument1.ts] ////
|
|
|
|
//// [arrowFunctionInConstructorArgument1.ts]
|
|
class C {
|
|
constructor(x: () => void) { }
|
|
}
|
|
var c = new C(() => { return asdf; } ) // should error
|
|
|
|
|
|
//// [arrowFunctionInConstructorArgument1.js]
|
|
"use strict";
|
|
class C {
|
|
constructor(x) { }
|
|
}
|
|
var c = new C(() => { return asdf; }); // should error
|