microsoft / microsoft/TypeScript

Hover documentation for typescript uses jsdoc rules and not tsdoc

Offen
#61,603 8 Kommentare 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Awaiting More Feedback Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

- VS Code Version: 1.99.3
17baf841131aa23349f217ca7c570c76ee87b957
x64
- OS Version: N/A (happens on all)

Steps to Reproduce:

1. Write some typescript code and use the syntax required by tsdoc
2. Observe that hover documentation and highlighting completely ignore tsdoc and instead assume parity with jsdoc
3. Cry in pain as you realize that despite being written in typescript, VSCode has shoddy typescript support

Examples:

Thinking that the [mandatory hyphen](https://tsdoc.org/pages/tags/param/) after a parameter name is a markdown hint for a bullet point
![Image](https://github.com/user-attachments/assets/bbe5ae33-38e6-42dc-a00e-98e163313c33)

Not recognizing the `@defaultValue` tag, and assuming `@default` and `@defaultvalue`

![Image](https://github.com/user-attachments/assets/9c34bfaf-e412-429b-9d27-6ee7b7c19107)

Not understanding [`@remarks`](https://tsdoc.org/pages/tags/remarks/), which is marked as [core](https://tsdoc.org/pages/spec/standardization_groups/), meaning you are expected to recognize it

Not providing hover for `@typeParam`
 ![Image](https://github.com/user-attachments/assets/82c94ee5-44a5-47fb-a7c6-e42740205fd0)

(The list goes on...)

Also, this last remark isn't a bug, but it would be really, _really_ great if you would support [`@inheritDoc`](https://tsdoc.org/pages/tags/inheritdoc/) for hover.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie damit, die aufgeführten TSDoc-Beispiele in VS Code 1.99.3 zu reproduzieren, und vergleichen Sie den Hover-Text und die Hervorhebung mit den verknüpften TSDoc-Regeln. Verfolgen Sie anschließend den TypeScript-Pfad für Hover-Dokumentation, der JSDoc-Tags verarbeitet, und überprüfen Sie dann, dass zentrale Tags wie @param, @defaultValue, @remarks und @typeParam mit der erwarteten Formatierung erkannt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
developer-experience
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

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