Skip to main content
D
TypeScript
TypeScript Type Aliases

TypeScript Type Aliases

Type Aliases create custom names for any data type.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

Sometimes writing out complex types gets repetitive and messy. A Type Alias lets developers create a brand new custom name for a specific type or combination of types. It works exactly like a variable, but for types instead of data.

Example

Example
1/* this creates a custom type */
2type Score = number;
3
4let currentScore: Score = 50;
5let topScore: Score = 100;

Key Points

  • Use the `type` keyword to create an alias.
  • They work for primitives, arrays, and objects.
  • They keep code highly readable.
  • They are very similar to Interfaces, but more flexible.

Up Next

Continue your journey with the next topic.

Go to TS Union Types