Class ZodArray<T, Cardinality>

Type Parameters

Hierarchy (view full)

Constructors

Properties

_def: ZodArrayDef<T>
_input: Cardinality extends "atleastone"
    ? [T["_input"], ...T["_input"][]]
    : T["_input"][]
spa: ((data, params?) => Promise<SafeParseReturnType<Cardinality extends "atleastone"
    ? [T["_input"], ...T["_input"][]]
    : T["_input"][], arrayOutputType<T, Cardinality>>>)

Alias of safeParseAsync

Type declaration

create: (<T_1>(schema, params?) => ZodArray<T_1, "many">)

Type declaration

Accessors

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

  • get element(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    • len: number
    • Optional message: ErrMessage

    Returns this

  • Parameters

    • maxLength: number
    • Optional message: ErrMessage

    Returns this

  • Parameters

    • minLength: number
    • Optional message: ErrMessage

    Returns this

  • Parameters

    • Optional message: ErrMessage

    Returns ZodArray<T, "atleastone">

Generated using TypeDoc