microsoft / microsoft/TypeScript
TSServer: Find all reference for per overloaded function type
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 117
説明
Search Terms
Find references, overload, function, overloaded function
Suggestion
Provide a mechanism to search references of a function with particular overloaded type
Use Cases
In current implementation find all references for overloaded function shows all references for every overload
Some times we need to find references of particular overload only (i.e. a overload is deprecated and we want to update all use cases)
Examples
/**
* @deprecated
**/
declare function fn():void; // overload 1
declare function fn(param:string):number; // overload 2
fn(); // use 1
const x = fn('a'); // use 2
const y = fn('b'); // use 3
Finding references for overload 1 should list use 1.
Finding references for overload 2 should list use 2 and use 3.
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、オーバーロードされた関数に対する TSServer の find-references の動作と、選択されたオーバーロードをどのように識別するかを調査します。例に基づいて完了条件を定義します。オーバーロード 1 の参照には use 1 のみが含まれ、オーバーロード 2 には use 2 と use 3 が含まれます。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- typescript
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100