You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write a function that accepts an object. Annotate the object parameter like this:
/** * My awesome function. * @param {{id: string, name: string}} object An object with an id and name field. */functionmyAwesomeFunction(object){const{ name, id }=object.// do stuff with name and id}
Observe that it doesn't get syntax highlighting like other jsdoc types.
Normally the type of a function parameter gets a brighter color. However, record types like the one above don't get this highlighting. I'm not sure if this is standard jsdoc, but it is supported by the Google Closure Compiler.
From @bschlenk on April 10, 2017 22:19
Steps to Reproduce:
Normally the type of a function parameter gets a brighter color. However, record types like the one above don't get this highlighting. I'm not sure if this is standard jsdoc, but it is supported by the Google Closure Compiler.
Copied from original issue: microsoft/vscode#24470
The text was updated successfully, but these errors were encountered: