-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Suggestion: refactor to "move to another (existing) file" #29988
Copy link
Copy link
Closed
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issueA PR has been opened for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Metadata
Metadata
Assignees
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolDomain: LS: TSServerIssues related to the TSServerIssues related to the TSServerFix AvailableA PR has been opened for this issueA PR has been opened for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Search Terms
Suggestion
The "move to new file" refactor is really helpful, but what if you want to move the code to an existing module?
This happens very often, when you realise code has been living in the wrong module, or it has a better home in some other module.
I would like to suggest a new refactor: "move to another (existing) file".
My workaround at the moment is to move the code manually, and then manually update all imports, but this is rather tedious!
Checklist
My suggestion meets these guidelines: