Class ZodDiscriminatedUnion<Discriminator, Options>

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_input: input<Options[number]>
_output: output<Options[number]>
_type: output<Options[number]>
spa: (
    data: unknown,
    params?: Partial<ParseParams>,
) => Promise<
    SafeParseReturnType<input<Options[number]>, output<Options[number]>>,
>

Alias of safeParseAsync

Accessors

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

  • get discriminator(): Discriminator
  • Returns Discriminator

  • get options(): Options
  • Returns Options

Methods

  • Parameters

    Returns string

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean