-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
TS doesn't remove namespaces that contain declare class, while SWC does
Input code
namespace NS {
declare class D {}
}
console.log(typeof NS)Config
{
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": false
},
"target": "es2019",
"loose": false,
"minify": {
"compress": false,
"mangle": false
}
},
"module": {
"type": "es6"
},
"minify": false,
"isModule": true
}Playground link
Expected behavior
var NS;
(function (NS) {
})(NS || (NS = {}));
console.log(typeof NS);Actual behavior
console.log(typeof NS);and at runtime it throws that NS is not declared
Version
1.3.70
Additional context
No response