-
-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add directives
field to TSModuleDeclaration
?
#3564
Comments
Babel parser hands out |
Babel doesn't use AST explorer - Babel They all produce a We could just ignore this, and leave it as is. It's not at all a common case. But it will cause semantic to be incorrect. This should be an error (even if namespace Foo {
'use strict';
let arguments;
} Typescript gets this right: TS playground NB: If we do this, we'd need to add a custom |
From #3532, it seems like this is legal syntax and
'use strict';
should be interpreted as aDirective
:Should we add a
directives: Vec<'a, Directive<'a>>
field toTSModuleDeclaration
and fill it in the parser, using same logic as for functions?The text was updated successfully, but these errors were encountered: