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
|
=== tests/cases/compiler/library.d.ts ===
export class Foo<T = {}, U = {}> {
>Foo : Symbol(Foo, Decl(library.d.ts, --, --))
>T : Symbol(T, Decl(library.d.ts, --, --))
>U : Symbol(U, Decl(library.d.ts, --, --))
props: T;
>props : Symbol(Foo.props, Decl(library.d.ts, --, --))
>T : Symbol(T, Decl(library.d.ts, --, --))
state: U;
>state : Symbol(Foo.state, Decl(library.d.ts, --, --))
>U : Symbol(U, Decl(library.d.ts, --, --))
constructor(props: T, state: U);
>props : Symbol(props, Decl(library.d.ts, --, --))
>T : Symbol(T, Decl(library.d.ts, --, --))
>state : Symbol(state, Decl(library.d.ts, --, --))
>U : Symbol(U, Decl(library.d.ts, --, --))
}
=== tests/cases/compiler/component.js ===
import { Foo } from "./library";
>Foo : Symbol(Foo, Decl(component.js, 0, 8))
export class MyFoo extends Foo {
>MyFoo : Symbol(MyFoo, Decl(component.js, 0, 32))
>Foo : Symbol(Foo, Decl(component.js, 0, 8))
member;
>member : Symbol(MyFoo.member, Decl(component.js, 1, 32))
}
=== tests/cases/compiler/typed_component.ts ===
import { MyFoo } from "./component";
>MyFoo : Symbol(MyFoo, Decl(typed_component.ts, 0, 8))
export class TypedFoo extends MyFoo {
>TypedFoo : Symbol(TypedFoo, Decl(typed_component.ts, 0, 36))
>MyFoo : Symbol(MyFoo, Decl(typed_component.ts, 0, 8))
constructor() {
super({x: "string", y: 42}, { value: undefined });
>super : Symbol(MyFoo, Decl(component.js, 0, 32))
>x : Symbol(x, Decl(typed_component.ts, 3, 15))
>y : Symbol(y, Decl(typed_component.ts, 3, 27))
>value : Symbol(value, Decl(typed_component.ts, 3, 37))
>undefined : Symbol(undefined)
this.props.x;
>this.props : Symbol(Foo.props, Decl(library.d.ts, --, --))
>this : Symbol(TypedFoo, Decl(typed_component.ts, 0, 36))
>props : Symbol(Foo.props, Decl(library.d.ts, --, --))
this.props.y;
>this.props : Symbol(Foo.props, Decl(library.d.ts, --, --))
>this : Symbol(TypedFoo, Decl(typed_component.ts, 0, 36))
>props : Symbol(Foo.props, Decl(library.d.ts, --, --))
this.state.value;
>this.state : Symbol(Foo.state, Decl(library.d.ts, --, --))
>this : Symbol(TypedFoo, Decl(typed_component.ts, 0, 36))
>state : Symbol(Foo.state, Decl(library.d.ts, --, --))
this.member;
>this.member : Symbol(MyFoo.member, Decl(component.js, 1, 32))
>this : Symbol(TypedFoo, Decl(typed_component.ts, 0, 36))
>member : Symbol(MyFoo.member, Decl(component.js, 1, 32))
}
}
|