You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, parameters with names that were not `new` were treated like
rest parameters. This is incorrect: parameters with the name `this`
should emit a `this` parameter.
Fixes#38550
* Fix this parameter emit for JSDocFunction types
Previously, parameters with names that were not `new` were treated like
rest parameters. This is incorrect: parameters with the name `this`
should emit a `this` parameter.
Fixes#38550
* ❤️ quote style
TypeScript Version: 4.0.0-dev.20200512
Search Terms: jsdoc, declaration, varargs
Code
clazz.js
:tsconfig.json
:Expected behavior:
The emitted declaration file is:
Actual behavior:
Subsequent usages of a composite project break, as
args
is duplicated in the method argument types.Note that removal of
this:Object
fixes the issue. Also, the following properly emits:Note here that the
T
is unused in the function, but it fixes the emitted declaration file.Playground Link:
Related Issues: #38242 (we are successfully able to compile DevTools with the above workaround and the fix for #38242)
The text was updated successfully, but these errors were encountered: