microsoft / microsoft/TypeScript

Syntax highlighting can not resolve @throws of tsdoc

Aperta
#58,599 3 commenti 5 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Bug Domain: JSDoc Help Wanted
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

Type: Bug

Syntax highlighting for typescript has problem for the function that has @throws .

TSDoc used @throws {@link IsbnSyntaxError} format but VSCode shows broken lint text with break-lines like below:

image

// from tsdoc sample: https://tsdoc.org/pages/tags/throws/
type Book = any;

/**
 * @throws {@link IsbnSyntaxError}
 * This exception is thrown if the input is not a valid ISBN number.
 */
function fetchBookByIsbn(isbnCode: string): Book {}

I thought vscode does not support tsdoc and using jsdoc but jsdoc does not shows correct info too. (this may be related with: https://github.com/microsoft/vscode/issues/135417 )

I expected it shows a link for the Type, at least shows as simple text without break-line.

I may have to report this on other project (TmLanguage? https://github.com/microsoft/TypeScript-TmLanguage/issues) but I did here from VSCode reporter anyway.

VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz (6 x 3000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.78GB (11.72GB free)
Process Argv --disable-extensions --crash-reporter-id ca2a1b94-1896-42fa-87dc-e58738a43fa3
Screen Reader no
VM 0%
Extensions disabled

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il problema con l’esempio TSDoc che usa @throws {@link IsbnSyntaxError} in VS Code 1.89.1. Inizia verificando se l’evidenziazione della sintassi è implementata nel progetto TypeScript-TmLanguage, come suggerisce il report, e confronta con issue #135417. Il lavoro è completato quando il tag viene visualizzato come un link o almeno come testo semplice non suddiviso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
28/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.