Search⌘ K
AI Features

Introduction

Understand how to compose new types from existing ones in TypeScript by using union and intersection types. Learn about discriminated unions and their application in expressing business rules and state machines. Compare discriminated unions with subtyping to decide the best modeling approach for your code.

We'll cover the following...

This is the most important chapter of this course. It will teach you how to create new types from existing types.

First, we look at the ...