Hello, it's me again π
I've encountered an interesting issue with Predicates and .any
checks.
Consider the following predicate:
const choicesPredicate = ow.array.ofType<[string, string | number]>(
ow.array.exactShape([stringPredicate, ow.any(ow.string, integerPredicate)]),
);
This currently throws the following error, while running the code works and asserts it correctly:
Now, I don't know if this is not an intended use case for this, so bare with me, but if it is, then this seems like a small mistake somewhere. Looking at what the typings expect, ofType
takes in BasePredicate
, while exactShape
takes Predicate
. Any reason for that, is that an oversight?
Thanks!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too