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]
|
2014-08-19 19:43:13 +02:00
|
|
|
// no errors expected below
|
2014-07-13 01:04:16 +02:00
|
|
|
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;
|