TypeScript's infer keyword is MUCH narrower, much less widely used than you think it is. It has ONE use case, and we cover it in a ridiculous amount of depth here.
Become a TypeScript Wizard with Matt's upcoming TypeScript Course:
https://www.totaltypescript.com/
Follow Matt on Twitter
https://twitter.com/mattpocockuk