Microsoft/TypeScript

Syntax highlighting can not resolve @throws of tsdoc

Open

#58,599 opened on 2024年5月21日

GitHub で見る
 (3 comments) (5 reactions) (0 assignees)TypeScript (6,726 forks)batch import
BugDomain: JSDocHelp Wanted

Repository metrics

Stars
 (48,455 stars)
PR merge metrics
 (平均マージ 6d 17h) (30d で 9 merged PRs)

説明

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:

Item Value
CPUs Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz (6 x 3000)
GPU Status 2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: 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%

コントリビューターガイド