TypeScript
TypeScript TuplesTypeScript Tuples
Tuples are arrays with a fixed length and strict types.
Read Time
5 min readDifficulty
BeginnerLast Updated
Jun 15, 2026Version
v1.0.0Introduction
A standard array in TypeScript can hold as many items as you want. A Tuple is a strict array where you define exactly how many items it holds, and exactly what type of data belongs in each specific slot.
Example
Example
Key Points
- Define a Tuple using square brackets `[type1, type2]`.
- The order of the data must match the definition exactly.
- They are commonly used in React Hooks (like `useState`).
- You cannot add extra items beyond the defined length.