Uh oh!
There was an error while loading. Please reload this page.
fix(cdk/testing): require at least one argument locator functions - #23384
fix(cdk/testing): require at least one argument locator functions#23384crisbeto wants to merge 1 commit into
Conversation
Currently the locator functions are written with a single rest parameter which means that no arguments can be passed as well, even though it'll result in an error at runtime. These changes rework the type so that at least one argument is required to be passed in.
crisbeto
commented
Aug 16, 2021
Yeah, looks like this doesn't handle mixed usages very well. I'll see if I can work around it. |
crisbeto
commented
Aug 17, 2021
It looks like typing mixed arguments isn't possible :(. Closing the PR. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
mmalerba
commented
Sep 17, 2021
I believe you can accomplish this by having |
crisbeto
commented
Sep 20, 2021
I just gave it a shot, but I'm not sure it's what we want either. We'd need to allow something like |
mmalerba
commented
Sep 20, 2021
I think the same pattern still works? Just change |
crisbeto
commented
Sep 22, 2021
Nice, that one works as expected! Here's a PR to implement it #23619. |
Currently the locator functions are written with a single rest parameter which means that no arguments can be passed as well, even though it'll result in an error at runtime.
These changes rework the type so that at least one argument is required to be passed in.