DEV Community

Discussion on: TypeScript function overloads

Collapse
 
b2whats profile image
Akimov Vladimir

heh, not work without args type bit.ly/arrowOverload

Collapse
 
captweiss profile image
Capt. Weiss (Kolade O. Adetoyinbo) • Edited

yeah that's true, but you can get it all working by simply casting the return value type to any
like this

Collapse
 
szulcus profile image
Jakub Schulz • Edited

Sad that it doesn't support union types 😥. Is using @ts-expect-error as a workaround in your opinion a good solution?