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

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

Access OpenLibrary's API with Deno.
Go to Latest
method z.ZodType.prototype.refine
Re-export
import { z } from "https://deno.land/x/deno_books@v1.2.0/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>