Type Parameters

  • T

Hierarchy

Constructors

Properties

_def: ZodLiteralDef<T>
_input: T
_output: T
_type: T
spa: ((data: unknown, params?: Partial<ParseParams>) => Promise<SafeParseReturnType<T, T>>)

Type declaration

superRefine: ((refinement: ((arg: T, ctx: RefinementCtx) => any)) => ZodEffects<ZodLiteral<T>, T, T>)

Type declaration

create: (<T_1>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>)

Type declaration

    • <T_1>(value: T_1, params?: RawCreateParams): ZodLiteral<T_1>
    • Type Parameters

      Type Parameters

      • T_1 extends undefined | null | string | number | bigint | boolean

      Parameters

      • value: T_1
      • Optional params: RawCreateParams

      Returns ZodLiteral<T_1>

Accessors

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

  • get value(): T
  • Returns T

Methods

  • Parameters

    Returns string

  • Type Parameters

    Type Parameters

    • B extends string | number | symbol

    Returns ZodBranded<ZodLiteral<T>, B>

  • Parameters

    • description: string

    Returns ZodLiteral<T>

  • Returns boolean

  • Returns boolean

  • Type Parameters

    Type Parameters

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

    Parameters

    • option: T

    Returns ZodUnion<[ZodLiteral<T>, T]>

  • Parameters

    Returns T

  • Parameters

    Returns Promise<T>

  • Type Parameters

    Type Parameters

    • RefinedOutput

    Parameters

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

          • arg: T

          Returns arg is RefinedOutput

    • Optional message: string | Partial<Omit<ZodCustomIssue, "code">> | ((arg: T) => Partial<Omit<ZodCustomIssue, "code">>)

    Returns ZodEffects<ZodLiteral<T>, RefinedOutput, RefinedOutput>

  • Parameters

    • check: ((arg: T) => unknown)
        • (arg: T): unknown
        • Parameters

          • arg: T

          Returns unknown

    • Optional message: string | Partial<Omit<ZodCustomIssue, "code">> | ((arg: T) => Partial<Omit<ZodCustomIssue, "code">>)

    Returns ZodEffects<ZodLiteral<T>, T, T>

Generated using TypeDoc