Advanced Types
We've already learned about a fair amount of the type system in TypeScript. In this chapter, we'll continue on this journey, this time diving into some of the more advanced types and concepts that will help us later in the book to create reusable strongly type React components.
We'll learn about how we can combine existing types to create union type. We'll find out in Chapter 8, React Redux, that these types are fundamental to creating strongly typed React Redux code.
We briefly covered type guards in Chapter 2, What is New in TypeScript 3, when we learned about the unknown type. We look at these in more detail in this chapter.
Generics are a TypeScript feature that many libraries use to allow consumers to create strongly ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access