intellisense for JSDocs on function overloads without needing to duplicate the JSDoc #51005
Closed
5 tasks done
Labels
Duplicate
An existing issue was already created
Uh oh!
There was an error while loading. Please reload this page.
Suggestion
π Search Terms
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
When you have a really long JSDoc that describes a function (say 10+ lines) and you need 3~4 function overloads for that function. The only way to properly have the JSDocs show up on all overload cases when you actually import and use the function is to duplicate the JSDocs for each single function overload...
FR: We need VSCode intellisense for our JSDocs to show up on ALL function overloads without needing to duplicate the JSDocs on every overload.
π Motivating Example
Here is a very common example I use countless of times throughout my code where an object that's potentially
undefined
is parsed in a function, but when we know the payload is not undefined we want to make sure the return type is also not.A perfect use-case for function overloads! But then comes your detailed JSDoc and it will look like this:
π» Use Cases
Use case explained in the previous section.
Conclusion
We need VSCode intellisense for our JSDocs to show up on ALL function overloads without needing to duplicate the JSDocs on every overload.
The text was updated successfully, but these errors were encountered: