microsoft / microsoft/TypeScript

TypeScript: JSDoc tooltips are shared between types and values, but not functions

Offen
#43,889 10 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Experience Enhancement Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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

vscode-jsdoc-issue-type-x
vscode-jsdoc-issue-let-x
vscode-jsdoc-issue-type-y
vscode-jsdoc-issue-function-y

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
Extensions: none

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Referenz-TypeScript-Datei zu reproduzieren, und vergleiche die Quickinfo-Ergebnisse für das Typ/Wert-Paar mit denen für das Typ/Funktions-Paar. Verfolge anschließend die an diesen Hovers beteiligte Quickinfo- und JSDoc-Verarbeitung, füge dann Regressionstests für die erwarteten Tooltip-Kommentare hinzu und überprüfe, dass jede Deklaration die entsprechende Dokumentation anzeigt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
compilers
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
50/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.