Rename file when renaming default export #29294
Labels
Domain: Refactorings
e.g. extract to constant or function, rename symbol
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
Suggestion
An idea for TypeScript
Currently we can use the
rename symbol
command and that will rename the symbol and its usages (exports, imports, usages in other files, etc.). That's a great start, but I'd love to see this feature expanded to do the following:Many times a file name will coincide with the symbol being refactored. The refactor option should be available when renaming the file, so everything can be done at once.
In addition to the refactor changing symbol references across all files, it'd be nice to have the ability to also update comments, strings, etc. that refer to that symbol.
Code Example:
Shape.js
Circle.js - We reference Shape as an import, extends, inside a comment, and inside a string. They should all be refactored.
WebStorm Examples
The text was updated successfully, but these errors were encountered: