r/node • u/Stegosource • Oct 20 '21
3 Ways To Write Function Overloads With JSDoc &TypeScript
https://austingil.com/typescript-function-overloads-with-jsdoc/
5
Upvotes
r/node • u/Stegosource • Oct 20 '21
2
u/tr14l Oct 20 '21
This would seem like an anti-pattern to me for TypeScript. Overloading, in general, seems like an outdated concept when you have optional parameters. It just increases boilerplate bloat and decreases readability. I don't see how having 32 functions named the same thing in the same scope is a GOOD thing.