-
-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Labels
enhancementNew feature or requestNew feature or requestfeat/genericRelated to generic emulation featureRelated to generic emulation feature
Description
I have a function which accepts a generic function as its parameter. It does stuff with that function, then returns that function's return value(s) as its own. I would like for the returned properties to cascade from the generic function and propogate accordingly for type information.
In TypeScript, I would do:
const foo = <T extends Function>(func: T): ReturnType<T> => func(...)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeat/genericRelated to generic emulation featureRelated to generic emulation feature