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
{{ message }}
Repository navigation
@description JSDoc tag interferes with callback parameter documentation #37346
Expected behavior:
Below code creates no errors, type of x is recognized as (value: number) => boolean
Actual behavior:
Type of x is () => boolean, the invocation creates a type error.
Removing the @description tag makes the code work as expected.
My interpretation of https://jsdoc.app/tags-description.html is that you should be able to place @description anywhere in the comment without interfering with other tags:
By using the description tag, you can place the description anywhere in the JSDoc comment.
Related Issues: Ran into a crash #37265 while trying to repro this with template parameters.
Code
// @ts-check/** * @callback IterablePredicate * @description return true if given element of iterable matches an internal condition * @param {number} value the current item being evaluated * @returns {boolean} true if the entry satisfies given condition **//** * @type {IterablePredicate} */letx;x(3)// Expected 0 arguments, but got 1.
Activity