-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Functionand takes a typeUextending anApplicativewrappingany - returns an
UwrappingFunction
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