Skip to main content

Understanding “No overload matches this call” in TypeScript

  • a function is “overloaded” if it can be called with multiple argument combos
    • example…
  • an “overload” is one of the argument combos a function can be called with
  • the error means the arguments you are passing don’t match any of the possible combos

If you write Typescript, you may have seen the error “no overload matches this call” and wondered what on earth “overload” means.

I probably saw this error a dozen times before I finally came across a helpful explanation of an overload here. (find kyle shevlin article that used that word)

Basically, an “overload” is a combination of argument types that can be passed to a function.

A function is “overloaded” if you can pass multiple argument combos to that function.

  1. What’s an overload?
  2. What’s a call?
  3. What does it mean that no overload matches this call?
  4. Example (code, error, how to fix)

Inbox