TypeScript interface vs type: Differences, Declaration Merging and When to Use Each (Tested Examples)
Interfaces and type aliases both describe object shapes, but only interfaces merge and only type aliases can name unions, tuples and mapped types. Here are the real differences, with compiler errors from TypeScript 7.0.2 and 5.9.3, and a simple rule for choosing.