Help me type this function
I have a function that takes in an input function and returns another function who's input is the same type as the function passed into it.
However, I want the return function type to either require or not require
input
based on if callback
has a parameter or not. How would I do this?4 Replies
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
thanks homie
Hmm, so this works with the spread args but not for explicitly declaring args.
For example,
TS Playground - An online editor for exploring TypeScript and JavaS...
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
Hey just wanted to say I finally got around to using this and it worked great. So thank you ❤️ @CaptainStarz