TypeScript / JavaScript - IntelliSense - Improve JSDoc display for overloaded functions, including ones overloaded with @overload
#55056
Labels
Experience Enhancement
Noncontroversial enhancements
Help Wanted
You can do this
Suggestion
An idea for TypeScript
Milestone
function
keyword, no description is borrowed from the definition when displaying JSDoc information for the overloads. And when hovering over the function definition, the JSDoc of the first overload is displayed.@overload
tag, no JSDoc information is displayed whatsoever despite the overloads clearly being recognized (function signature and property suggestions use the infromation from overloads' docs).@link
, the link displayed ends up leading to the first function declaration instead of its definition, which would be way more appropriate. For example, one might want to store the function in a new variable and use@see
with@link
over that variable's declaration to make it possible to find the function code and documentation by following the link. It does not make sense that the user ends up seeing one of the ovarloads just because it happens to be the first one.I also notice now there was an error in
@implements
, but it is gone now and I cannot reproduce it :(Summary of feature requests
@overload
@link
s lead to function definition instead of first declaration@link
/@implements
/ possibly other JSDoc tags used with imported typesExample code
Download code at ts-intellisense-jsdoc-overload.
function.ts
function.js
index.d.ts
method.ts
method.js
The text was updated successfully, but these errors were encountered: