Type Parameters

Hierarchy

Constructors

Properties

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

Type declaration

create: (<T_1>(type, params?) => ZodNullable<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<ZodNullable<T>, null | T["_output"], null | T["_input"]>

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optional brand: B

    Returns ZodBranded<ZodNullable<T>, B>

  • Parameters

    • def: null | T["_output"]

    Returns ZodCatch<ZodNullable<T>>

  • Parameters

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

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

          Returns null | T["_output"]

    Returns ZodCatch<ZodNullable<T>>

  • Parameters

    • description: string

    Returns ZodNullable<T>

  • Returns boolean

  • Returns boolean

  • Parameters

    Returns null | T["_output"]

  • Parameters

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

  • Type Parameters

    • RefinedOutput extends any

    Parameters

    Returns ZodEffects<ZodNullable<T>, RefinedOutput, null | T["_input"]>

  • Parameters

    Returns ZodEffects<ZodNullable<T>, null | T["_output"], null | T["_input"]>

  • Type Parameters

    • RefinedOutput extends any

    Parameters

    • check: ((arg) => arg is RefinedOutput)
        • (arg): arg is RefinedOutput
        • Parameters

          • arg: null | T["_output"]

          Returns arg is RefinedOutput

    • refinementData: IssueData | ((arg, ctx) => IssueData)

    Returns ZodEffects<ZodNullable<T>, RefinedOutput, null | T["_input"]>

  • Parameters

    • check: ((arg) => boolean)
        • (arg): boolean
        • Parameters

          • arg: null | T["_output"]

          Returns boolean

    • refinementData: IssueData | ((arg, ctx) => IssueData)

    Returns ZodEffects<ZodNullable<T>, null | T["_output"], null | T["_input"]>

  • Type Parameters

    • RefinedOutput extends any

    Parameters

    • refinement: ((arg, ctx) => arg is RefinedOutput)
        • (arg, ctx): arg is RefinedOutput
        • Parameters

          Returns arg is RefinedOutput

    Returns ZodEffects<ZodNullable<T>, RefinedOutput, null | T["_input"]>

  • Parameters

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

          Returns void

    Returns ZodEffects<ZodNullable<T>, null | T["_output"], null | T["_input"]>

  • Type Parameters

    • NewOut

    Parameters

    • transform: ((arg, ctx) => NewOut | Promise<NewOut>)
        • (arg, ctx): NewOut | Promise<NewOut>
        • Parameters

          Returns NewOut | Promise<NewOut>

    Returns ZodEffects<ZodNullable<T>, NewOut, null | T["_input"]>

  • Returns T

Generated using TypeDoc