Commit 372c7d9
authored
infer from usage JSDoc:Don't emit nested comments (#28161)
* infer from usage JSDoc:Don't emit nested comments
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*/
*/
```
* Remove misleading comment used for debugging.1 parent 14c328e commit 372c7d9
2 files changed
Lines changed: 27 additions & 1 deletion
File tree
- src/services/codefixes
- tests/cases/fourslash
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
0 commit comments