2017-09-27 68 views
0

我正在用Mac上的Visual Studio Code编写Javascript。如何使用Visual Studio Code的Intellisense查看函数的文档?

我有这个功能,在JSDoc格式记录:

/** 
* Adds the passed Matter Body to the simulation. 
* @param {Matter.Body} body - The body to add to the physics simulation 
* @param {string} imageUrl - The URL of the image to use to represent this body in the simulation. It should match an image URL that has already been added via loadImages() 
* @param {function} [onCollide] - Optional function to call when this body collides 
*/ 
addObject(body, imageUrl, onCollide) { 

然而,当智能感知提示弹出它看起来像这样:

enter image description here

这一切都混乱了,不显示完整的文档。是否有某种组合键需要按下才能在工具提示中显示完整的功能文档?

+0

Alt + F12偷看对象定义......这是你的意思吗? – ifconfig

回答

0

事实上,它从来不会,但这样做的目的:

在这一事实的原因,你就还没有定义的参数,你可以看到第一个参数的文档。

如果你写/定义的第一个参数和一个逗号太多,你可以读到第二个的文档,...

这是一个类似的行为与C# - 方法。

试试看...

相关问题