-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolDomain: 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
Description
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:
- This wouldn't be a breaking change in existing TypeScript/JavaScript code
- This wouldn't change the runtime behavior of existing JavaScript code
- This could be implemented without emitting different JS based on the types of the expressions
- This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
- This feature would agree with the rest of TypeScript's Design Goals.
jillesvangurp, rudi-c, ChiriVulpes, mgummelt, yhuang0 and 231 more
Metadata
Metadata
Assignees
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbole.g. extract to constant or function, rename symbolDomain: 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