0Pricing
TypeScript Academy · Lesson

Intersection and Union Types

Understand how to combine multiple types into one using intersections and create flexible type options with unions.

1

Introduction to Intersection and Union Types

Intersection and union types in TypeScript allow you to combine or create flexible types, providing a powerful way to define complex data structures.

Intersection and Union Types — illustration 1

2

What are Union Types?

Union types allow a value to be one of several types. You can define a union type using the | operator.

All lessons in this course

  1. Keyof and Lookup Types
  2. Mapped Types
  3. Intersection and Union Types
← Back to TypeScript Academy