microsoft / microsoft/TypeScript
TypeScript: JSDoc tooltips are shared between types and values, but not functions
未关闭
还没有人认领这个 Issue。
Experience Enhancement
Suggestion
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
TS Template added by @mjbvz
TypeScript Version: 4.2.4
Search Terms
- quickinfo
- jsdoc
Issue Type: Bug
Steps to reproduce
- Create a TypeScript file.
- Create a type alias with some name, and write a JSDoc comment for it.
- For types and functions:
- Create a function with the same name, write a different JSDoc comment.
- Hover over the type name. You will see the function’s comment, followed by the type’s comment.
- Hover over the function. You will only see the function’s comment.
- For types and values:
- Create a value identifier with the same name, write a different JSDoc comment.
- Hover over the type name. You will see the type’s comment, followed by the value’s comment.
- Hover over the value identifier. You will see the type’s comment, followed by the value’s comment.
Reference file
/** A */
type X = null
/** B */
let X = null
/** C */
type Y = null
/** D */
function Y() {}
Screenshots




System and version info
VS Code version: Code - Insiders 1.56.0-insider (0123d26aaa393bccf99f31f1eac07df6c9e218ce, 2021-04-29T05:12:38.091Z)
OS version: Linux x64 5.11.0-7614-generic
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 x 2300) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on rasterization: disabled_software skia_renderer: enabled_on video_decode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 7.64GB (0.18GB free) |
| Process Argv | --no-sandbox --unity-launch --crash-reporter-id dbbd25fe-3f4e-426a-9c89-45e060834124 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | pop |
| XDG_CURRENT_DESKTOP | Unity |
| XDG_SESSION_DESKTOP | pop |
| XDG_SESSION_TYPE | x11 |
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先复现参考 TypeScript 文件,并比较类型/值对与类型/函数对的 quickinfo 结果。跟踪这些悬停提示所涉及的 quickinfo 和 JSDoc 处理,然后为预期的工具提示注释添加回归覆盖,并验证每个声明都显示相应的文档。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- compilers
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 50/100