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

Fix typescript side effects #8738

Merged
merged 4 commits into from
Jan 24, 2019

Conversation

yuri-karadzhov
Copy link
Contributor

Q                       A
Fixed Issues? `Fixes #8634
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

@babel-bot
Copy link
Collaborator

babel-bot commented Sep 24, 2018

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

@danez
Copy link
Member

danez commented Nov 5, 2018

Thank you very much for this, could you please add a test?

If you need help with the tests feel free to join our slack chat and ask there, but basically all the tests for the transforms have a file with the input code (input.mjs) and a file with the expected output (output.mjs). To enable certain plugins you can also create a file called options.json. For example look at this test: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typescript/test/fixtures/imports/elide-react-no-2

@danez danez added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: typescript awaiting reply labels Nov 5, 2018
@yuri-karadzhov
Copy link
Contributor Author

Sure will do that this week. Thanks for detailed explanation.

@yuri-karadzhov
Copy link
Contributor Author

Strange, it works in application, but not in test. I will investigate.

@danez
Copy link
Member

danez commented Nov 30, 2018

The underlying problem was that babel-traverse was not visiting decorators which are added to params. This resulted in the identifier from the decorators never being counted as usage of a declaration (in this case the named imports). I changed the PR to reflect this. Now the test works.

The only 3 cases I could come up are identifiers, assignments and objectpatterns:

function boo (@dec() a, @dec() b = 1, @dec() { foo }) {}

rest params throw when annotated.

@yuri-karadzhov
Copy link
Contributor Author

Any updates on this PR?

@danez danez merged commit 854313a into babel:master Jan 24, 2019
@pixelmeister
Copy link

Any ETA when this will be released? Are there nightly builds of Babel available that I could use in the interim?

@nicolo-ribaudo
Copy link
Member

Usually we release a new version every ~2 weeks

@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
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 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] typescript plugin removes parameter decorators imports
6 participants