Skip to content

Commit 29dfa3d

Browse files
committed
Add module emit test
1 parent ab33a65 commit 29dfa3d

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//// [moduleSharesNameWithImportDeclarationInsideIt6.ts]
2+
module Z.M {
3+
export function bar() {
4+
return "";
5+
}
6+
}
7+
module A.M {
8+
import M = Z.M;
9+
export function bar() {
10+
}
11+
}
12+
13+
//// [moduleSharesNameWithImportDeclarationInsideIt6.js]
14+
var Z;
15+
(function (Z) {
16+
var M;
17+
(function (M) {
18+
function bar() {
19+
return "";
20+
}
21+
M.bar = bar;
22+
})(M = Z.M || (Z.M = {}));
23+
})(Z || (Z = {}));
24+
var A;
25+
(function (A) {
26+
var M;
27+
(function (M) {
28+
function bar() {
29+
}
30+
M.bar = bar;
31+
})(M = A.M || (A.M = {}));
32+
})(A || (A = {}));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
=== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt6.ts ===
2+
module Z.M {
3+
>Z : typeof Z
4+
>M : typeof M
5+
6+
export function bar() {
7+
>bar : () => string
8+
9+
return "";
10+
}
11+
}
12+
module A.M {
13+
>A : typeof A
14+
>M : typeof A.M
15+
16+
import M = Z.M;
17+
>M : typeof M
18+
>Z : typeof Z
19+
>M : typeof M
20+
21+
export function bar() {
22+
>bar : () => void
23+
}
24+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module Z.M {
2+
export function bar() {
3+
return "";
4+
}
5+
}
6+
module A.M {
7+
import M = Z.M;
8+
export function bar() {
9+
}
10+
}

0 commit comments

Comments
 (0)