Say I have an interface
interface Applicative<T> {}
Now I want to define a function f
that:
How do I define this in Typescript ?
function f<U extends Applicative>(fn: Function, a: U<any>): U<Function>
is my naive attempt but this is not valid
Unfortunately, typescript does not (yet?) implement higher kinded types.
See https://github.com/Microsoft/TypeScript/issues/1213 for details
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments