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
|
=== /a.ts ===
export class A {}
>A : Symbol(A, Decl(a.ts, 0, 0))
=== /b.ts ===
import type * as types from './a';
>types : Symbol(types, Decl(b.ts, 0, 11))
export default types;
>types : Symbol(types, Decl(b.ts, 0, 11))
=== /c.ts ===
import * as types from './a';
>types : Symbol(types, Decl(c.ts, 0, 6))
export default types;
>types : Symbol(types, Decl(c.ts, 0, 6))
=== /d.ts ===
import types from './b';
>types : Symbol(types, Decl(d.ts, 0, 6))
new types.A(); // Error
>types.A : Symbol(types.A, Decl(a.ts, 0, 0))
>types : Symbol(types, Decl(d.ts, 0, 6))
>A : Symbol(types.A, Decl(a.ts, 0, 0))
=== /e.ts ===
import types = require('./b');
>types : Symbol(types, Decl(e.ts, 0, 0))
new types.A(); // Error
>types : Symbol(types, Decl(e.ts, 0, 0))
=== /f.ts ===
import * as types from './b';
>types : Symbol(types, Decl(f.ts, 0, 6))
new types.default.A(); // Error
>types : Symbol(types, Decl(f.ts, 0, 6))
=== /g.ts ===
import type types from './c'
>types : Symbol(types, Decl(g.ts, 0, 6))
new types.A(); // Error
>types.A : Symbol(types.A, Decl(a.ts, 0, 0))
>types : Symbol(types, Decl(g.ts, 0, 6))
>A : Symbol(types.A, Decl(a.ts, 0, 0))
|