microsoft / microsoft/TypeScript
Code Completions for Object's keys behave differently in different declaration scenarios
まだ誰も着手していません。
- 主要言語
- Go
- スター
- 111k
- フォーク
- 14.3k
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 132
説明
I tried these code snippets in monaco editor playground
I'm posting it here, as those were reproducible in VsCode too
VsCode Version: 1.52.0
Commit: 940b5f4bb5fa47866a54529ed759d95d09ee80be
Date: 2020-12-10T22:46:53.673Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 17.7.0
- When an Object in constructed with some keys and manipulated by some other keys then, those manipulated keys wont find its place in the suggestions ( as a property ). It only comes in suggestion as a literal
Here, key3 is not suggested as property of the object

- When an Object is initialized with an empty object and then if it is reassigned, then only the directly manipulated keys are shown in suggestions
Here, Only key3 is suggested as property of the object and not the other keys

- When an Object is initialized with an empty object and then if it is only manipulated ( one at a time ) then it works
perfectly fine
Originally posted by @Pranomvignesh in https://github.com/microsoft/monaco-editor/issues/2278#issuecomment-749024514
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue で説明されている 3 つのオブジェクト宣言シナリオを Monaco Editor playground と VS Code で再現します。オブジェクトキーに対する TypeScript の completion の動作を追跡し、異なる候補が期待されるものかどうかを判断します。完了の条件は、報告されたシナリオでプロパティ補完が一貫していることです。関連するテスト箇所が見つかった場合は、回帰テストのカバレッジも追加します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, typescript
- 領域
- compilers, developer-experience
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100