Conversation
mjbvz
left a comment
There was a problem hiding this comment.
Nice! I'll get initial support for this in VSCode this month so people using typescript@next can start testing
| * fileName to rename. | ||
| * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. | ||
| */ | ||
| fileToRename?: string; |
There was a problem hiding this comment.
this could be a folder as well.. e.g.
// modules/a/index.ts
export var a;import * from "./modules/a";There was a problem hiding this comment.
we should handle this case too.
And since we are renaming a module, we should also rename its references in tsconfig.json like "files"/"include"/"paths" etc..
I think we should just call in getEditsForFileRename instead of computing something on the fly.
|
@Andy-MS please address conflicts + Mohamed's comments |
|
@mjbvz Good to merge? |
|
Yes, we don't have support in VS Code for this yet but I'll add it this iteration |
|
@Andy-MS So is the expected behavior that when triggering rename on an import path in a file, we actually trigger the rename in the vscode file explorer? |
|
You could do that, which I'm guessing is the simplest way. Another option is to do the rename inline as usual, and change the name of the file without opening the file explorer. |
|
Ok, just so I make sure I understand what is supported:
|
|
Fixes #24501
Adds a
fileToRenameproperty toRenameInfoso that the editor can rename the file instead.