Lingua-e
← Errors
JavaScript

TS2769: No Overload Matches: What It Means and How to Fix It

Error reference

TS2769: No Overload Matches

Language

JavaScript

Severity

Medium

When it happens

TypeScript error TS2769 is reported when a function call does not match any of the declared overload signatures.

Potential fixes

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.

Deep dive

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.

Potential fixes

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.

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.

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

Practice in English

How would you explain a TS2769: No Overload Matches to a fellow dev? Choose the right phrase:

"I hit an error...

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