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 scope to TSModuleDeclaration #10119
add scope to TSModuleDeclaration #10119
Conversation
SCOPE_SUPER = 0b0001000000, | ||
SCOPE_DIRECT_SUPER = 0b0010000000, | ||
SCOPE_CLASS = 0b0100000000, | ||
SCOPE_MODULE_DECLARATION = 0b1000000000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you prefix this with TS, like for the binding kinds? SCOPE_TS_MODULE
declare class foo { | ||
} | ||
declare module 'bar' { | ||
export var foo: any; // Identifier 'foo' has already been declared |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work without declare
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that a valid syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only with an identifier name instead of a string:
https://www.typescriptlang.org/play/#src=module%20foo%20%7B%0A%20%20%20%20var%20a%20%3D%202%3B%0A%7D%0A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh okay, added a test case for that
bc2db77
to
070ca1e
Compare
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11482/ |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10997/ |
070ca1e
to
5cf7f99
Compare
5cf7f99
to
659621d
Compare
659621d
to
f92af4e
Compare
Add a new scope for TSModuleDeclaration