Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/zod/index.ts>z.ZodDiscriminatedUnionDef

TypeScript-first schema validation with static type inference
Very Popular
Go to Latest
interface z.ZodDiscriminatedUnionDef
implements ZodTypeDef
import { type z } from "https://deno.land/x/zod@v3.21.0/index.ts";
const { ZodDiscriminatedUnionDef } = z;

Type Parameters

Discriminator extends string
optional
Options extends ZodDiscriminatedUnionOption<string>[] = ZodDiscriminatedUnionOption<string>[]

Properties

discriminator: Discriminator
options: Options
optionsMap: Map<Primitive, ZodDiscriminatedUnionOption<any>>
typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion