microsoft / microsoft/TypeScript
Intellisense behaviour of functions and parameters
还没有人认领这个 Issue。
- 主要语言
- Go
- 星标
- 111k
- 派生
- 14.3k
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 132
描述
Some odd/unintuitive Intellisense behaviour:
/**
* Function description A
* @param name Parameter description A
*/
function uniqueName(name: string): string {
}
export const Uid = {
/**
* Function description B
* @param name Parameter description B
*/
uniqueName
};
The intellisense description for the 'Uid.uniqueName' property is now description B, however the intellisense for the parameter is description A. There isn't anything overriding here - the description of the function is always taken from the export, and the parameter description is always taken from the function definition. As such, I need to do the following to get full intellisense support for this pattern:
/**
* @param name Parameter description
*/
function uniqueName(name: string): string {
}
export const Uid = {
/**
* Function description
*/
uniqueName
};
i.e. function definitions in one place, parameter definitions in another place. I know I can work around this by restructuring the code, but it still feels like I should be able to achieve it in the above format.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件或测试。复现 issue 中的 TypeScript IntelliSense 示例,并跟踪导出属性和函数参数的文档是如何被选取的;完成的标准是,文档中的函数描述和参数描述都来自预期的声明,且不重构代码。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- compilers
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100