Type Parameters

Hierarchy (view full)

Constructors

Properties

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

Alias of safeParseAsync

Type declaration

create: (<T_1>(types, params?) => ZodUnion<T_1>)

Type declaration

Accessors

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

  • get options(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Parameters

    • refinement: ((arg, ctx) => any)
        • (arg, ctx): any
        • Parameters

          Returns any

    Returns ZodEffects<ZodUnion<T>, T[number]["_output"], T[number]["_input"]>

  • Parameters

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

    Returns ZodCatch<ZodUnion<T>>

  • Parameters

    • def: ((ctx) => T[number]["_output"])
        • (ctx): T[number]["_output"]
        • Parameters

          • ctx: {
                error: ZodError<any>;
                input: T[number]["_input"];
            }
            • error: ZodError<any>
            • input: T[number]["_input"]

          Returns 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"]>

Generated using TypeDoc