TS2554: Expected N arguments, but got M - in CI
You called a function with more or fewer arguments than its signature allows.
What this error means
Type-checking fails with TS2554 stating the expected and actual argument counts.
tsc
src/api.ts(22,5): error TS2554: Expected 2 arguments, but got 1.Common causes
How to fix it
Pass the required arguments
- Supply every required argument the signature expects
ts
fetchUser(id, { signal })Make a parameter optional or defaulted
- If the parameter is genuinely optional, mark it with ? or give a default
ts
function fetchUser(id: string, opts?: Options) {}How to prevent it
- Keep call sites in sync with signatures and run tsc --noEmit in CI to catch arity changes early.
Related guides
TS2345: Argument is not assignable - in CIFix "error TS2345: Argument of type 'X' is not assignable to parameter of type 'Y'" when tsc runs in CI - a t…
TS2769: No overload matches this call - in CIFix "error TS2769: No overload matches this call" when tsc runs in CI - arguments do not fit any of a functio…
TS2349: This expression is not callable - in CIFix "error TS2349: This expression is not callable" when tsc runs in CI - calling a value whose type has no c…