Hierarchy (view full)

Constructors

Properties

_input: number
_output: number
_type: number
max: ((value: number, message?: ErrMessage) => ZodNumber)
min: ((value: number, message?: ErrMessage) => ZodNumber)
spa: ((data: unknown, params?: Partial<ParseParams>) => Promise<SafeParseReturnType<number, number>>)

Alias of safeParseAsync

step: ((value: number, message?: ErrMessage) => ZodNumber)
create: ((params?: {
    description?: string;
    errorMap?: ZodErrorMap;
    invalid_type_error?: string;
    message?: string;
    required_error?: string;
} & {
    coerce?: boolean;
}) => ZodNumber)

Accessors

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

  • get isFinite(): boolean
  • Returns boolean

  • get isInt(): boolean
  • Returns boolean

  • get maxValue(): null | number
  • Returns null | number

  • get minValue(): null | number
  • Returns null | number

Methods

  • Parameters

    Returns string

  • Parameters

    • description: string

    Returns this

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns number

  • Parameters

    Returns Promise<number>

  • Parameters

    Returns ZodNumber

  • Parameters

    Returns ZodNumber

  • Parameters

    • kind: "min" | "max"
    • value: number
    • inclusive: boolean
    • Optionalmessage: string

    Returns ZodNumber