microsoft / microsoft/TypeScript
Code Completions for Object's keys behave differently in different declaration scenarios
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
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
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die drei im Issue beschriebenen Szenarien für Objekdeklarationen im Monaco Editor playground und in VS Code zu reproduzieren. Verfolge das TypeScript-Completion-Verhalten für Objektschlüssel und ermittle, ob die unterschiedlichen Vorschläge erwartungsgemäß sind; abgeschlossen bedeutet, dass die gemeldeten Szenarien konsistente Property-Vervollständigungen aufweisen, mit Regressionstests, falls die relevante Teststelle gefunden wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers, developer-experience
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100