index.mts:1:1 - error TS1287: A top-level 'export' modifier cannot be used on value declarations in a CommonJS module when 'verbatimModuleSyntax' is enabled.
1 export namespace T {
~~~~~~
Found 1 error in index.mts:1
π Expected behavior
works
The text was updated successfully, but these errors were encountered:
The error is not the namespace, it is the use of a top-level export. I'd expect you need to write the following:
namespaceT{exportenumA{a=1}}export={
T
}
DanielRosenwasser
changed the title
verbatimModuleSyntax not work with namespace
verbatimModuleSyntax not work with namespace at top level
Jan 28, 2023
Bug Report
verbatimModuleSyntax not work with namespace
verbatimModuleSyntax
5.0.0-beta
N/A because need a package.json
{ "type": "module", "dependencies": { "typescript": "5.0.0-beta" } }works
The text was updated successfully, but these errors were encountered: