# TS2554: Expected … arguments, but got ….

> A function is called with a different number of arguments than it declares. Pass the parameters it expects, or make extra ones optional.

## What it means

The call has more or fewer arguments than the function's parameter list allows. Optional
parameters and parameters with defaults may be left out; required ones may not, and extra
arguments aren't allowed without a rest parameter.

## Example

```ts
function add(a: number, b: number): number {
  return a + b;
}
export const sum = add(1);
```

## How to fix

- Pass the missing arguments, or remove the extra ones.
- Make a parameter optional (`b?: number`) or give it a default (`b = 0`) if it can be left out.

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