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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With