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

x/pup/deps.ts>z.ZodType#refine

Universal process manager built in Deno
Go to Latest
method z.ZodType.prototype.refine
Re-export
import { z } from "https://deno.land/x/pup@1.0.0-rc.2/deps.ts";
const { ZodType } = 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>