-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Describe the bug
A namespace with only declared values is treated as type-only and elided at transpilation, it should be transpiled to an empty namespace.
Input code
export namespace foo {
export declare const bar: number;
}Config
No response
Playground link
Expected behavior
TSC output:
export var foo;
(function (foo) {
})(foo || (foo = {}));Actual behavior
Produces empty module.
Version
swc_ecma_parser 0.111.0, swc_ecma_transforms_typescript 0.137.0
Additional context
No response
danielpayetdev