Given the following code, how do I properly document that using the latest JSDoc?
function docMe([foo, bar = null, baz = 1]) {
/* */
}
I have tried this:
/**
* @param {Array} options Array containing the options.
* @param {HTMLElement} options[0].foo An HTML element.
* @param {Object} [options[1].bar] An object.
* @param {Number} [options[2].baz] A number.
*/
Obviously this didn't work, and all that the JSDoc documentation mentions is how to document a destructured object parameter, not a destructured array parameter.