TS doesn't support higher order types. You can't return a generic and pass its parameters later. It's basically only a single level of parametrization.
```
type MyGeneric<TParam> = ...;
type HigherOrderGeneric<TParam> = TParam extends string ? MyGeneric : never;
type Hey = HigherOrderGeneric<string><number>;
```
There are libraries that try to achieve this through some hacks, tho their ergonomics are really bad.
TS doesn't support higher order types. You can't return a generic and pass its parameters later. It's basically only a single level of parametrization.
``` type MyGeneric<TParam> = ...; type HigherOrderGeneric<TParam> = TParam extends string ? MyGeneric : never;
type Hey = HigherOrderGeneric<string><number>;
```
There are libraries that try to achieve this through some hacks, tho their ergonomics are really bad.