If I have a JavaScript function that takes an object as a parameter, I can describe the expected properties of the object using JSDoc as follows:
function foo(bar) { return bar.baz + bar.qux; }
How can I describe these properties if I define my function with ECMAScript 6 destructuring without giving the real parameter object a name at all?
const foo = ({ baz, qux }) => baz + qux;
source share