You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inferring from a type with multiple call signatures (such as the type of an overloaded function), inferences are made from the last signature (which, presumably, is the most permissive catch-all case). It is not possible to perform overload resolution based on a list of argument types.
π Search Terms
call signature, overloaded call
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.7.0-dev.20241101#code/JYOwLgpgTgZghgYwgAgGIHt3IN4ChnIAUAHgFzICMAlOQEz5FnK03IDMuAvrrmAJ4AHFAGE4AGzEBlYAHMQcMAFcoEADwAVAHzIAvMnXIIxSCAAmAZyIA6GwPKgY0ZAAUqu7Q6cAlZAH5rtuSu7sg+5Oq8gigA6lDoIDLqUbrIohLScgrKahjo2gD0+Yx0bjrabEA
π» Code
π Actual behavior
The inferred type is not compatible with actual type
π Expected behavior
The inferred type should (at minimum) be compatible with actual type (ideally
{ (x: 1) => 2; (x: 2) => 3 }
).Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: