【发布时间】:2017-02-09 01:29:01
【问题描述】:
有没有办法让光标移动到x:10, 上时,会显示Point.prototype.x 的JSdoc。目标是拥有与我将鼠标悬停在 pt.x 上时相同的 JSdoc。
如果当前版本的 Visual Studio Code 无法实现,是否可以通过编写我自己的扩展来实现?如果有,vscode 命名空间 API 的哪一部分与此相关?
class Point {
/** The x property */
x:number;
/** The y property */
y:number;
}
/** Prints a point.
* @param pt The point
*/
function printPoint(pt:Point){
console.log(pt.x,pt.y);
}
printPoint(<Point>{
x:10,
y:10,
});
let pt = new Point();
pt.x;
【问题讨论】:
标签: typescript visual-studio-code jsdoc vscode-extensions