Skip to content
AgileLogics
4 min read

Interfaces vs. Type Aliases

Prerequisites: Interfaces, Type aliases

Both describe object shapes, and are interchangeable for most simple cases — the practical differences that matter:

  • Interfaces can be "reopened" — declaring interface User { } twice merges the two declarations. type cannot be redeclared.
  • Interfaces can extends another interface directly; type uses & (intersection) to combine shapes instead.
  • type can alias anything — unions, tuples, primitives — not just object shapes.

A common convention: prefer interface for object shapes (especially ones a library's users might extend), and type for unions, tuples, or anything that isn't a plain object shape.