Skip to content
0:00 / 0:00

#typescriptgenerics#generics#typescript

Generics: The most intimidating TypeScript feature

Matt Pocock

429K subscribers • 8 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Matt Pocock, creator of Total TypeScript

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 Outro

Why it's here

1 person recommends this

What people say. Recommended as an excellent, clear tutorial for mastering TypeScript generics.

u/kekingin r/typescript • Recommends

10 Tips for Mastering TypeScript Generics - Matt Pocock