| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Sorry, something went wrong.
|
We also need to consider /// <reference path="..." /> comments. bonus point for tsconfig.json "files" entries. |
Sorry, something went wrong.
|
Ok, I think this flow makes sense and the api looks good. We may also need an api to check if any renames are necessary so we can avoid prompting the user in cases with loose files |
Sorry, something went wrong.
| "navigateTo.ts", | ||
| "navigationBar.ts", | ||
| "organizeImports.ts", | ||
| "../services/renameFile.ts", |
There was a problem hiding this comment.
jsut renameFile.ts
Sorry, something went wrong.
| return OrganizeImports.organizeImports(sourceFile, formatContext, host, program, preferences); | ||
| } | ||
|
|
||
| function renameFile(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings): ReadonlyArray<FileTextChanges> { |
There was a problem hiding this comment.
the name makes me think there is will rename the file as well.. how about getEditsForFileRename
Sorry, something went wrong.
|
Sheetal Nandi (@sheetalkamat) What's a good way to get access to the tsconfig.json source file given a Program object, so that we can make edits for it? |
Sorry, something went wrong.
|
Andy (Andrewkraft) (@Andy-MS) the soruceFile for the tsconfig.json is stored in options.configFile, assuming one exists. |
Sorry, something went wrong.
|
FWIW: most IDEs I’ve used, asked me – before the file was actually moved: “Do you also want to update references?” |
Sorry, something went wrong.
|
Is this supposed to work for renaming folders as well? It doesn't seem to in VS Code 1.24 / TypeScript 2.9.1. |
Sorry, something went wrong.
|
Folder rename should be working in typescript@2.9.2 and next VSCode release. |
Sorry, something went wrong.
|
Filed #24904 to track folder renames. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Here's how I think it would work:
This is a bit tricky on the tsserver side since we need to be able to figure out what unresolved imports could have resolved to. This meant I had to leave moduleResolutionCache around so we could look at the failed lookup locations for failed imports.
Fully expecting to need a lot of revision on this. CC Matt Bierner (@mjbvz) for protocol review.