Type Parameters

Hierarchy (view full)

Constructors

Properties

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

Alias of safeParseAsync

Type declaration

create: (<T_1>(type, params?) => ZodOptional<T_1>)

Type declaration

Accessors

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

Methods

  • Parameters

    Returns string

  • Parameters

    • refinement: ((arg, ctx) => any)
        • (arg, ctx): any
        • Parameters

          Returns any

    Returns ZodEffects<ZodOptional<T>, undefined | T["_output"], undefined | T["_input"]>

  • Parameters

    • def: undefined | T["_output"]

    Returns ZodCatch<ZodOptional<T>>

  • Parameters

    • def: ((ctx) => undefined | T["_output"])
        • (ctx): undefined | T["_output"]
        • Parameters

          • ctx: {
                error: ZodError<any>;
                input: undefined | T["_input"];
            }
            • error: ZodError<any>
            • input: undefined | T["_input"]

          Returns 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

Generated using TypeDoc