TypeScript/tests/baselines/reference/objectTypesIdentityWithConstructSignatures.types

272 lines
21 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/types/typeRelationships/typeAndMemberIdentity/objectTypesIdentityWithConstructSignatures.ts ===
// object types are identical structurally
class A {
2015-04-13 23:01:57 +02:00
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
constructor(x: string) { }
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 3, 16))
2014-08-15 23:33:16 +02:00
}
class B {
2015-04-13 23:01:57 +02:00
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
constructor(x: string) { }
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 7, 16))
2014-08-15 23:33:16 +02:00
}
class C<T> {
2015-04-13 23:01:57 +02:00
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures.ts, 10, 8))
2014-08-15 23:33:16 +02:00
constructor(x: T) { }
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 11, 16))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures.ts, 10, 8))
2014-08-15 23:33:16 +02:00
}
interface I {
2015-04-13 23:01:57 +02:00
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
new(x: string);
2015-04-13 23:01:57 +02:00
>x : string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 15, 8))
2014-08-15 23:33:16 +02:00
}
interface I2<T> {
2015-04-13 23:01:57 +02:00
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures.ts, 16, 1))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures.ts, 18, 13))
2014-08-15 23:33:16 +02:00
new(x: T): T;
2015-04-13 23:01:57 +02:00
>x : T, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 19, 8))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures.ts, 18, 13))
>T : T, Symbol(T, Decl(objectTypesIdentityWithConstructSignatures.ts, 18, 13))
2014-08-15 23:33:16 +02:00
}
var a: { new(x: string) }
2015-04-13 23:01:57 +02:00
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
>x : string, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 13))
2014-08-15 23:33:16 +02:00
function foo1(x: A);
2015-04-13 23:01:57 +02:00
>foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 24, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 25, 20))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 24, 14))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo1(x: A); // error
2015-04-13 23:01:57 +02:00
>foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 24, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 25, 20))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 25, 14))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo1(x: any) { }
2015-04-13 23:01:57 +02:00
>foo1 : { (x: A): any; (x: A): any; }, Symbol(foo1, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 24, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 25, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 26, 14))
2014-08-15 23:33:16 +02:00
function foo1b(x: B);
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures.ts, 26, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 28, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 29, 21))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 28, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo1b(x: B); // error
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures.ts, 26, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 28, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 29, 21))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 29, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo1b(x: any) { }
2015-04-13 23:01:57 +02:00
>foo1b : { (x: B): any; (x: B): any; }, Symbol(foo1b, Decl(objectTypesIdentityWithConstructSignatures.ts, 26, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 28, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 29, 21))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 30, 15))
2014-08-15 23:33:16 +02:00
function foo1c(x: C<string>);
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures.ts, 30, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 32, 29), Decl(objectTypesIdentityWithConstructSignatures.ts, 33, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 32, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo1c(x: C<string>); // error
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures.ts, 30, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 32, 29), Decl(objectTypesIdentityWithConstructSignatures.ts, 33, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 33, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo1c(x: any) { }
2015-04-13 23:01:57 +02:00
>foo1c : { (x: C<string>): any; (x: C<string>): any; }, Symbol(foo1c, Decl(objectTypesIdentityWithConstructSignatures.ts, 30, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 32, 29), Decl(objectTypesIdentityWithConstructSignatures.ts, 33, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 34, 15))
2014-08-15 23:33:16 +02:00
function foo2(x: I);
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures.ts, 34, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 36, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 37, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 36, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo2(x: I); // error
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures.ts, 34, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 36, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 37, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 37, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo2(x: any) { }
2015-04-13 23:01:57 +02:00
>foo2 : { (x: I): any; (x: I): any; }, Symbol(foo2, Decl(objectTypesIdentityWithConstructSignatures.ts, 34, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 36, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 37, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 38, 14))
2014-08-15 23:33:16 +02:00
function foo3(x: typeof a);
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures.ts, 38, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 40, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 41, 27))
>x : new (x: string) => any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 40, 14))
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
2014-08-15 23:33:16 +02:00
function foo3(x: typeof a); // error
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures.ts, 38, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 40, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 41, 27))
>x : new (x: string) => any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 41, 14))
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
2014-08-15 23:33:16 +02:00
function foo3(x: any) { }
2015-04-13 23:01:57 +02:00
>foo3 : { (x: new (x: string) => any): any; (x: new (x: string) => any): any; }, Symbol(foo3, Decl(objectTypesIdentityWithConstructSignatures.ts, 38, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 40, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 41, 27))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 42, 14))
2014-08-15 23:33:16 +02:00
function foo5(x: A);
2015-04-13 23:01:57 +02:00
>foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithConstructSignatures.ts, 42, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 44, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 45, 20))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 44, 14))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo5(x: B); // error
2015-04-13 23:01:57 +02:00
>foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithConstructSignatures.ts, 42, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 44, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 45, 20))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 45, 14))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo5(x: any) { }
2015-04-13 23:01:57 +02:00
>foo5 : { (x: A): any; (x: B): any; }, Symbol(foo5, Decl(objectTypesIdentityWithConstructSignatures.ts, 42, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 44, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 45, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 46, 14))
2014-08-15 23:33:16 +02:00
function foo5b(x: A);
2015-04-13 23:01:57 +02:00
>foo5b : { (x: A): any; (x: C<string>): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithConstructSignatures.ts, 46, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 48, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 49, 29))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 48, 15))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo5b(x: C<string>); // error
2015-04-13 23:01:57 +02:00
>foo5b : { (x: A): any; (x: C<string>): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithConstructSignatures.ts, 46, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 48, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 49, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 49, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo5b(x: any) { }
2015-04-13 23:01:57 +02:00
>foo5b : { (x: A): any; (x: C<string>): any; }, Symbol(foo5b, Decl(objectTypesIdentityWithConstructSignatures.ts, 46, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 48, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 49, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 50, 15))
2014-08-15 23:33:16 +02:00
function foo6(x: A);
2015-04-13 23:01:57 +02:00
>foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithConstructSignatures.ts, 50, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 52, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 53, 20))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 52, 14))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo6(x: I); // ok
2015-04-13 23:01:57 +02:00
>foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithConstructSignatures.ts, 50, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 52, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 53, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 53, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo6(x: any) { }
2015-04-13 23:01:57 +02:00
>foo6 : { (x: A): any; (x: I): any; }, Symbol(foo6, Decl(objectTypesIdentityWithConstructSignatures.ts, 50, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 52, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 53, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 54, 14))
2014-08-15 23:33:16 +02:00
function foo7(x: A);
2015-04-13 23:01:57 +02:00
>foo7 : { (x: A): any; (x: new (x: string) => any): any; }, Symbol(foo7, Decl(objectTypesIdentityWithConstructSignatures.ts, 54, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 56, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 57, 27))
>x : A, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 56, 14))
>A : A, Symbol(A, Decl(objectTypesIdentityWithConstructSignatures.ts, 0, 0))
2014-08-15 23:33:16 +02:00
function foo7(x: typeof a); // ok
2015-04-13 23:01:57 +02:00
>foo7 : { (x: A): any; (x: new (x: string) => any): any; }, Symbol(foo7, Decl(objectTypesIdentityWithConstructSignatures.ts, 54, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 56, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 57, 27))
>x : new (x: string) => any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 57, 14))
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
2014-08-15 23:33:16 +02:00
function foo7(x: any) { }
2015-04-13 23:01:57 +02:00
>foo7 : { (x: A): any; (x: new (x: string) => any): any; }, Symbol(foo7, Decl(objectTypesIdentityWithConstructSignatures.ts, 54, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 56, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 57, 27))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 58, 14))
2014-08-15 23:33:16 +02:00
function foo8(x: B);
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures.ts, 58, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 60, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 61, 20))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 60, 14))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo8(x: I); // ok
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures.ts, 58, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 60, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 61, 20))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 61, 14))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo8(x: any) { }
2015-04-13 23:01:57 +02:00
>foo8 : { (x: B): any; (x: I): any; }, Symbol(foo8, Decl(objectTypesIdentityWithConstructSignatures.ts, 58, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 60, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 61, 20))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 62, 14))
2014-08-15 23:33:16 +02:00
function foo9(x: B);
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures.ts, 62, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 64, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 65, 28))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 64, 14))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo9(x: C<string>); // error
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures.ts, 62, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 64, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 65, 28))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 65, 14))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo9(x: any) { }
2015-04-13 23:01:57 +02:00
>foo9 : { (x: B): any; (x: C<string>): any; }, Symbol(foo9, Decl(objectTypesIdentityWithConstructSignatures.ts, 62, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 64, 20), Decl(objectTypesIdentityWithConstructSignatures.ts, 65, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 66, 14))
2014-08-15 23:33:16 +02:00
function foo10(x: B);
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: string) => any): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures.ts, 66, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 68, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 69, 28))
>x : B, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 68, 15))
>B : B, Symbol(B, Decl(objectTypesIdentityWithConstructSignatures.ts, 4, 1))
2014-08-15 23:33:16 +02:00
function foo10(x: typeof a); // ok
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: string) => any): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures.ts, 66, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 68, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 69, 28))
>x : new (x: string) => any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 69, 15))
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
2014-08-15 23:33:16 +02:00
function foo10(x: any) { }
2015-04-13 23:01:57 +02:00
>foo10 : { (x: B): any; (x: new (x: string) => any): any; }, Symbol(foo10, Decl(objectTypesIdentityWithConstructSignatures.ts, 66, 25), Decl(objectTypesIdentityWithConstructSignatures.ts, 68, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 69, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 70, 15))
2014-08-15 23:33:16 +02:00
function foo12(x: I);
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures.ts, 70, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 72, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 73, 29))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 72, 15))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo12(x: C<string>); // ok
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures.ts, 70, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 72, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 73, 29))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 73, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo12(x: any) { }
2015-04-13 23:01:57 +02:00
>foo12 : { (x: I): any; (x: C<string>): any; }, Symbol(foo12, Decl(objectTypesIdentityWithConstructSignatures.ts, 70, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 72, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 73, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 74, 15))
2014-08-15 23:33:16 +02:00
function foo12b(x: I2<string>);
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures.ts, 74, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 76, 31), Decl(objectTypesIdentityWithConstructSignatures.ts, 77, 30))
>x : I2<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 76, 16))
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures.ts, 16, 1))
2014-08-15 23:33:16 +02:00
function foo12b(x: C<string>); // ok
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures.ts, 74, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 76, 31), Decl(objectTypesIdentityWithConstructSignatures.ts, 77, 30))
>x : C<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 77, 16))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo12b(x: any) { }
2015-04-13 23:01:57 +02:00
>foo12b : { (x: I2<string>): any; (x: C<string>): any; }, Symbol(foo12b, Decl(objectTypesIdentityWithConstructSignatures.ts, 74, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 76, 31), Decl(objectTypesIdentityWithConstructSignatures.ts, 77, 30))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 78, 16))
2014-08-15 23:33:16 +02:00
function foo13(x: I);
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: string) => any): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures.ts, 78, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 80, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 81, 28))
>x : I, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 80, 15))
>I : I, Symbol(I, Decl(objectTypesIdentityWithConstructSignatures.ts, 12, 1))
2014-08-15 23:33:16 +02:00
function foo13(x: typeof a); // error
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: string) => any): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures.ts, 78, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 80, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 81, 28))
>x : new (x: string) => any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 81, 15))
>a : new (x: string) => any, Symbol(a, Decl(objectTypesIdentityWithConstructSignatures.ts, 22, 3))
2014-08-15 23:33:16 +02:00
function foo13(x: any) { }
2015-04-13 23:01:57 +02:00
>foo13 : { (x: I): any; (x: new (x: string) => any): any; }, Symbol(foo13, Decl(objectTypesIdentityWithConstructSignatures.ts, 78, 27), Decl(objectTypesIdentityWithConstructSignatures.ts, 80, 21), Decl(objectTypesIdentityWithConstructSignatures.ts, 81, 28))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 82, 15))
2014-08-15 23:33:16 +02:00
function foo15(x: I2<string>);
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures.ts, 82, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 84, 30), Decl(objectTypesIdentityWithConstructSignatures.ts, 85, 29))
>x : I2<string>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 84, 15))
>I2 : I2<T>, Symbol(I2, Decl(objectTypesIdentityWithConstructSignatures.ts, 16, 1))
2014-08-15 23:33:16 +02:00
function foo15(x: C<number>); // ok
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures.ts, 82, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 84, 30), Decl(objectTypesIdentityWithConstructSignatures.ts, 85, 29))
>x : C<number>, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 85, 15))
>C : C<T>, Symbol(C, Decl(objectTypesIdentityWithConstructSignatures.ts, 8, 1))
2014-08-15 23:33:16 +02:00
function foo15(x: any) { }
2015-04-13 23:01:57 +02:00
>foo15 : { (x: I2<string>): any; (x: C<number>): any; }, Symbol(foo15, Decl(objectTypesIdentityWithConstructSignatures.ts, 82, 26), Decl(objectTypesIdentityWithConstructSignatures.ts, 84, 30), Decl(objectTypesIdentityWithConstructSignatures.ts, 85, 29))
>x : any, Symbol(x, Decl(objectTypesIdentityWithConstructSignatures.ts, 86, 15))
2014-08-15 23:33:16 +02:00