u/kekingin r/typescript • Recommends
10 Tips for Mastering TypeScript Generics - Matt Pocock
#typescriptgenerics#generics#typescript
429K subscribers • 8 videos on Hallway
Intermediate. Assumes working knowledge.
240K views3 years ago1 recommendation
Programming languagesTypeScript
Matt Pocock explains how TypeScript generics work, from basic type arguments to constraints, defaults, and type inference.
Generics are a huge reason why TypeScript is SO DARN POWERFUL. Letting you create types from other types, pass types to functions, and even INFER those types without you needing to specify them. They're pretty advanced, though - so if you want to learn more advanced TypeScript, time to strap in. Become a TypeScript Wizard with Matt's TypeScript Course: totaltypescript.com/ Follow Matt on Twitter twitter.com/mattpocockuk Intro Generics on the type level Passing type arguments to functions Passing type arguments to Set Inferring the types Constraints on type arguments Constraints in functions Sometimes 'as' is fine Multiple type arguments Defaults in type arguments Integrating with third-party libraries OutroWhat people say. Recommended as an excellent, clear tutorial for mastering TypeScript generics.
u/kekingin r/typescript • Recommends