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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
=== tests/cases/conformance/types/thisType/thisTypeErrors.ts ===
var x1: this;
>x1 : Symbol(x1, Decl(thisTypeErrors.ts, 0, 3))
var x2: { a: this };
>x2 : Symbol(x2, Decl(thisTypeErrors.ts, 1, 3))
>a : Symbol(a, Decl(thisTypeErrors.ts, 1, 9))
var x3: this[];
>x3 : Symbol(x3, Decl(thisTypeErrors.ts, 2, 3))
function f1(x: this): this {
>f1 : Symbol(f1, Decl(thisTypeErrors.ts, 2, 15))
>x : Symbol(x, Decl(thisTypeErrors.ts, 4, 12))
var y: this;
>y : Symbol(y, Decl(thisTypeErrors.ts, 5, 7))
return this;
}
interface I1 {
>I1 : Symbol(I1, Decl(thisTypeErrors.ts, 7, 1))
a: { x: this };
>a : Symbol(I1.a, Decl(thisTypeErrors.ts, 9, 14))
>x : Symbol(x, Decl(thisTypeErrors.ts, 10, 8))
b: { (): this };
>b : Symbol(I1.b, Decl(thisTypeErrors.ts, 10, 19))
c: { new (): this };
>c : Symbol(I1.c, Decl(thisTypeErrors.ts, 11, 20))
d: { [x: string]: this };
>d : Symbol(I1.d, Decl(thisTypeErrors.ts, 12, 24))
>x : Symbol(x, Decl(thisTypeErrors.ts, 13, 10))
e: { f(x: this): this };
>e : Symbol(I1.e, Decl(thisTypeErrors.ts, 13, 29))
>f : Symbol(f, Decl(thisTypeErrors.ts, 14, 8))
>x : Symbol(x, Decl(thisTypeErrors.ts, 14, 11))
}
class C1 {
>C1 : Symbol(C1, Decl(thisTypeErrors.ts, 15, 1))
a: { x: this };
>a : Symbol(C1.a, Decl(thisTypeErrors.ts, 17, 10))
>x : Symbol(x, Decl(thisTypeErrors.ts, 18, 8))
b: { (): this };
>b : Symbol(C1.b, Decl(thisTypeErrors.ts, 18, 19))
c: { new (): this };
>c : Symbol(C1.c, Decl(thisTypeErrors.ts, 19, 20))
d: { [x: string]: this };
>d : Symbol(C1.d, Decl(thisTypeErrors.ts, 20, 24))
>x : Symbol(x, Decl(thisTypeErrors.ts, 21, 10))
e: { f(x: this): this };
>e : Symbol(C1.e, Decl(thisTypeErrors.ts, 21, 29))
>f : Symbol(f, Decl(thisTypeErrors.ts, 22, 8))
>x : Symbol(x, Decl(thisTypeErrors.ts, 22, 11))
}
class C2 {
>C2 : Symbol(C2, Decl(thisTypeErrors.ts, 23, 1))
static x: this;
>x : Symbol(C2.x, Decl(thisTypeErrors.ts, 25, 10))
static y = <this>undefined;
>y : Symbol(C2.y, Decl(thisTypeErrors.ts, 26, 19))
>undefined : Symbol(undefined)
static foo(x: this): this {
>foo : Symbol(C2.foo, Decl(thisTypeErrors.ts, 27, 31))
>x : Symbol(x, Decl(thisTypeErrors.ts, 28, 15))
return undefined;
>undefined : Symbol(undefined)
}
}
namespace N1 {
>N1 : Symbol(N1, Decl(thisTypeErrors.ts, 31, 1))
export var x: this;
>x : Symbol(x, Decl(thisTypeErrors.ts, 34, 14))
export var y = this;
>y : Symbol(y, Decl(thisTypeErrors.ts, 35, 14))
}
class C3 {
>C3 : Symbol(C3, Decl(thisTypeErrors.ts, 36, 1))
x1 = {
>x1 : Symbol(C3.x1, Decl(thisTypeErrors.ts, 38, 10))
g(x: this): this {
>g : Symbol(g, Decl(thisTypeErrors.ts, 39, 10))
>x : Symbol(x, Decl(thisTypeErrors.ts, 40, 10))
return undefined;
>undefined : Symbol(undefined)
}
}
f() {
>f : Symbol(C3.f, Decl(thisTypeErrors.ts, 43, 5))
function g(x: this): this {
>g : Symbol(g, Decl(thisTypeErrors.ts, 44, 9))
>x : Symbol(x, Decl(thisTypeErrors.ts, 45, 19))
return undefined;
>undefined : Symbol(undefined)
}
let x2 = {
>x2 : Symbol(x2, Decl(thisTypeErrors.ts, 48, 11))
h(x: this): this {
>h : Symbol(h, Decl(thisTypeErrors.ts, 48, 18))
>x : Symbol(x, Decl(thisTypeErrors.ts, 49, 14))
return undefined;
>undefined : Symbol(undefined)
}
}
}
}
|