Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/domain_functions/src/test-prelude.ts>z.Schema#refinement

Decouple your business logic from your framework. With first-class type inference from end to end.
Go to Latest
method z.Schema.prototype.refinement
import { z } from "https://deno.land/x/domain_functions@v2.6.0/src/test-prelude.ts";
const { Schema } = z;

Type Parameters

RefinedOutput extends Output

Parameters

check: (arg: Output) => arg is RefinedOutput
refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)

Parameters

check: (arg: Output) => boolean
refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)

Returns

ZodEffects<this, Output, Input>