-
-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
Description
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!