TypeScript/tests/baselines/reference/typeofClass2.types
2015-04-13 14:29:37 -07:00

56 lines
2 KiB
Plaintext

=== tests/cases/conformance/types/specifyingTypes/typeQueries/typeofClass2.ts ===
class C {
>C : C, Symbol(C, Decl(typeofClass2.ts, 0, 0))
constructor(x: number);
>x : number, Symbol(x, Decl(typeofClass2.ts, 1, 16))
constructor(x: string);
>x : string, Symbol(x, Decl(typeofClass2.ts, 2, 16))
constructor(x) { }
>x : any, Symbol(x, Decl(typeofClass2.ts, 3, 16))
static foo(x: number);
>foo : { (x: number): any; (x: C): any; }, Symbol(C.foo, Decl(typeofClass2.ts, 3, 22), Decl(typeofClass2.ts, 5, 26), Decl(typeofClass2.ts, 6, 21))
>x : number, Symbol(x, Decl(typeofClass2.ts, 5, 15))
static foo(x: C);
>foo : { (x: number): any; (x: C): any; }, Symbol(C.foo, Decl(typeofClass2.ts, 3, 22), Decl(typeofClass2.ts, 5, 26), Decl(typeofClass2.ts, 6, 21))
>x : C, Symbol(x, Decl(typeofClass2.ts, 6, 15))
>C : C, Symbol(C, Decl(typeofClass2.ts, 0, 0))
static foo(x) { }
>foo : { (x: number): any; (x: C): any; }, Symbol(C.foo, Decl(typeofClass2.ts, 3, 22), Decl(typeofClass2.ts, 5, 26), Decl(typeofClass2.ts, 6, 21))
>x : any, Symbol(x, Decl(typeofClass2.ts, 7, 15))
static bar(x) { }
>bar : (x: any) => void, Symbol(C.bar, Decl(typeofClass2.ts, 7, 21))
>x : any, Symbol(x, Decl(typeofClass2.ts, 9, 15))
}
class D extends C {
>D : D, Symbol(D, Decl(typeofClass2.ts, 10, 1))
>C : C, Symbol(C, Decl(typeofClass2.ts, 0, 0))
static baz(x: number) { }
>baz : (x: number) => void, Symbol(D.baz, Decl(typeofClass2.ts, 12, 19))
>x : number, Symbol(x, Decl(typeofClass2.ts, 13, 15))
foo() { }
>foo : () => void, Symbol(foo, Decl(typeofClass2.ts, 13, 29))
}
var d: D;
>d : D, Symbol(d, Decl(typeofClass2.ts, 17, 3))
>D : D, Symbol(D, Decl(typeofClass2.ts, 10, 1))
var r1: typeof D;
>r1 : typeof D, Symbol(r1, Decl(typeofClass2.ts, 19, 3))
>D : typeof D, Symbol(D, Decl(typeofClass2.ts, 10, 1))
var r2: typeof d;
>r2 : D, Symbol(r2, Decl(typeofClass2.ts, 20, 3))
>d : D, Symbol(d, Decl(typeofClass2.ts, 17, 3))