heavenshell / vim-jsdoc

Generate JSDoc to your JavaScript code.
BSD 3-Clause "New" or "Revised" License
452 stars 44 forks source link

ES6 Destructured Object Function Argument #67

Closed floscr closed 4 years ago

floscr commented 7 years ago

Hi,

Right now destructured function parameters are broken:

const obj = {
  a: 'a',
  b: 'b',
  other: '...',
}

/**
 * DocBlock
 *
 * @param {} {a
 * @param {} b}
 */
function objectAB ({ a, b }) {
  return a + b
}

objectAB(obj)

Of course this is a matter of opinion, but I think the spread object argument should be one parameter like

/**
 * DocBlock
 *
 * @param {obj} { a, b } Param Comment
 */
heavenshell commented 7 years ago

Thx for reporting. I'll look into it.

heavenshell commented 7 years ago

Still working this. But it too complecated... 😢

heavenshell commented 4 years ago

ver2.0.0 was released. This problem fixed