问题
I'm writing Javascript with Visual Studio Code on a Mac.
I have this function, documented in JSDoc format:
/**
* 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) {
However, when the Intellisense tooltip pops up it looks like this:
It's all jumbled up and not showing the full documentation. Is there some sort of key combo I need to press to display the full function documentation in the tooltip?
回答1:
In fact it never does, but this is intended:
In cause of the fact, that you don’t have a parameter defined yet, you can read the doc about the first parameter.
If you had written/defined the first parameter and a comma too, you could read the doc about the second one,...
It’s a similar behavior as with c#-methods.
Give it a try...
来源:https://stackoverflow.com/questions/46457873/how-do-you-view-a-functions-documentation-with-visual-studio-codes-intellisens