Skip to content
AgileLogics
3 min read

Intersection Types

Prerequisites: Interfaces vs. type aliases

An intersection type (&) combines several types into one that must satisfy all of them at once — the opposite of a union, which needs only one.

type Named = { name: string };
type Aged = { age: number };
type Person = Named & Aged; // must have both name AND age

const ada: Person = { name: "Ada", age: 25 };

Useful for composing several smaller, focused shapes into one larger one, instead of repeating shared fields across several interfaces.