Support of generic types as values of generic type params,
which support the G<infer F>
part:
type Unpacked<T, G> = T extends G<infer F> ? F: never
Related Links:
- Stack Overflow: https://stackoverflow.com/questions/64394190/how-to-have-a-generic-type-argument-be-itself-a-generic
- Logic about TS Conditional Types: https://artsy.github.io/blog/2018/11/21/conditional-types-in-typescript/
- Logic of TS 'infer' Keyword: https://blog.logrocket.com/understanding-infer-typescript/
- My Stackoverflow Answer for that topic: https://stackoverflow.com/questions/70472192/extract-first-generic-argument-from-type/73130427#73130427