You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature request is motivated by Node's TypeScript integration. See nodejs/amaro#168 for the backstory.
The request is for SWC to introduce a TypeScript-specific option (example: no_module_keyword_for_ts_namespace) to error when the source text includes any form of namespace using the legacy module keyword:
module Foo {}
declare module Foo {}
This applies to both the ambient and non-ambient forms. And applies to both instantiated and uninstantiated forms.
Ambient module declarations (declare module "specifier" {}) are fine and should continue to be erased and not error.
Amaro Usage
The initial user of this feature will be Amaro in Node. Node needs to be able to show a helpful message to the user. The returned error should identify this specific error so that we can display a human-readable message such as:
module keyword is not supported. Use namespace instead.
The text was updated successfully, but these errors were encountered:
Describe the feature
This feature request is motivated by Node's TypeScript integration. See nodejs/amaro#168 for the backstory.
The request is for SWC to introduce a TypeScript-specific option (example:
no_module_keyword_for_ts_namespace
) to error when the source text includes any form of namespace using the legacymodule
keyword:module Foo {}
declare module Foo {}
This applies to both the ambient and non-ambient forms. And applies to both instantiated and uninstantiated forms.
Babel plugin or link to the feature description
nodejs/amaro#168
Additional context
Exclusions
Ambient module declarations (
declare module "specifier" {}
) are fine and should continue to be erased and not error.Amaro Usage
The initial user of this feature will be Amaro in Node. Node needs to be able to show a helpful message to the user. The returned error should identify this specific error so that we can display a human-readable message such as:
The text was updated successfully, but these errors were encountered: