Error AtlasError Documentation and Resolution

TypeScript found the wrong number of arguments in a function call

error TS2554: Expected X arguments, but got Y.

TypeScript rejected a function or constructor call because the number of provided arguments does not match the declared signature.

error TS2554: Expected X arguments, but got Y.
  • A required argument is missing from the call.
  • Too many arguments were provided for the declared signature.
  • The function signature changed but the call site was not updated.
  1. Check the target function or constructor signature and match it exactly.
  2. Add any missing required arguments or remove extra ones.
  3. If the API changed intentionally, update all call sites to the new signature.
TypeScript Docs: More on Functions
TS2554 Expected arguments but got: causes and fixes | Error Atlas