2017-09-27 49 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# - 方法。

試試看...

相關問題