microsoft / microsoft/TypeScript
Give 'this' keyword suggestion the same `sortText` as class properties if inside a class
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
From https://github.com/Microsoft/vscode/issues/66868
TypeScript Version: 3.4.0-dev.20190220
Search Terms:
- suggestions
- completions
- sortText
Code
For the javascript:
class Foo {
constructor() {
this.prop = 1;
}
render() {
th
}
}
- Trigger intellisense after
thinrender
Expected behavior:
this should be the first suggestion in VS Code
Actual behavior:
render and then prop are the first suggestions
The root cause of this is that the suggestion for this has a sortText of "0" while the one for prop and render have a sortText of "1". This causes VS Code to sort prop and render before this
@amcasey @minestarks I'm not sure if the current sorting issue would also effect VS
Playground Link:
Related Issues:
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
クラスの例を使って TypeScript language service の補完順序を再現し、this、prop、render の補完エントリを調べます。関連する補完動作を更新し、this がクラスプロパティと同じ sortText を使用するようにしてから、例を対象とするリグレッションテストを追加または更新し、結果の順序を確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100