Skip to content

Conversation

sandersn
Copy link
Member

Previously, the trivia on a parameter name would show up inside the
emitted JSDoc comment. If the trivia contained a C-style comment, the
emitted JSDoc comment would be invalid. For example:

function call(callback /*oh no*/) {
  return callback(this)
}

Emitted this comment:

/**
 * @param {(arg0: any) => void} callback /*oh no*/
 */

Fixes #28143

Previously, the trivia on a parameter name would show up inside the
emitted JSDoc comment. If the trivia contained a C-style comment, the
emitted JSDoc comment would be invalid. For example:

```js
function call(callback /*oh no*/) {
  return callback(this)
}
```

Emitted this comment:

```js
/**
 * @param {(arg0: any) => void} callback /*oh no*/
 */
```
@sandersn sandersn merged commit 372c7d9 into master Oct 26, 2018
@sandersn sandersn deleted the infer-from-usage/dont-emit-nested-comments branch October 26, 2018 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants