Microsoft/TypeScript

JSDoc tags not parsed when a type may be present

Open

#62,244 创建于 2025年8月9日

在 GitHub 查看
 (2 评论) (1 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: JSDocHelp Wanted

仓库指标

Star
 (48,455 star)
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

贡献者指南