MCPcopy
hub / github.com/colinhacks/zod / callback

Function callback

packages/zod/src/v3/tests/base.test.ts:23–25  ·  view source on GitHub ↗
(predicate: (val: string) => boolean)

Source from the content-addressed store, hash-verified

21
22test("test this binding", () => {
23 const callback = (predicate: (val: string) => boolean) => {
24 return predicate("hello");
25 };
26
27 expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true
28 expect(callback((value) => z.string().safeParse(value).success)).toBe(true); // true

Callers 1

base.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected