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
There seems to be a regression since version 3.9.x where optional params in JSDocs are not converted correctly in declaration files. Several issues were created (linked below) and patches were made, however, it seems that params nested inside objects are still not correctly handled as optional when surrounded by brackets.
Expected behavior: (as well as actual behavior <=3.8.3)
declarefunctionfoo(opts: {bar?: string;}): void;
Actual behavior:
declarefunctionfoo(opts: {bar: string;}): void;
Related Issues: #39111 was addressed with #39487, but it doesn't seem that nested properties were covered in that fix. #39123 and #39457 seem to relate to Closure notation, not sure if they're related.
The text was updated successfully, but these errors were encountered:
TypeScript Version: 3.9.x & 4.1.x
Search Terms: jsdoc optional
There seems to be a regression since version 3.9.x where optional params in JSDocs are not converted correctly in declaration files. Several issues were created (linked below) and patches were made, however, it seems that params nested inside objects are still not correctly handled as optional when surrounded by brackets.
Code
Expected behavior: (as well as actual behavior <=3.8.3)
Actual behavior:
Related Issues:
#39111 was addressed with #39487, but it doesn't seem that nested properties were covered in that fix.
#39123 and #39457 seem to relate to Closure notation, not sure if they're related.
The text was updated successfully, but these errors were encountered: