Class ZodEnum<T>

Type Parameters

  • T extends [string, ...string[]]

Hierarchy (view full)

Constructors

Properties

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

Alias of safeParseAsync

Type declaration

create: {
    <U, T>(values, params?): ZodEnum<Writeable<T>>;
    <U, T>(values, params?): ZodEnum<T>;
}

Type declaration

Accessors

  • get Enum(): Values<T>
  • Returns Values<T>

  • get Values(): Values<T>
  • Returns Values<T>

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

  • get enum(): Values<T>
  • Returns Values<T>

  • get options(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns T[number]

  • Parameters

    Returns Promise<T[number]>

Generated using TypeDoc