- 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.
- What’s an overload?
- What’s a call?
- What does it mean that no overload matches this call?
- Example (code, error, how to fix)