microsoft / microsoft/TypeScript
TypeScript: JSDoc tooltips are shared between types and values, but not functions
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 2g 4h
- PR unite (30g)
- 132
Descrizione
TS Template added by @mjbvz
TypeScript Version: 4.2.4
Search Terms
- quickinfo
- jsdoc
Issue Type: Bug
Steps to reproduce
- Create a TypeScript file.
- Create a type alias with some name, and write a JSDoc comment for it.
- For types and functions:
- Create a function with the same name, write a different JSDoc comment.
- Hover over the type name. You will see the function’s comment, followed by the type’s comment.
- Hover over the function. You will only see the function’s comment.
- For types and values:
- Create a value identifier with the same name, write a different JSDoc comment.
- Hover over the type name. You will see the type’s comment, followed by the value’s comment.
- Hover over the value identifier. You will see the type’s comment, followed by the value’s comment.
Reference file
/** A */
type X = null
/** B */
let X = null
/** C */
type Y = null
/** D */
function Y() {}
Screenshots




System and version info
VS Code version: Code - Insiders 1.56.0-insider (0123d26aaa393bccf99f31f1eac07df6c9e218ce, 2021-04-29T05:12:38.091Z)
OS version: Linux x64 5.11.0-7614-generic
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 x 2300) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on rasterization: disabled_software skia_renderer: enabled_on video_decode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 7.64GB (0.18GB free) |
| Process Argv | --no-sandbox --unity-launch --crash-reporter-id dbbd25fe-3f4e-426a-9c89-45e060834124 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | pop |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | pop |
| XDG_SESSION_TYPE | x11 |
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
Inizia riproducendo il file TypeScript di riferimento e confronta i risultati di quickinfo per la coppia tipo/valore con quelli per la coppia tipo/funzione. Traccia quindi la gestione di quickinfo e JSDoc coinvolta in questi hover, poi aggiungi una copertura di regressione per i commenti tooltip previsti e verifica che ogni dichiarazione mostri la documentazione appropriata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- compilers
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 50/100