Introduction

This chapter walks through several advanced types and concepts in TypeScript.

We’ll start with conditional types. After a detailed introduction, we’ll look at built-in conditional types and their implementations. This will provide us with great learning material to properly understand the concept.

Next, we’ll talk about mapped types. Again, we’ll go through the built-in types and learn some of their useful applications.

Next, we’ll cover type guards, mechanisms for type-safe type narrowing. We’ll learn how to build our own guards.

The chapter ends with a lesson about nominal types, a very useful tool that isn’t part of TypeScript but can be emulated easily.

Get hands-on with 1200+ tech skills courses.