Skip to content

No overload matches this call

Error message

                No overload matches this call
              

Quick summary

You called a function with arguments that don't match any of its declared overload signatures. TypeScript checks each overload in order.

Why this happens

  • Passing argument types not covered by any overload

  • Passing the wrong number of arguments

  • The overload signatures are too restrictive

  • Missing an overload for a new use case

Minimal example

✗ Broken code
function process(x: string): string;
function process(x: number): number;
function process(x: any): any { return x; }
process(true); // no overload for boolean
✓ Fixed code
function process(x: string): string;
function process(x: number): number;
function process(x: boolean): boolean;
function process(x: any): any { return x; }
process(true);

Add an overload that accepts boolean arguments.

How to diagnose

  • Check all overload signatures of the function

  • Compare your argument types against each overload

  • Check the implementation signature (last one) — it's not directly callable

How to fix

  • Change the arguments to match an existing overload

  • Add a new overload signature that accepts your argument types

  • Widen an existing overload to accept more types

How to prevent

  • Document overloads clearly with JSDoc

  • Use union types instead of multiple overloads where possible

Related Resources

Related Glossary

← Back to language