TypeScript · Types that pay for themselves

What are intersection types?

Mediumintersectionscompositiontype-systemUpdated Oct 2026
Quiz this track

Short answer

An intersection type combines several types into one that must satisfy all of them. It is useful for composing object shapes, but conflicting property types collapse to never.

An intersection is written with the ampersand. A value of type A & B must be assignable to both A and B, so it has every member of both. This is useful for adding small capabilities to a base shape without creating a new inheritance hierarchy.

ts
type Timestamped = { createdAt: Date };
type Owned = { ownerId: string };

type Draft = Timestamped & Owned & {
  title: string;
};

const draft: Draft = {
  createdAt: new Date(),
  ownerId: "u1",
  title: "Release notes",
};

Where intersections help

  • Composing reusable capability types such as timestamps and ownership
  • Combining a base object type with a small extension
  • Expressing that a value satisfies several interfaces at once
  • Building mapped and conditional types from smaller pieces

Intersections are not the same as interfaces extending each other, although the resulting object shapes can look similar. An intersection is a type expression; an interface extension is a declaration relationship. For a public object contract with methods and documentation, an interface is often easier to read.

If two intersected types declare the same property with incompatible types, that property becomes never and the type cannot be satisfied. Keep intersected shapes compatible.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What happens when two intersected types have conflicting properties?
  2. 2How is an intersection different from interface inheritance?
  3. 3When would you compose types with intersections?
  4. 4Can you intersect a union with an object type?

Say it in the interview

An intersection combines types, and the result must satisfy all of them. I use it to compose small object shapes, such as adding timestamps or ownership to a record. If two intersected types declare the same property with incompatible types, that property becomes never and the type is usually unusable. So I keep intersected shapes compatible and prefer interfaces or extends when the relationship is hierarchical.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live TypeScript mock interview and get scored feedback on depth, clarity and confidence.