Skip to main content
Module

x/zod/index.ts>z.ZodUnion

TypeScript-first schema validation with static type inference
Extremely Popular
Go to Latest
class z.ZodUnion
extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]>
import { z } from "https://deno.land/x/zod@v3.22.4/index.ts";
const { ZodUnion } = z;

Type Parameters

T extends ZodUnionOptions

Properties

readonly
options

Methods

_parse(input: ParseInput): ParseReturnType<this["_output"]>

Static Properties

create: <T extends Readonly<[ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>>(types: T, params?: RawCreateParams) => ZodUnion<T>