Class ZodBranded<T, B>

Type Parameters

  • T extends ZodTypeAny

  • B extends string | number | symbol

Hierarchy

Constructors

Properties

_def: ZodBrandedDef<T>
_input: T["_input"]
_output: T["_output"] & z.BRAND<B>
_type: T["_output"] & z.BRAND<B>
spa: ((data: unknown, params?: Partial<ParseParams>) => Promise<SafeParseReturnType<T["_input"], T["_output"] & z.BRAND<B>>>)

Type declaration

Accessors

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

Methods

  • Parameters

    Returns string

  • Type Parameters

    • B extends string | number | symbol

    Parameters

    • Optional brand: B

    Returns ZodBranded<ZodBranded<T, B>, B>

  • Parameters

    • def: T["_input"]

    Returns ZodCatch<ZodBranded<T, B>>

  • Parameters

    • def: (() => T["_input"])
        • (): T["_input"]
        • Returns T["_input"]

    Returns ZodCatch<ZodBranded<T, B>>

  • Parameters

    • description: string

    Returns ZodBranded<T, B>

  • Returns boolean

  • Returns boolean

  • Type Parameters

    • T extends ZodType<any, any, any, T>

    Parameters

    • option: T

    Returns ZodUnion<[ZodBranded<T, B>, T]>

  • Parameters

    Returns T["_output"] & z.BRAND<B>

  • Parameters

    Returns Promise<T["_output"] & z.BRAND<B>>

  • Returns T

Generated using TypeDoc