microsoft / microsoft/TypeScript
Feature Request: Update wrong defined import statements?
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.4k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
I wonder if there is a feature in vscode to automatically delete imports that are incorrectly defined? Like this:

There is no function named "getData" from "response.ts". Because that function is moved somewhere else within the project. I ask this because incorrectly defined import statements are not deleted automatically by "removeUnusedImports". Because they are used in the file.
In fact, if it could be deleted, then the "addMissingImports" command could do its job and add these imports to the file, so that we could see that the function that was moved in the project was imported from the right place.
PLUS, it would be great if this feature could work when functions are relocated, just like vscode detects when files are relocated and updates the imports. But I am not sure about feasibility of this.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、既存の removeUnusedImports コマンドと addMissingImports コマンドが、エクスポートされた関数の移動によって変更された import をどのように処理するかを調べます。正しく定義されていない import と移動された関数に対する期待される動作を定義し、そのうえで、提案された機能が有効な import を削除せずに正しい新しいソースを特定できることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100