Skip to content

add scope to TSModuleDeclaration#10119

Merged
nicolo-ribaudo merged 1 commit intobabel:masterfrom
tanhauhau:tanhauhau/ts-module-declaration
Oct 8, 2019
Merged

add scope to TSModuleDeclaration#10119
nicolo-ribaudo merged 1 commit intobabel:masterfrom
tanhauhau:tanhauhau/ts-module-declaration

Conversation

@tanhauhau
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

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