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
Signature help shows no JSDoc for a const with a function type annotationΒ #64937
/** * Adds one to a number. * @param value The number to add one to. */declareconstaddOne: (value: number)=>number;addOne(1);// ^ trigger signature help here
π Actual behavior
Signature help shows addOne(value: number): number with no description and no documentation for value. Hover on addOne does show the JSDoc.
(Type ( in the playground to ensure JSDoc is shown for the parameter in TS 6)
π Expected behavior
Signature help shows "Adds one to a number." and "The number to add one to." for value, like 6.0.3 does.
Additional information about the issue
The same happens with an initializer, like const addOne: (value: number) => number = otherFunction.
(const addOne = (value: number) => value + 1 works: the docs come from the arrow function)
The change adds a fallback to retrieve JSDoc from the const declaration when it's missing from the candidate signature's declaration. I've also added a regression test, and the focused test passes.
Activity
MadalinWolf commentedon Oct 24, 2026
I've opened a PR to address this: [Fix signature help docs for const function types](https://github.com/MadalinWolf/TypeScript/pull/64949).
The change adds a fallback to retrieve JSDoc from the
constdeclaration when it's missing from the candidate signature's declaration. I've also added a regression test, and the focused test passes.Thanks for reporting this!