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

importsNotUsedAsValues is wrong #1094

Closed
kdy1 opened this issue Sep 21, 2020 · 5 comments · Fixed by #1101
Closed

importsNotUsedAsValues is wrong #1094

kdy1 opened this issue Sep 21, 2020 · 5 comments · Fixed by #1101
Milestone

Comments

@kdy1
Copy link
Member

kdy1 commented Sep 21, 2020

@kdy1 This is not the behaviour of tsc under "importsNotUsedAsValues": "preserve". The correct behaviour is to never preserve completely unused import identifiers. The above branch should always be used.

I think ImportNotUsedAsValues should be removed since it's a misunderstanding of the equivalent tsc option.

Originally posted by @nayeemrmn in #1060 (comment)

It's a breaking change.

@nayeemrmn
Copy link
Contributor

@kdy1 What if I don't remove the option, but disassociate it with any behaviour for now? The behaviour it's currently associated with should unconditionally be "remove".

@kdy1
Copy link
Member Author

kdy1 commented Sep 23, 2020

I think it's not correct. I think it should at least panic if an option which causes wrong behavior is provided.
Actaully decorator pass does it, because decorator metadata for current proposal is not implemented yet.

@nayeemrmn
Copy link
Contributor

@kdy1 Nevermind, I can fix it to cause the correct behaviour.

@kdy1
Copy link
Member Author

kdy1 commented Sep 23, 2020

@nayeemrmn Sounds great!

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 26, 2022

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants