mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Add module emit test
This commit is contained in:
parent
ab33a65d30
commit
29dfa3d6c0
@ -0,0 +1,32 @@
|
||||
//// [moduleSharesNameWithImportDeclarationInsideIt6.ts]
|
||||
module Z.M {
|
||||
export function bar() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
module A.M {
|
||||
import M = Z.M;
|
||||
export function bar() {
|
||||
}
|
||||
}
|
||||
|
||||
//// [moduleSharesNameWithImportDeclarationInsideIt6.js]
|
||||
var Z;
|
||||
(function (Z) {
|
||||
var M;
|
||||
(function (M) {
|
||||
function bar() {
|
||||
return "";
|
||||
}
|
||||
M.bar = bar;
|
||||
})(M = Z.M || (Z.M = {}));
|
||||
})(Z || (Z = {}));
|
||||
var A;
|
||||
(function (A) {
|
||||
var M;
|
||||
(function (M) {
|
||||
function bar() {
|
||||
}
|
||||
M.bar = bar;
|
||||
})(M = A.M || (A.M = {}));
|
||||
})(A || (A = {}));
|
||||
@ -0,0 +1,24 @@
|
||||
=== tests/cases/compiler/moduleSharesNameWithImportDeclarationInsideIt6.ts ===
|
||||
module Z.M {
|
||||
>Z : typeof Z
|
||||
>M : typeof M
|
||||
|
||||
export function bar() {
|
||||
>bar : () => string
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
module A.M {
|
||||
>A : typeof A
|
||||
>M : typeof A.M
|
||||
|
||||
import M = Z.M;
|
||||
>M : typeof M
|
||||
>Z : typeof Z
|
||||
>M : typeof M
|
||||
|
||||
export function bar() {
|
||||
>bar : () => void
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
module Z.M {
|
||||
export function bar() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
module A.M {
|
||||
import M = Z.M;
|
||||
export function bar() {
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user