-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
b2e7ccb
commit b26a385
Showing
3 changed files
with
100 additions
and
24 deletions.
There are no files selected for viewing
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
22 changes: 22 additions & 0 deletions
22
packages/babel-plugin-transform-typescript/test/fixtures/namespace/empty-removed/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,22 @@ | ||
namespace a { | ||
namespace b {} | ||
namespace c { var x } | ||
namespace d { | ||
namespace e {} | ||
} | ||
} | ||
|
||
namespace WithTypes { | ||
namespace a { type A = 1 } | ||
namespace b { interface B {} } | ||
namespace c { import C = a } | ||
namespace d { declare class D {} } | ||
} | ||
|
||
namespace WithValues { | ||
namespace a { class A {} } | ||
namespace b { enum B {} } | ||
namespace c { function C() {} } | ||
namespace d { var D } | ||
namespace e { E; } | ||
} |
37 changes: 37 additions & 0 deletions
37
packages/babel-plugin-transform-typescript/test/fixtures/namespace/empty-removed/output.mjs
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,37 @@ | ||
let a; | ||
(function (_a) { | ||
let c; | ||
(function (_c) { | ||
var x; | ||
})(c || (c = {})); | ||
})(a || (a = {})); | ||
let WithTypes; | ||
(function (_WithTypes) { | ||
let d; | ||
(function (_d2) {})(d || (d = {})); | ||
})(WithTypes || (WithTypes = {})); | ||
let WithValues; | ||
(function (_WithValues) { | ||
let a; | ||
(function (_a3) { | ||
class A {} | ||
})(a || (a = {})); | ||
let b; | ||
(function (_b3) { | ||
let B = /*#__PURE__*/function (B) { | ||
return B; | ||
}({}); | ||
})(b || (b = {})); | ||
let c; | ||
(function (_c3) { | ||
function C() {} | ||
})(c || (c = {})); | ||
let d; | ||
(function (_d3) { | ||
var D; | ||
})(d || (d = {})); | ||
let e; | ||
(function (_e2) { | ||
E; | ||
})(e || (e = {})); | ||
})(WithValues || (WithValues = {})); |