bupkis
    Preparing search index...

    Interface ZodBigInt

    interface ZodBigInt {
        minValue: null | bigint;
        maxValue: null | bigint;
        format: null | string;
        def: $ZodBigIntDef;
        type: "bigint";
        _def: $ZodBigIntDef;
        _output: bigint;
        _input: bigint;
        spa: (
            data: unknown,
            params?: ParseContext<$ZodIssue>,
        ) => Promise<ZodSafeParseResult<bigint>>;
        description?: string;
        _zod: $ZodBigIntInternals;
        "~standard": $ZodStandardSchema<z.ZodBigInt>;
        gte(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                    message?: string;
                },
        ): this;
        min(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                    message?: string;
                },
        ): this;
        gt(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                    message?: string;
                },
        ): this;
        lte(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                    message?: string;
                },
        ): this;
        max(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                    message?: string;
                },
        ): this;
        lt(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                    message?: string;
                },
        ): this;
        positive(
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                    message?: string;
                },
        ): this;
        negative(
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                    message?: string;
                },
        ): this;
        nonpositive(
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                    message?: string;
                },
        ): this;
        nonnegative(
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                    message?: string;
                },
        ): this;
        multipleOf(
            value: bigint,
            params?:
                | string
                | {
                    abort?: boolean;
                    error?: string
                    | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>;
                    message?: string;
                },
        ): this;
        check(...checks: (CheckFn<bigint> | z.core.$ZodCheck<bigint>)[]): this;
        clone(def?: $ZodBigIntDef, params?: { parent: boolean }): this;
        register<
            R extends
                $ZodRegistry<
                    MetadataType,
                    z.core.$ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
                >,
        >(
            registry: R,
            ...meta: z.ZodBigInt extends R["_schema"]
                ? undefined extends R["_meta"]
                    ? [$replace<R["_meta"], R["_schema"] & z.ZodBigInt>?]
                    : [$replace<R["_meta"], R["_schema"] & z.ZodBigInt>]
                : ["Incompatible schema"],
        ): this;
        brand<T extends PropertyKey = PropertyKey>(
            value?: T,
        ): PropertyKey extends T ? z.ZodBigInt : $ZodBranded<z.ZodBigInt, T>;
        parse(data: unknown, params?: ParseContext<$ZodIssue>): bigint;
        safeParse(
            data: unknown,
            params?: ParseContext<$ZodIssue>,
        ): ZodSafeParseResult<bigint>;
        parseAsync(
            data: unknown,
            params?: ParseContext<$ZodIssue>,
        ): Promise<bigint>;
        safeParseAsync(
            data: unknown,
            params?: ParseContext<$ZodIssue>,
        ): Promise<ZodSafeParseResult<bigint>>;
        encode(data: bigint, params?: ParseContext<$ZodIssue>): bigint;
        decode(data: bigint, params?: ParseContext<$ZodIssue>): bigint;
        encodeAsync(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): Promise<bigint>;
        decodeAsync(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): Promise<bigint>;
        safeEncode(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): ZodSafeParseResult<bigint>;
        safeDecode(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): ZodSafeParseResult<bigint>;
        safeEncodeAsync(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): Promise<ZodSafeParseResult<bigint>>;
        safeDecodeAsync(
            data: bigint,
            params?: ParseContext<$ZodIssue>,
        ): Promise<ZodSafeParseResult<bigint>>;
        refine(
            check: (arg: bigint) => unknown,
            params?:
                | string
                | {
                    abort?: boolean;
                    when?: (payload: ParsePayload) => boolean;
                    path?: PropertyKey[];
                    params?: Record<string, any>;
                    error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>;
                    message?: string;
                },
        ): this;
        superRefine(
            refinement: (
                arg: bigint,
                ctx: $RefinementCtx<bigint>,
            ) => void | Promise<void>,
        ): this;
        overwrite(fn: (x: bigint) => bigint): this;
        optional(): z.ZodOptional<z.ZodBigInt>;
        nonoptional(
            params?:
                | string
                | {
                    error?: string
                    | $ZodErrorMap<$ZodIssueInvalidType<unknown>>;
                    message?: string;
                },
        ): z.ZodNonOptional<z.ZodBigInt>;
        nullable(): z.ZodNullable<z.ZodBigInt>;
        nullish(): z.ZodOptional<z.ZodNullable<z.ZodBigInt>>;
        default(def: bigint): z.ZodDefault<z.ZodBigInt>;
        default(def: () => bigint): z.ZodDefault<z.ZodBigInt>;
        prefault(def: () => bigint): z.ZodPrefault<z.ZodBigInt>;
        prefault(def: bigint): z.ZodPrefault<z.ZodBigInt>;
        array(): z.ZodArray<z.ZodBigInt>;
        or<T extends SomeType>(option: T): z.ZodUnion<[z.ZodBigInt, T]>;
        and<T extends SomeType>(incoming: T): z.ZodIntersection<z.ZodBigInt, T>;
        transform<NewOut>(
            transform: (
                arg: bigint,
                ctx: $RefinementCtx<bigint>,
            ) => NewOut | Promise<NewOut>,
        ): z.ZodPipe<z.ZodBigInt, z.ZodTransform<Awaited<NewOut>, bigint>>;
        catch(def: bigint): z.ZodCatch<z.ZodBigInt>;
        catch(def: (ctx: $ZodCatchCtx) => bigint): z.ZodCatch<z.ZodBigInt>;
        pipe<
            T extends z.core.$ZodType<any, bigint, $ZodTypeInternals<any, bigint>>,
        >(
            target:
                | T
                | z.core.$ZodType<any, bigint, $ZodTypeInternals<any, bigint>>,
        ): z.ZodPipe<z.ZodBigInt, T>;
        readonly(): z.ZodReadonly<z.ZodBigInt>;
        describe(description: string): this;
        meta(): | undefined
        | {
            id?: string;
            title?: string;
            description?: string;
            deprecated?: boolean;
            [key: string]: unknown;
        };
        meta(
            data: {
                id?: string;
                title?: string;
                description?: string;
                deprecated?: boolean;
                [key: string]: unknown;
            },
        ): this;
        isOptional(): boolean;
        isNullable(): boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    minValue: null | bigint
    maxValue: null | bigint
    format: null | string
    type: "bigint"

    Use .def instead.

    _output: bigint

    Use z.output<typeof schema> instead.

    _input: bigint

    Use z.input<typeof schema> instead.

    spa: (
        data: unknown,
        params?: ParseContext<$ZodIssue>,
    ) => Promise<ZodSafeParseResult<bigint>>
    description?: string

    Methods

    • Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Alias of .gte()

      Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Alias of .lte()

      Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooBig<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueTooSmall<Numeric>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      • value: bigint
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                error?: string
                | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              error?: string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalerror?: string | $ZodErrorMap<$ZodIssueNotMultipleOf<number | bigint>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      Returns this

    • Parameters

      • check: (arg: bigint) => unknown
      • Optionalparams:
            | string
            | {
                abort?: boolean;
                when?: (payload: ParsePayload) => boolean;
                path?: PropertyKey[];
                params?: Record<string, any>;
                error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>;
                message?: string;
            }
        • string
        • {
              abort?: boolean;
              when?: (payload: ParsePayload) => boolean;
              path?: PropertyKey[];
              params?: Record<string, any>;
              error?: string | $ZodErrorMap<NonNullable<$ZodIssue>>;
              message?: string;
          }
          • Optionalabort?: boolean

            If true, no later checks will be executed if this check fails. Default false.

          • Optionalwhen?: (payload: ParsePayload) => boolean

            If provided, this check will only be executed if the function returns true. Defaults to payload => z.util.isAborted(payload).

          • Optionalpath?: PropertyKey[]
          • Optionalparams?: Record<string, any>
          • Optionalerror?: string | $ZodErrorMap<NonNullable<$ZodIssue>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

      Returns this

    • Parameters

      Returns this

    • Parameters

      • fn: (x: bigint) => bigint

      Returns this

    • Returns a new instance that has been registered in z.globalRegistry with the specified description

      Parameters

      • description: string

      Returns this

    • Returns the metadata associated with this instance in z.globalRegistry

      Returns
          | undefined
          | {
              id?: string;
              title?: string;
              description?: string;
              deprecated?: boolean;
              [key: string]: unknown;
          }

    • Returns a new instance that has been registered in z.globalRegistry with the specified metadata

      Parameters

      • data: {
            id?: string;
            title?: string;
            description?: string;
            deprecated?: boolean;
            [key: string]: unknown;
        }

      Returns this

    • Returns boolean

      Try safe-parsing undefined (this is what isOptional does internally):

      const schema = z.string().optional();
      const isOptional = schema.safeParse(undefined).success; // true
    • Returns boolean

      Try safe-parsing null (this is what isNullable does internally):

      const schema = z.string().nullable();
      const isNullable = schema.safeParse(null).success; // true