Skip to main content
Module

x/zod/types.ts>ZodUnion

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

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>