TypeScript - passing generics to generics

Functions can do this;
const myFunction = (arg) => /*...*/

const otherFunction = (arg, fn) => fn(arg)
const myFunction = (arg) => /*...*/

const otherFunction = (arg, fn) => fn(arg)
Can types do a similar thing?
type myType<T> = /*...*/

type otherType<T, Generic> = Generic<T>
type myType<T> = /*...*/

type otherType<T, Generic> = Generic<T>
If so, what's the correct syntax? I keep getting the error Type 'Generic' is not generic. ts(2315) I guess what I want to do is effectively a callback via generics.
0 Replies
No replies yetBe the first to reply to this messageJoin