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
|
=== tests/cases/compiler/genericInstanceOf.ts ===
interface F {
>F : Symbol(F, Decl(genericInstanceOf.ts, 0, 0))
(): number;
}
class C<T> {
>C : Symbol(C, Decl(genericInstanceOf.ts, 2, 1))
>T : Symbol(T, Decl(genericInstanceOf.ts, 4, 8))
constructor(public a: T, public b: F) {}
>a : Symbol(C.a, Decl(genericInstanceOf.ts, 5, 16))
>T : Symbol(T, Decl(genericInstanceOf.ts, 4, 8))
>b : Symbol(C.b, Decl(genericInstanceOf.ts, 5, 28))
>F : Symbol(F, Decl(genericInstanceOf.ts, 0, 0))
foo() {
>foo : Symbol(C.foo, Decl(genericInstanceOf.ts, 5, 44))
if (this.a instanceof this.b) {
>this.a : Symbol(C.a, Decl(genericInstanceOf.ts, 5, 16))
>this : Symbol(C, Decl(genericInstanceOf.ts, 2, 1))
>a : Symbol(C.a, Decl(genericInstanceOf.ts, 5, 16))
>this.b : Symbol(C.b, Decl(genericInstanceOf.ts, 5, 28))
>this : Symbol(C, Decl(genericInstanceOf.ts, 2, 1))
>b : Symbol(C.b, Decl(genericInstanceOf.ts, 5, 28))
}
}
}
|