DEV Community

Discussion on: Creating a typed "compose" function in TypeScript

Collapse
 
skurfuerst profile image
Sebastian Kurfürst

Hey Matt,

the only way I see it is via N+1 different generic types - though that is ofc. not as nice as your generic implementation.

See:

All the best, Sebastian

Thread Thread
 
stereobooster profile image
stereobooster

There is a way to simulate it, but wiht limitations github.com/reduxjs/redux/blob/686d...

Thread Thread
 
ascorbic profile image
Matt Kane

Yeah, I can't see any way that doesn't boil down to "use lots of repetitive overloads"