# TS2556: A spread argument must either have a tuple type or be passed to a rest parameter.

> An array is spread into a call where it would fill fixed parameters. Spread a tuple type, or give the function a rest parameter.

## What it means

Spreading `...args` into a call is only checked when the checker knows how many elements it has
(a tuple type) or when it lands in a rest parameter. Spreading an array of unknown length into
fixed parameters is reported.

## Example

```ts
function move(x: number, y: number): void {}
const coords = [1, 2];
move(...coords);
```

## How to fix

- Give the array a tuple type: `const coords: [number, number] = [1, 2]` or `[1, 2] as const`.
- Or give the function a rest parameter: `function move(...xy: number[])`.

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