Class ZodError<T>

Type Parameters

  • T = any

Hierarchy

  • Error
    • ZodError

Constructors

Properties

addIssue: (sub: Zod.z.ZodIssue) => void
addIssues: (subs?: Zod.z.ZodIssue[]) => void
cause?: unknown
issues: Zod.z.ZodIssue[]
name: string
stack?: string
create: (issues: Zod.z.ZodIssue[]) => Zod.z.ZodError<any>
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Accessors

  • get isEmpty(): boolean
  • Returns boolean

  • get message(): string
  • Returns string

Methods

  • Returns a string representation of an object.

    Returns string

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void