Skip to content

Module renaming needs to be opt-in #28677

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

Closed
amcasey opened this issue Nov 27, 2018 · 2 comments
Closed

Module renaming needs to be opt-in #28677

amcasey opened this issue Nov 27, 2018 · 2 comments
Assignees
Labels
Bug A bug in TypeScript

Comments

@amcasey
Copy link
Member

amcasey commented Nov 27, 2018

In 3.1, we enabled renaming modules in imports (and exports?). So, for example, you can rename "file" in import { x } from "file".

I believe this was the key change: 24a5bdd

Older versions of VS will see that canRename is true in that location but fail to call getEditsForFileRename instead of findRenameLocations.

We probably need a UserPreference to make this behavior opt-in.

@amcasey amcasey added the Bug A bug in TypeScript label Nov 27, 2018
@amcasey
Copy link
Member Author

amcasey commented Nov 27, 2018

The current behavior of VS is that the rename is allowed, but only updates the single location, introducing an error.

@sandersn sandersn self-assigned this Dec 11, 2018
@sandersn sandersn added this to the TypeScript 3.4.0 milestone Dec 11, 2018
@minestarks
Copy link
Member

Related issue #28679

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

4 participants