|
| 1 | +//// [tests/cases/compiler/importAliasInModuleAugmentation.ts] //// |
| 2 | + |
| 3 | +=== importAliasInModuleAugmentation.ts === |
| 4 | +export { } |
| 5 | + |
| 6 | +namespace A { |
| 7 | +>A : Symbol(A, Decl(importAliasInModuleAugmentation.ts, 0, 10)) |
| 8 | + |
| 9 | + export const y = 34; |
| 10 | +>y : Symbol(y, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) |
| 11 | + |
| 12 | + export interface y { s: string } |
| 13 | +>y : Symbol(y, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) |
| 14 | +>s : Symbol(y.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) |
| 15 | +} |
| 16 | + |
| 17 | +declare global { |
| 18 | +>global : Symbol(global, Decl(importAliasInModuleAugmentation.ts, 5, 1)) |
| 19 | + |
| 20 | + export import x = A.y; |
| 21 | +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) |
| 22 | +>A : Symbol(A, Decl(importAliasInModuleAugmentation.ts, 0, 10)) |
| 23 | +>y : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 3, 16), Decl(importAliasInModuleAugmentation.ts, 3, 24)) |
| 24 | + |
| 25 | + // Should still error |
| 26 | + import f = require("fs"); |
| 27 | +>f : Symbol(f, Decl(importAliasInModuleAugmentation.ts, 8, 26)) |
| 28 | +} |
| 29 | + |
| 30 | +const m: number = x; |
| 31 | +>m : Symbol(m, Decl(importAliasInModuleAugmentation.ts, 14, 5)) |
| 32 | +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) |
| 33 | + |
| 34 | +let s: x = { s: "" }; |
| 35 | +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 3)) |
| 36 | +>x : Symbol(x, Decl(importAliasInModuleAugmentation.ts, 7, 16)) |
| 37 | +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 12)) |
| 38 | + |
| 39 | +void s.s; |
| 40 | +>s.s : Symbol(x.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) |
| 41 | +>s : Symbol(s, Decl(importAliasInModuleAugmentation.ts, 15, 3)) |
| 42 | +>s : Symbol(x.s, Decl(importAliasInModuleAugmentation.ts, 4, 24)) |
| 43 | + |
0 commit comments