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 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
=== tests/cases/compiler/declarationEmit_nameConflicts_0.ts ===
import im = require('./declarationEmit_nameConflicts_1');
>im : typeof im
export module M {
>M : typeof M
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export import a = M.f;
>a : () => void
>M : typeof M
>f : () => void
export import b = M.C;
>b : typeof C
>M : typeof M
>C : C
export import c = N;
>c : typeof N
>N : typeof N
export import d = im;
>d : typeof d
>im : typeof d
}
export module M.P {
>M : typeof M
>P : typeof P
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export import im = M.P.f;
>im : () => void
>M : typeof M
>P : typeof P
>f : () => void
export var a = M.a; // emitted incorrectly as typeof f
>a : () => void
>M.a : () => void
>M : typeof M
>a : () => void
export var b = M.b; // ok
>b : typeof M.C
>M.b : typeof M.C
>M : typeof M
>b : typeof M.C
export var c = M.c; // ok
>c : typeof M.N
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
export var g = M.c.g; // ok
>g : () => void
>M.c.g : () => void
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>g : () => void
export var d = M.d; // emitted incorrectly as typeof im
>d : typeof M.d
>M.d : typeof M.d
>M : typeof M
>d : typeof M.d
}
export module M.Q {
>M : typeof M
>Q : typeof Q
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export interface b extends M.b { } // ok
>b : b
>M.b : any
>M : typeof M
>b : M.C
export interface I extends M.c.I { } // ok
>I : I
>M.c.I : any
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>I : M.c.I
export module c {
>c : any
export interface I extends M.c.I { } // ok
>I : I
>M.c.I : any
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>I : M.c.I
}
}
=== tests/cases/compiler/declarationEmit_nameConflicts_1.ts ===
module f { export class c { } }
>f : typeof f
>c : c
export = f;
>f : typeof f
|