Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_def: ZodUnionDef<T>
_input: T[number]["_input"]
_output: T[number]["_output"]
_type: T[number]["_output"]
spa: (
    data: unknown,
    params?: Partial<ParseParams>,
) => Promise<SafeParseReturnType<T[number]["_input"], T[number]["_output"]>>

Alias of safeParseAsync

create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ZodTypeAny, T_1]>(
    types: T_1,
    params?: RawCreateParams,
) => ZodUnion<T_1>

Accessors

  • get description(): undefined | string
  • Returns undefined | string

  • get options(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optionalbrand: B

    Returns ZodBranded<ZodUnion<T>, B>

  • Parameters

    • def: T[number]["_output"]

    Returns ZodCatch<ZodUnion<T>>

  • Parameters

    • def: (
          ctx: { error: ZodError<any>; input: T[number]["_input"] },
      ) => T[number]["_output"]

    Returns ZodCatch<ZodUnion<T>>

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns T[number]["_output"]

  • Parameters

    Returns Promise<T[number]["_output"]>