Closed mosuem closed 1 year ago
What makes this clearer in intent than anyOf
? I think anyOf
is actually a better name...
I do see how it is less verbose for certain basic cases since you can specify a single matcher to use for all the values, but that also means that for more complicated cases you will have to fall back on anyOf
. And you could always use map
just like the implementation does to achieve a similar result with anyOf
where you only specify the matcher once.
I do worry that this will lead to confusion over which to use, and I am not convinced too much of the benefit?
cc @natebosch wdyt?
This is indeed too close to anyOf
...
To support migrations, it is sometimes beneficial to have a matcher which allows for several true values as alternatives. While this is basically just a wrapper around
anyOf
, it is clearer in intent.