ReviseAlgo Logo

Type System Deep Dive

Intersection Types

Master Intersection Types (&) in TypeScript, combining multiple type definitions into a single unified type, conflict resolution, and composition patterns.

Last Updated: July 29, 2026 10 min read

An Intersection Type combines multiple types into a single type using the ampersand (&) operator. An object of an intersection type must satisfy ALL combined types simultaneously.

1. Syntax & Core Concept

2. Property Conflicts in Intersections

If two intersected types define the exact same property key with incompatible primitive types, the resulting property type evaluates to never.

3. Mixin / Composition Pattern with Intersections

Intersection types are widely used to compose reusable object traits without deep OOP inheritance trees:

4. Interactive Code Playground

Test intersection types below:

5. Summary Table

FeatureUnion Types (\)Intersection Types (&)
LogicOR (Satisfies at least one arm)AND (Must satisfy ALL arms)
Object Members AccessibleCommon properties onlyALL combined properties
| Primary Use Case | Polymorphic state, variations | Composition, mixins, trait merging |