Handle @typedef tag with missing type#18662
Conversation
7867b49 to
3c7cd55
Compare
| "category": "Error", | ||
| "code": 8020 | ||
| }, | ||
| "JSDoc @typedef tag should either have a type annotation or be followed by @property or @member tags.": { |
There was a problem hiding this comment.
A JSDoc '@typedef' tag...by '@property' or '@member' tags.
031b2be to
abf0d3e
Compare
| case SyntaxKind.JSDocTypedefTag: | ||
| return checkJSDocTypedefTag(node as JSDocTypedefTag); | ||
| case SyntaxKind.JSDocComment: | ||
| return checkJSDocComment(node as JSDoc); |
There was a problem hiding this comment.
This looks like it duplicates the new jsdoc-checking loop. Or perhaps this entry is now unneeded.
sandersn
left a comment
There was a problem hiding this comment.
Should be good once you investigate performance and whether the existing jsdoc handling in checkSourceElement is superseded.
|
To fix #15852, you'll also need binding, which means that you'll likely only be able to fix it for .js. Which is probably fine. |
|
I ran performance tests and got little difference in compile times. (-0.16%, +0.68%, -0.99%, -1.01%, +0.97%, +1.60%) |
|
@sandersn Good catch, there was redundant code checking jsdoc specifically for functions/methods. |
Fixes #18637
I'll have to test tomorrow if starting to check jsdoc is hurting performance. But we'll need it to fix issue #15852.