[Bug]: Type inferrence in toBeCalledWith
broken for method with overloads
#13337
Labels
toBeCalledWith
broken for method with overloads
#13337
Version
29.1.1
Steps to reproduce
Expected behavior
The methods with overloads should be inferred correctly based on the number of arguments.
Actual behavior
Methods with overloads are triggering type errors.
Additional context
The bug was introduced in #13268
This is a common pattern in libraries which support both callback and promise syntax, e.g. https://github.com/mongodb/node-mongodb-native/blob/main/src/collection.ts#L265-L285
Environment
The text was updated successfully, but these errors were encountered: