如何使用Visual Studio Code的Intellisense查看函数的文档?

问题描述 投票:0回答:1

我在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工具提示弹出时,它看起来像这样:

enter image description here

这一切都混乱了,没有显示完整的文档。我需要按某种键组合来显示工具提示中的完整功能文档吗?

javascript visual-studio-code jsdoc
1个回答
0
投票

事实上它永远不会,但这是有意的:

事实上,您还没有定义参数,您可以阅读有关第一个参数的文档。

如果您已经编写/定义了第一个参数和逗号,那么您可以阅读有关第二个参数的文档,...

这与c#-methods的行为类似。

试试看...

© www.soinside.com 2019 - 2024. All rights reserved.