TypeScript card reviewmedium
What is the difference between Interface and Type Alias in TypeScript?
Both interfaces and type aliases are used to define custom types. Interfaces are primarily used for object structures and support declaration merging. Type aliases are more flexible because they can represent unions, intersections, primitives, and complex types. Interfaces are generally preferred for defining object contracts, while type aliases are useful for advanced type compositions.