Microsoft/TypeScript

JSDoc tags not parsed when a type may be present

開放

#62,244 建立於 2025年8月9日

 (2 則留言) (1 個反應) (0 位負責人)TypeScript (13,395 個分叉)batch import
BugDomain: JSDocHelp Wanted

倉庫指標

星標
 (108,860 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

🔎 Search Terms

jsdoc links missing in possible type position

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about JSDoc

⏯ Playground Link

https://www.typescriptlang.org/play/?#code/MYGwhgzhAEDC0G8BQBfJB6AVJp1PQAEAXACwCcB7AdxgQJAEsA7AazjT3SQDMBXJ4EQYUm0LJnSxYACgCUiVEA

💻 Code

class C {
}
/**
 * @throws {@link C}
 */
function /**/CC() {
}

🙁 Actual behavior

TypeScript does not resolve {@link C}.

Hover on the playground shows:

@throws — {
@link — C}

🙂 Expected behavior

TypeScript should resolve {@link C}

Hover on the playground should show this (or even better rendered links like it does in vscode)

@throws — {@link C }

Additional information about the issue

Originally reported in https://github.com/TypeStrong/typedoc/issues/2993

貢獻者指南