-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7c4e04
commit 0d93b04
Showing
4 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/1/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace X1 { | ||
console.log(1); | ||
} | ||
|
||
export namespace X2 { | ||
console.log(2); | ||
} | ||
|
||
namespace X3 { | ||
namespace X4 { | ||
console.log(4); | ||
} | ||
} | ||
|
||
namespace X5 { | ||
export namespace X6 { | ||
console.log(6); | ||
} | ||
} | ||
|
||
namespace X7.X8 { | ||
console.log(8); | ||
} |
32 changes: 32 additions & 0 deletions
32
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/1/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
var X1; | ||
(function (X1) { | ||
console.log(1); | ||
})(X1 || (X1 = {})); | ||
|
||
export var X2; | ||
(function (X2) { | ||
console.log(2); | ||
})(X2 || (X2 = {})); | ||
|
||
var X3; | ||
(function (X3) { | ||
let X4; | ||
(function (X4) { | ||
console.log(4); | ||
})(X4 || (X4 = {})); | ||
})(X3 || (X3 = {})); | ||
|
||
var X5; | ||
(function (X5) { | ||
let X6; | ||
(function (X6) { | ||
console.log(6); | ||
})(X6 = X5.X6 || (X5.X6 = {})); | ||
})(X5 || (X5 = {})); | ||
|
||
var X7; | ||
(function (X7) { | ||
(function (X8) { | ||
console.log(8); | ||
})(X8 = X7.X8 || (X7.X8 = {})); | ||
})(X7 || (X7 = {})); |
17 changes: 17 additions & 0 deletions
17
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/2/input.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class X1 {} | ||
|
||
namespace X1 { | ||
console.log(1); | ||
} | ||
|
||
function X2() {} | ||
|
||
namespace X2 { | ||
console.log(2); | ||
} | ||
|
||
enum X3 {} | ||
|
||
namespace X3 { | ||
console.log(3); | ||
} |
17 changes: 17 additions & 0 deletions
17
crates/swc_ecma_transforms_typescript/tests/fixture/namespace/2/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class X1 { | ||
} | ||
(function (X1) { | ||
console.log(1); | ||
})(X1 || (X1 = {})); | ||
|
||
function X2() { } | ||
(function (X2) { | ||
console.log(2); | ||
})(X2 || (X2 = {})); | ||
|
||
var X3; | ||
(function (X3) { | ||
})(X3 || (X3 = {})); | ||
(function (X3) { | ||
console.log(3); | ||
})(X3 || (X3 = {})); |