Skip to content

support overloaded functions #30

@y-polonsk

Description

@y-polonsk

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.

Metadata

Metadata

Assignees

Labels

New featureNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions