TS2554: Expected N arguments, but got M TypeScript Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

TypeScript: error TS2554: Expected 2 arguments, but got 1.

A call passes too few or too many arguments.

Exact message you may see error TS2554: Expected 2 arguments, but got 1.Expected 1 arguments, but got 2.TS2554 Expected N arguments, but got Mts(2554) Expected 0-1 arguments, but got 2error TS2554: Expected 3 arguments, but got 2
Seen on: TypeScript

Meaning

Match the signature: add the missing argument, make parameters optional (b?: number) or give defaults, or fix the call after a library upgrade changed the signature. For callbacks passed to map/forEach extra args are allowed; direct calls are strict.

Common causes

  • Missing required argument
  • Extra argument
  • Signature changed in a library update
  • Optional parameter not marked
  • Spread/tuple mismatches

⚡ Quick fix

  1. Pass the missing arguments or mark parameters optional
  2. Check the library's current signature (hover/docs)
  3. Use default parameter values

Detailed fix by platform

TypeScript

  1. function greet(name: string, greeting = "Hello") { }

How to diagnose

  1. Params — Required count?
  2. Call — Passed?
  3. Lib — Upgrade changed?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot find module './App.vue' or its corresponding type declarations — TypeScript: error TS2307: Cannot find module './App.vue' or its corresponding type declarations. (Vue)Cannot find module '.…TS1005: ';' expected / ',' expected (syntax error) — TypeScript: error TS1005: ';' expected. (TypeScript)TS1005: ';' expected …TS1128: Declaration or statement expected — TypeScript: error TS1128: Declaration or statement expected. (TypeScript)TS1128: Declaration o…TS2345 — TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. (Node.js)TS2345TS2349: This expression is not callable — TypeScript: error TS2349: This expression is not callable. Type 'X' has no call signatures. (TypeScript)TS2349: This expressi…TS2366: Function lacks ending return statement — TypeScript: error TS2366: Function lacks ending return statement and return type does not include 'undefined'. (TypeScript)TS2366: Function lack…TS2393: Duplicate function implementation — TypeScript: error TS2393: Duplicate function implementation. (TypeScript)TS2393: Duplicate fun…TS2769: No overload matches this call — TypeScript: error TS2769: No overload matches this call. Overload 1 of 2, '(a: string): void', gave the following error. (TypeScript)TS2769: No overload m…TS2554: E…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.