Lingua-e
JavaScript

What is a TS2769: No Overload Matches?

← Errors

TypeScript error TS2769 is reported when a function call does not match any of the declared overload signatures. TypeScript checks each overload in order and reports this error if none of them accepts the provided argument types.

Why it happens

  • Calling a function with an argument type not covered by any overload.
  • Passing a union type where each overload only accepts one branch of the union.
  • A type mismatch in a third-party library function call.
  • Incorrect generic type arguments that fail all overload checks.

Examples

JavaScript

Code that triggers the error

function process(input: string): string;
function process(input: number): number;
function process(input: string | number): string | number {
  return input;
}

process(true); // boolean not in overloads

Error output

error TS2769: No overload matches this call.

How to fix it

Check all overload signatures and ensure your argument matches one of them. Add a new overload if you need to support an additional type. If using a library, check the type definitions for what the function actually accepts.

Fixed code

function process(input: string): string;
function process(input: number): number;
function process(input: string | number): string | number {
  return input;
}

process("hello"); // OK
process(42);      // OK

Related errors

Ready to practice your English at work?

Lingua-e has interactive exercises built around real developer conversations: standups, code reviews, retrospectives, and more. Practice until it comes naturally.

Try Lingua-e for free