# TS2493: Tuple type '…' of length '…' has no element at index '…'.

> A tuple is indexed past its last element. Use an index that exists, or change the tuple type to include the element.

## What it means

A tuple type has a fixed length. Reading a constant index that is beyond that length can only
give `undefined`, so it is reported.

## Example

```ts
const point: [number, number] = [1, 2];
export const z = point[2];
```

## How to fix

- Use an index within the tuple's length.
- If the element can exist, add it to the type: `[number, number, number?]`.
- Use an array type (`number[]`) if the length really varies.

Source: https://ts-r.dev/errors/TS2493/
