Class ZodNativeEnum<T>

Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_input: T[keyof T]
_output: T[keyof T]
_type: T[keyof T]
spa: (
    data: unknown,
    params?: Partial<Zod.z.ParseParams>,
) => Promise<Zod.z.SafeParseReturnType<T[keyof T], T[keyof T]>>

Alias of safeParseAsync

create: <T_1 extends Zod.z.EnumLike>(
    values: T_1,
    params?: Zod.z.RawCreateParams,
) => Zod.z.ZodNativeEnum<T_1>

Accessors

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

  • get enum(): T
  • Returns T

Methods

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns Promise<T[keyof T]>