How 2 TypeScript: Serious business with TypeScript's infer keyword.

added by JavaScript Kicks
9/3/2018 8:40:16 AM

610 Views

Hey you! Do you want to get the return type of a function and use it, without knowing what it really is, or asking the user of your thing to supply it outright? Of course you do. Conditional types in typescript allow you to introduce type variables into the expression in a rather dynamic way.


0 comments