-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
Say I have an interface
interface Applicative<T> {}
Now I want to define a function f that:
- takes a
Function
and takes a typeU
extending anApplicative
wrappingany
- returns an
U
wrappingFunction
My naive attempts were
function f<U extends Applicative>(fn: Function, a: U<any>): U<Function>
and
function f<T, U<T> extends Applicative<T>>(fn: Function, a: U<any>): U<Function>
but none is valid
Can we have a Generic extend a type with a generic ?
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created