microsoft / microsoft/TypeScript
Show all JSDoc @typedef properties when forming object of that type
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
Issue Type: Feature Request
Problem
When making references to custom types, you cannot really see what that custom type actually is actually composed of.For example, I have a class called OnlineUser which takes an optional parameter of custom type OnlineUserOptions:

When hovering over a reference to the class or forming the object to pass as OnlineUserOptions, only the name of the type is shown in the documentation that is displayed. If you don't know/remember what properties comprise OnlineUserOptions, then the only way to find out is by beginning to type random characters:

Suggestion
It would be very useful if instead, as soon as you begin the object literal, it would show all the properties of the custom type, like so:
It would also be nice if it was possible to click on the name of the type to jump to its definition (maybe through use of the @link tag?) or hover over it to view its details as though you were hovering over its name in the actual @typedef.
VS Code version: Code 1.50.0 (93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3, 2020-10-07T06:10:52.432Z)
OS version: Windows_NT x64 10.0.19041
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il comportamento in VS Code usando un JSDoc @typedef come OnlineUserOptions e un literal di oggetto passato a quel tipo. Esamina il comportamento di completamento e documentazione di TypeScript language-service coinvolto; il lavoro è completato quando tutte le proprietà del typedef compaiono durante la creazione dell’oggetto e il tipo può fornire dettagli utili di navigazione o al passaggio del mouse.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, typescript
- Ambito
- developer-experience, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100