Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/frugal/dep/zod.ts>z.ZodSchema#refine

A frugal web framework
Go to Latest
method z.ZodSchema.prototype.refine
import { z } from "https://deno.land/x/frugal@0.3.0/dep/zod.ts";
const { ZodSchema } = z;

Type Parameters

RefinedOutput extends Output

Parameters

check: (arg: Output) => arg is RefinedOutput
optional
message: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)

Parameters

check: (arg: Output) => unknown | Promise<unknown>
optional
message: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)

Returns

ZodEffects<this, Output, Input>