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

Use scope for typescript export removals #10034

Merged
merged 1 commit into from May 29, 2019

Conversation

Wolvereness
Copy link
Contributor

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

Rewrites the removal of type exports to simply examine what's in the scope. This requires a fix to the enum transform so it adds itself to scope.

Exporting an enum before it appears is invalid typescript, so whether or not it's in the scope for that visitor is irrelevant.

This also changes a few related test cases to use a comment ; // Otherwise-empty file so that they will fail-fast if the output changes, rather than quietly (though not silently) create an output file.

This also fixes enum not adding the respective declaration to the scope
during the typescript visitation.

Rewrites:

2080042 babel#9944

a6392bd babel#10019
@babel-bot
Copy link
Collaborator

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

@nicolo-ribaudo
Copy link
Member

@airato Does this look ok to you?

@airato
Copy link
Contributor

airato commented May 29, 2019

👍 thank you!

@nicolo-ribaudo nicolo-ribaudo merged commit 8d492b1 into babel:master May 29, 2019
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue 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.

Typescript export default erased in presence of namespace
6 participants