microsoft / microsoft/TypeScript

Add option to remove "move to new file" quick fix

オープン
#61,712 コメント 1 件 リアクション 2 件 担当者 1 名 GitHub で見る

@joj がすでに取り組んでいます。

2025年5月16日 から。

Needs Investigation Visual Studio
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

🔍 Search Terms

move to new file visual studio

✅ Viability Checklist
⭐ Suggestion

Add an option in VS/tsconfig/wherever to remove the "move to new file" quick fix.

📃 Motivating Example

Imagine you are using Visual Studio and writing some Typescript. You reference an item that is not yet imported. You press ctrl+. enter to import the item, but it turns out you forgot to export it. Now you have moved some random function/class/whatever to a new file and want to just put it back, but there's a number of problems.

  • There's no built-in way to undo this "quick" fix
  • The new files aren't added to the project as TypeScriptCompile in VS.
  • This also means that undoing it manually is a big pain because "Sync with active document" doesn't actually do that, leading to you deleting the wrong file.
  • Pasting the content back means the imports are now messed up. It's somewhat easy to make them work, but less easy to avoid a giant mess in git history.
💻 Use Cases

Set the option and be happy about losing less time.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。