collectionHasValueSatisfyingAssertion:AssertionFunctionSync< readonly[ ZodUnion< readonly[ ZodCustom<Map<unknown,unknown>,Map<unknown,unknown>>, ZodCustom<Set<unknown>,Set<unknown>>, ZodArray<ZodUnknown>, ], >, readonly[ "to have a value satisfying", "to have value satisfying", "to contain a value satisfying", ], ZodUnknown, ], ( subject:unknown[]|Map<unknown,unknown>|Set<unknown>, expected:unknown, )=>{message:string}|undefined, readonly[ ZodUnion< readonly[ ZodCustom<Map<unknown,unknown>,Map<unknown,unknown>>, ZodCustom<Set<unknown>,Set<unknown>>, ZodArray<ZodUnknown>, ], >, PhraseLiteralChoiceSlot< readonly[ "to have a value satisfying", "to have value satisfying", "to contain a value satisfying", ], >, ZodUnknown, ], > = ...
Asserts that at least one value in a Map, Set, or Array satisfies the
expected shape.
Uses partial/satisfy semantics — any single matching value is sufficient.
Fails on empty collections.
Remarks
For Map, values (not keys) are checked.
Example
expect([{ a:1, b:2},{ c:3}],'to have a value satisfying',{ a:1, });// passes expect(newSet([1,'two',3]),'to have a value satisfying',z.string());// passes expect([1,2,3],'to have value satisfying',2);// passes
Asserts that at least one value in a Map, Set, or Array satisfies the expected shape.
Uses partial/satisfy semantics — any single matching value is sufficient. Fails on empty collections.