Nested namespace identifiers errors with namespace must have a "ModuleBlock" body
#246
Closed
3 tasks done
namespace must have a "ModuleBlock" body
#246
Checklist
Other plugins, such as
node-resolve
are known to cause issues..d.ts
files generated by TypeScript.The plugin can consume
.ts
and even.js
files (withallowJs: true
), but this is known to cause issues.@types
.The plugin ignores these by default, unless
respectExternal
is set.@types
can contain hand-crafted code which is known to cause issues.Code Snipped
Error Message
Details
I get this error when using the shorthand for nesting namespaces (separating identifiers with dots).
I believe this is a more general case of #160.
Looking at the AST for this, the
body
of the firstModuleDeclaration
is indeed anotherModuleDeclaration
and not aModuleBlock
as expected by the plugin.Patching the default value of
relaxedModuleBlock
totrue
seems to solve the problem, but what would the drawback of that be?The text was updated successfully, but these errors were encountered: