ProjectStack
typescript

TS2769: No overload matches this call

The function you're calling has multiple overloaded signatures, but none of them match the combination of argument types you provided. TypeScript couldn't find a valid overload for the way you're calling it.

Common causes

  • Passing an argument type that doesn't match any of the function's overload signatures
  • Using a value that's too broad — a union type that covers cases outside all overloads
  • Combining argument types in a way no single overload accepts
  • A library's overloads don't cover the combination you need

How to fix it

  1. Check the function's overloads in its type definitions and match your call to one of them
  2. Narrow the argument type before calling: if (typeof val === 'string') { fn(val) }
  3. Cast the argument to the type the matching overload expects: fn(val as string)
  4. Read the error details — TypeScript shows each overload and what didn't match

Example

setTimeout(() => {}, '1000'); // error TS2769: No overload matches this call. // Argument of type 'string' is not assignable to parameter of type 'number | undefined'.

Passing a string as the delay argument to setTimeout, which expects a number

Browse more errors

The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.