Skip to main content
D
TypeScript
TypeScript Intersection Types

TypeScript Intersection Types

Intersection types smash multiple custom types into a single type.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

While a Union type is an "OR" statement, an Intersection type is an "AND" statement. It combines two completely separate interfaces or types together. The final variable must contain every single property from both original types.

Example

Example
1/* this combines types */
2interface ErrorHandling {
3  success: boolean;
4  error?: string;
5}
6
7interface ArtworksData {
8  artworks: { title: string }[];
9}
10
11type ArtworksResponse = ArtworksData & ErrorHandling;

Key Points

  • Use the ampersand symbol `&` to create an intersection.
  • It means "this AND that".
  • It is commonly used when combining data from multiple API responses.
  • If a property is missing, TypeScript throws an error.

Up Next

Continue your journey with the next topic.

Go to TS Generics