support overloaded functions
Currently, the constructs like expectTypeOf.toBeCallableWith, expectTypeOf.parameters, expectTypeOf.parameter do not work with function overloads. Basically they just assume the signature of the last overload and give error otherwise.
I believe this could be made work, doing something similar to what is described here:
https://stackoverflow.com/questions/59535995/parameters-generic-of-overloaded-function-doesnt-contain-all-options/59538756#59538756
Although, for expectTypeOf.parameter, I m not sure how to refer to a parameter at given index for specific overload. But i believe "toBeCallableWith" and "parameters" could be made work.
Thanks.
Oh that's an interesting workaround. Yes, I'd be open to adding that. Let me know if you would like to create a PR. There are some big-ish perf changes in flux right now, but this would probably be separate enough that it doesn't affect them.
@mmkal I'm gonna give this a shot!