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
|
=== /a.ts ===
class A {}
>A : Symbol(A, Decl(a.ts, 0, 0))
export type { A };
>A : Symbol(A, Decl(a.ts, 1, 13))
export class B {};
>B : Symbol(B, Decl(a.ts, 1, 18))
=== /b.ts ===
import * as types from './a';
>types : Symbol(types, Decl(b.ts, 0, 6))
let A: typeof types.A;
>A : Symbol(A, Decl(b.ts, 1, 3))
>types.A : Symbol(types.A, Decl(a.ts, 1, 13))
>types : Symbol(types, Decl(b.ts, 0, 6))
>A : Symbol(types.A, Decl(a.ts, 1, 13))
let B: typeof types.B;
>B : Symbol(B, Decl(b.ts, 2, 3))
>types.B : Symbol(types.B, Decl(a.ts, 1, 18))
>types : Symbol(types, Decl(b.ts, 0, 6))
>B : Symbol(types.B, Decl(a.ts, 1, 18))
let t: typeof types = {
>t : Symbol(t, Decl(b.ts, 4, 3))
>types : Symbol(types, Decl(b.ts, 0, 6))
// error: while you can ask for `typeof types.A`,
// `typeof types` does not include `A`
A: undefined as any,
>A : Symbol(A, Decl(b.ts, 4, 23))
>undefined : Symbol(undefined)
B: undefined as any,
>B : Symbol(B, Decl(b.ts, 7, 22))
>undefined : Symbol(undefined)
}
|