Skip to content
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

Merged

Conversation

tanhauhau
Copy link
Member

Q                       A
Fixed Issues? Fix #10043
Patch: Bug Fix? 👍
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

Add a new scope for TSModuleDeclaration

SCOPE_SUPER = 0b0001000000,
SCOPE_DIRECT_SUPER = 0b0010000000,
SCOPE_CLASS = 0b0100000000,
SCOPE_MODULE_DECLARATION = 0b1000000000,
Copy link
Member

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
Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

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

@tanhauhau tanhauhau force-pushed the tanhauhau/ts-module-declaration branch from bc2db77 to 070ca1e Compare June 24, 2019 14:16
@babel-bot
Copy link
Collaborator

babel-bot commented Jun 24, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11482/

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10997/

@tanhauhau tanhauhau force-pushed the tanhauhau/ts-module-declaration branch from 070ca1e to 5cf7f99 Compare June 25, 2019 00:46
@nicolo-ribaudo nicolo-ribaudo added area: typescript pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jun 27, 2019
@tanhauhau tanhauhau force-pushed the tanhauhau/ts-module-declaration branch from 5cf7f99 to 659621d Compare September 6, 2019 15:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Identifier has already been declared error in TSModuleBlock
3 participants