Common causes
- Passing too many arguments to a function that doesn't accept that many
- Forgetting a required argument — all non-optional parameters must be provided
- The function signature changed but the call sites weren't updated
- Calling a method on the wrong type that has a different signature than expected
How to fix it
- Check the function signature and pass exactly the required arguments
- Make extra parameters optional if they shouldn't be required: function fn(a: string, b?: number)
- Add rest parameters if the function should accept any number of arguments: function fn(...args: string[])
- Update call sites to match the new function signature after a refactor
Example
function add(a: number, b: number): number { return a + b; }
add(1, 2, 3);
// error TS2554: Expected 2 arguments, but got 3.Passing three arguments to a function that only accepts two
Browse more errors
The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.
