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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
=== tests/cases/conformance/types/thisType/thisTypeInObjectLiterals.ts ===
let o = {
>o : Symbol(o, Decl(thisTypeInObjectLiterals.ts, 0, 3))
d: "bar",
>d : Symbol(d, Decl(thisTypeInObjectLiterals.ts, 0, 9))
m() {
>m : Symbol(m, Decl(thisTypeInObjectLiterals.ts, 1, 13))
return this.d.length;
},
f: function() {
>f : Symbol(f, Decl(thisTypeInObjectLiterals.ts, 4, 6))
return this.d.length;
}
}
let mutuallyRecursive = {
>mutuallyRecursive : Symbol(mutuallyRecursive, Decl(thisTypeInObjectLiterals.ts, 10, 3))
a: 100,
>a : Symbol(a, Decl(thisTypeInObjectLiterals.ts, 10, 25))
start() {
>start : Symbol(start, Decl(thisTypeInObjectLiterals.ts, 11, 11))
return this.passthrough(this.a);
},
passthrough(n: number) {
>passthrough : Symbol(passthrough, Decl(thisTypeInObjectLiterals.ts, 14, 6))
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 15, 16))
return this.sub1(n);
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 15, 16))
},
sub1(n: number): number {
>sub1 : Symbol(sub1, Decl(thisTypeInObjectLiterals.ts, 17, 6))
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 18, 9))
if (n > 0) {
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 18, 9))
return this.passthrough(n - 1);
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 18, 9))
}
return n;
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 18, 9))
}
}
var i: number = mutuallyRecursive.start();
>i : Symbol(i, Decl(thisTypeInObjectLiterals.ts, 25, 3))
>mutuallyRecursive.start : Symbol(start, Decl(thisTypeInObjectLiterals.ts, 11, 11))
>mutuallyRecursive : Symbol(mutuallyRecursive, Decl(thisTypeInObjectLiterals.ts, 10, 3))
>start : Symbol(start, Decl(thisTypeInObjectLiterals.ts, 11, 11))
interface I {
>I : Symbol(I, Decl(thisTypeInObjectLiterals.ts, 25, 42))
a: number;
>a : Symbol(I.a, Decl(thisTypeInObjectLiterals.ts, 26, 13))
start(): number;
>start : Symbol(I.start, Decl(thisTypeInObjectLiterals.ts, 27, 14))
passthrough(n: number): number;
>passthrough : Symbol(I.passthrough, Decl(thisTypeInObjectLiterals.ts, 28, 20))
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 29, 16))
sub1(n: number): number;
>sub1 : Symbol(I.sub1, Decl(thisTypeInObjectLiterals.ts, 29, 35))
>n : Symbol(n, Decl(thisTypeInObjectLiterals.ts, 30, 9))
}
var impl: I = mutuallyRecursive;
>impl : Symbol(impl, Decl(thisTypeInObjectLiterals.ts, 32, 3))
>I : Symbol(I, Decl(thisTypeInObjectLiterals.ts, 25, 42))
>mutuallyRecursive : Symbol(mutuallyRecursive, Decl(thisTypeInObjectLiterals.ts, 10, 3))
|