TS4222: No overload expects N arguments
Error message
No overload expects N arguments, but overloads expect M.
Quick summary
You're calling a function with a number of arguments that doesn't match any overload signature.
Why this happens
Wrong number of arguments for all overloads
Overload signatures don't cover the argument count
Minimal example
✗ Broken code
function fn(x: string): string;
function fn(x: string, y: string): string;
function fn(x: any, y?: any): any { return x; }
fn('a', 'b', 'c'); // TS4222✓ Fixed code
function fn(x: string): string;
function fn(x: string, y: string): string;
function fn(x: string, y: string, z: string): string;
function fn(x: any, y?: any, z?: any): any { return x; }
fn('a', 'b', 'c'); // ✅Add a 3-argument overload signature.
How to diagnose
Check all overload signatures for their parameter counts
Count the arguments in your call
How to fix
Provide the correct number of arguments
Add an overload signature that accepts the argument count