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

Method refine

packages/zod/src/v4/classic/schemas.ts:151–151  ·  view source on GitHub ↗
(
    check: Ch,
    params?: string | core.$ZodCustomParams
  )

Source from the content-addressed store, hash-verified

149
150 // refinements
151 refine<Ch extends (arg: core.output<this>) => unknown | Promise<unknown>>(
152 check: Ch,
153 params?: string | core.$ZodCustomParams
154 ): Ch extends (arg: any) => arg is infer R ? this & ZodType<R, core.input<this>> : this;

Callers 15

index.tsFile · 0.80
example.tsFile · 0.80
example-mini.tsFile · 0.80
function.test.tsFile · 0.80
map.test.tsFile · 0.80
error.test.tsFile · 0.80
instanceof.test.tsFile · 0.80
preprocess.test.tsFile · 0.80
refine.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 2

baseFunction · 0.64
baseFunction · 0.64