microsoft / microsoft/TypeScript

Hover documentation for typescript uses jsdoc rules and not tsdoc

未关闭
#61,603 8 条评论 5 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Awaiting More Feedback Suggestion
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

- 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先在 VS Code 1.99.3 中复现列出的 TSDoc 示例,将悬停文本和高亮显示与链接的 TSDoc 规则进行比较。跟踪处理 JSDoc 标签的 TypeScript 悬停文档路径,然后验证 @param、@defaultValue、@remarks 和 @typeParam 等核心标签是否以预期的格式得到识别。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
developer-experience
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。