Generics and Advanced Types
TypeScript's type parameters allow types to be defined in terms of other types, similar to how a function's arguments can be used to parameterize its return value. We'll look closely at cases where this kind of abstraction is appropriate, and highlight a few advanced examples to get a glimpse at how capable the TS type system is.
-
Generics and Advanced TypesLunch
Break for Lunch
-
Generics and Advanced TypesGenerics
Generics allow types to be defined in terms of other types, similar to how a function's arguments can be used to parameterize its return value. We'll look in depth at type parameters, how to identify appropriate opportunities for use, how to appropriately constrain them and more!
-
Generics and Advanced TypesGuards and Extreme Types
We'll explore TypeScript's "top" and "bottom" types in detail, and explore how they can be used in conjunction with type guards to "narrow" for based on a condition.
-
Generics and Advanced TypesAdvanced Types
We'll apply what we've learned so far to write some utility types that are tricker and more involved, making used of mapped types, indexed access types, type queries, conditional types and more!