-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Description
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version:
- OS Version:
Steps to Reproduce:
- Go to vscode.dev
- Paste the following block of code
/**
* @param {Object} options the args object
* @param {number} options.alpha first number
* @param {number} options.bravo second number
* @param {Function} callback the callback function
* @returns {number}
*/
function addNumbersFromObject(options, callback = null) {
if (!callback) return options.alpha + options.bravo;
return callback();
}
- Hover the name of the function
addNumbersFromObject
with your mouse and wait until JSDoc render is displayed
Expected:
The render should display the Object properties of options
variable like the following image.
Actual:
The render does not display the Object properties of options
variable.
Tricky solution:
Just replace the type of options
variable in the JSDoc by any
or *
and it will display the Object properties in the render.
However, it will lose autocompletion inside code function when i'll try the access properties of options
variable and I don't want to lose this feature.
In order to have autocompletion, we need to use Object
type for options
variable in JSDoc like the following image.
Recap:
I wish to have at the same time fully JSDoc and autocompletion on an Object variable where I know some of its properties.
Thanks !