Type Parameters

Hierarchy (View Summary)

Constructors

Properties

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

Alias of safeParseAsync

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

Accessors

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

Methods

  • Parameters

    Returns string

  • Parameters

    • refinement: (arg: MakeReadonly<T["_output"]>, ctx: RefinementCtx) => any

    Returns ZodEffects<
        ZodReadonly<T>,
        MakeReadonly<T["_output"]>,
        MakeReadonly<T["_input"]>,
    >

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optionalbrand: B

    Returns ZodBranded<ZodReadonly<T>, B>

  • Parameters

    • def: MakeReadonly<T["_output"]>

    Returns ZodCatch<ZodReadonly<T>>

  • Parameters

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

    Returns ZodCatch<ZodReadonly<T>>

  • Parameters

    • description: string

    Returns this

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns MakeReadonly<T["_output"]>

  • Parameters

    Returns Promise<MakeReadonly<T["_output"]>>

  • Type Parameters

    • RefinedOutput extends any

    Parameters

    Returns ZodEffects<ZodReadonly<T>, RefinedOutput, MakeReadonly<T["_input"]>>

  • Parameters

    • check: (arg: MakeReadonly<T["_output"]>) => unknown
    • Optionalmessage:
          | string
          | Partial<Omit<ZodCustomIssue, "code">>
          | (
              arg: MakeReadonly<T["_output"]>,
          ) => Partial<Omit<ZodCustomIssue, "code">>

    Returns ZodEffects<
        ZodReadonly<T>,
        MakeReadonly<T["_output"]>,
        MakeReadonly<T["_input"]>,
    >

  • Parameters

    Returns SafeParseReturnType<MakeReadonly<T["_input"]>, MakeReadonly<T["_output"]>>

  • Parameters

    Returns Promise<
        SafeParseReturnType<
            MakeReadonly<T["_input"]>,
            MakeReadonly<T["_output"]>,
        >,
    >

  • Returns T