Skip to main content
A type alias in TypeScript is a declaration that assigns a custom identifier to a specific type structure. Rather than creating a distinct new type in the type system, it establishes a symbolic name that the TypeScript compiler resolves to the underlying type definition during static analysis.
Type aliases can represent any valid TypeScript type expression. This includes primitives, complex object shapes, unions, intersections, tuples, and function signatures.

Generics

Type aliases fully support generic type parameters, allowing for the creation of parameterized, reusable type definitions. The generic parameters are passed inside angle brackets <> immediately following the alias identifier.

Recursion

Type aliases can be self-referential (recursive) to represent infinitely nested structures. The TypeScript compiler permits this as long as the recursive reference is deferred, typically by being nested within an object property or an array type.

Structural Constraints

A defining mechanical characteristic of a type alias is that it is closed upon declaration. Unlike interfaces, type aliases do not support declaration merging. Attempting to declare multiple type aliases with the exact same identifier within the same module scope will result in a Duplicate identifier compiler error.
Furthermore, when a type alias is used in an error message or IDE hover tooltip, TypeScript will often expand the alias to its underlying type structure, demonstrating that the alias is purely a developer-facing syntactic convenience rather than a nominal type boundary.
Tired of Poor TypeScript Skills? Fix That With Deep Grasping!Learn More