我在Mac上用Visual Studio Code编写Javascript。
我有这个函数,以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) {
但是,当Intellisense工具提示弹出时,它看起来像这样:
这一切都混乱了,没有显示完整的文档。我需要按某种键组合来显示工具提示中的完整功能文档吗?
事实上它永远不会,但这是有意的:
事实上,您还没有定义参数,您可以阅读有关第一个参数的文档。
如果您已经编写/定义了第一个参数和逗号,那么您可以阅读有关第二个参数的文档,...
这与c#-methods的行为类似。
试试看...