TypeScript/tests/baselines/reference/objectTypeWithConstructSignatureAppearsToBeFunctionType.js

30 lines
559 B
JavaScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [objectTypeWithConstructSignatureAppearsToBeFunctionType.ts]
// no errors expected below
interface I {
new(): number;
}
var i: I;
var r2: number = i();
var r2b: number = new i();
var r2c: (x: any, y?: any) => any = i.apply;
var b: {
new(): number;
}
var r4: number = b();
var r4b: number = new b();
var r4c: (x: any, y?: any) => any = b.apply;
//// [objectTypeWithConstructSignatureAppearsToBeFunctionType.js]
var i;
var r2 = i();
var r2b = new i();
var r2c = i.apply;
var b;
var r4 = b();
var r4b = new b();
var r4c = b.apply;