47 lines
1.5 KiB
Text
47 lines
1.5 KiB
Text
=== tests/cases/conformance/classes/members/classTypes/indexersInClassType.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(indexersInClassType.ts, 0, 0))
|
|
|
|
[x: number]: Date;
|
|
>x : Symbol(x, Decl(indexersInClassType.ts, 1, 5))
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
|
|
[x: string]: Object;
|
|
>x : Symbol(x, Decl(indexersInClassType.ts, 2, 5))
|
|
>Object : Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
|
|
|
|
1: Date;
|
|
>Date : Symbol(Date, Decl(lib.d.ts, 633, 23), Decl(lib.d.ts, 815, 11))
|
|
|
|
'a': {}
|
|
|
|
fn() {
|
|
>fn : Symbol(fn, Decl(indexersInClassType.ts, 4, 11))
|
|
|
|
return this;
|
|
>this : Symbol(C, Decl(indexersInClassType.ts, 0, 0))
|
|
}
|
|
}
|
|
|
|
var c = new C();
|
|
>c : Symbol(c, Decl(indexersInClassType.ts, 11, 3))
|
|
>C : Symbol(C, Decl(indexersInClassType.ts, 0, 0))
|
|
|
|
var r = c.fn();
|
|
>r : Symbol(r, Decl(indexersInClassType.ts, 12, 3))
|
|
>c.fn : Symbol(C.fn, Decl(indexersInClassType.ts, 4, 11))
|
|
>c : Symbol(c, Decl(indexersInClassType.ts, 11, 3))
|
|
>fn : Symbol(C.fn, Decl(indexersInClassType.ts, 4, 11))
|
|
|
|
var r2 = r[1];
|
|
>r2 : Symbol(r2, Decl(indexersInClassType.ts, 13, 3))
|
|
>r : Symbol(r, Decl(indexersInClassType.ts, 12, 3))
|
|
>1 : Symbol(C.1, Decl(indexersInClassType.ts, 2, 24))
|
|
|
|
var r3 = r.a
|
|
>r3 : Symbol(r3, Decl(indexersInClassType.ts, 14, 3))
|
|
>r.a : Symbol(C.'a', Decl(indexersInClassType.ts, 3, 12))
|
|
>r : Symbol(r, Decl(indexersInClassType.ts, 12, 3))
|
|
>a : Symbol(C.'a', Decl(indexersInClassType.ts, 3, 12))
|
|
|
|
|