Type Parameters

Hierarchy (View Summary)

Constructors

Properties

_input: undefined | T["_input"]
_output: undefined | T["_output"]
_type: undefined | T["_output"]
spa: (
    data: unknown,
    params?: Partial<ParseParams>,
) => Promise<
    SafeParseReturnType<undefined | T["_input"], undefined | T["_output"]>,
>

Alias of safeParseAsync

create: <T_1 extends ZodType<any, any, any, T_1>>(
    type: T_1,
    params?: RawCreateParams,
) => ZodOptional<T_1>

Accessors

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

Methods

  • Parameters

    Returns string

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optionalbrand: B

    Returns ZodBranded<ZodOptional<T>, B>

  • Parameters

    • def: undefined | T["_output"]

    Returns ZodCatch<ZodOptional<T>>

  • Parameters

    • def: (
          ctx: { error: ZodError<any>; input: undefined | T["_input"] },
      ) => undefined | T["_output"]

    Returns ZodCatch<ZodOptional<T>>

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns undefined | T["_output"]

  • Parameters

    Returns Promise<undefined | T["_output"]>

  • Returns T