Phase 7 · TypeScript

Topics

Intersection

Part of the Frontend Developer Roadmap.

Summary

A type formed by combining multiple types with `&`, meaning a value must satisfy all of the combined types at once.

How to Learn This

  • 1Combine two interfaces (e.g. `Timestamped & Named`) using an intersection type.
  • 2Compare intersection types to interface extension — often interchangeable.
  • 3Notice how conflicting property types in an intersection resolve to `never`.
InsideEdge

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.

Download
InsideEdge