1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
=== tests/cases/conformance/types/members/objectTypeWithConstructSignatureAppearsToBeFunctionType.ts ===
// no errors expected below
interface I {
>I : Symbol(I, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 0, 0))
new(): number;
}
var i: I;
>i : Symbol(i, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 6, 3))
>I : Symbol(I, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 0, 0))
var r2: number = i();
>r2 : Symbol(r2, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 7, 3))
>i : Symbol(i, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 6, 3))
var r2b: number = new i();
>r2b : Symbol(r2b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 8, 3))
>i : Symbol(i, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 6, 3))
var r2c: (x: any, y?: any) => any = i.apply;
>r2c : Symbol(r2c, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 9, 3))
>x : Symbol(x, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 9, 10))
>y : Symbol(y, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 9, 17))
>i.apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
>i : Symbol(i, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 6, 3))
>apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
var b: {
>b : Symbol(b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 11, 3))
new(): number;
}
var r4: number = b();
>r4 : Symbol(r4, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 15, 3))
>b : Symbol(b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 11, 3))
var r4b: number = new b();
>r4b : Symbol(r4b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 16, 3))
>b : Symbol(b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 11, 3))
var r4c: (x: any, y?: any) => any = b.apply;
>r4c : Symbol(r4c, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 17, 3))
>x : Symbol(x, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 17, 10))
>y : Symbol(y, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 17, 17))
>b.apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
>b : Symbol(b, Decl(objectTypeWithConstructSignatureAppearsToBeFunctionType.ts, 11, 3))
>apply : Symbol(Function.apply, Decl(lib.es5.d.ts, --, --))
|