Closed as not planned
Description
π Search Terms
jsdoc, ts8032, destructuring, object
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about jsdoc
β― Playground Link
π» Code
/**
* Foo.
*
* @param {object|boolean} bar Bar.
* @param {string} [bar.baz] Baz.
*/
const foo = (bar) => {
console.log(bar);
};
foo(true);
foo({ baz: "qux" });
π Actual behavior
Qualified name 'bar.baz' is not allowed without a leading '@param {object} bar'.
π Expected behavior
No error.
Additional information about the issue
When JSDoc describes a parameter with an object or another type (eg. {object|boolean}
): it's not possible to describe object properties.