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

    Hierarchy (View Summary)

    Index

    Properties

    Use .def instead.

    _input: bigint

    Use z.input<typeof schema> instead.

    _output: bigint

    Use z.output<typeof schema> instead.

    description?: string
    format: null | string
    maxValue: null | bigint
    minValue: null | bigint
    spa: (
        data: unknown,
        params?: ParseContext<$ZodIssue>,
    ) => Promise<ZodSafeParseResult<bigint>>
    type: "bigint"

    Methods

    • Parameters

      Returns this

    • Parameters

      Returns this

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

      Parameters

      • description: string

      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

    • 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

    • Returns boolean

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

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

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

      const schema = z.string().optional();
      const isOptional = schema.safeParse(undefined).success; // true
    • 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

    • 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

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

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

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

      Parameters

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

      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<$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

      • 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

      • fn: (x: bigint) => bigint

      Returns this

    • Type Parameters

      • T extends $ZodType<any, bigint, $ZodTypeInternals<any, bigint>>

      Parameters

      • target: T | $ZodType<any, bigint, $ZodTypeInternals<any, bigint>>

      Returns ZodPipe<ZodBigInt, T>

    • 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

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

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

          • Optionalerror?: string | $ZodErrorMap<NonNullable<$ZodIssue>>
          • Optionalmessage?: string

            This parameter is deprecated. Use error instead.

          • Optionalparams?: Record<string, any>
          • Optionalpath?: PropertyKey[]

      Returns this

    • Type Parameters

      Parameters

      • registry: R
      • ...meta: ZodBigInt extends R["_schema"]
            ? undefined extends R["_meta"]
                ? [$replace<R["_meta"], R["_schema"] & ZodBigInt>?]
                : [$replace<R["_meta"], R["_schema"] & ZodBigInt>]
            : ["Incompatible schema"]

      Returns this

    • Parameters

      • refinement: (arg: bigint, ctx: RefinementCtx<bigint>) => void | Promise<void>

      Returns this

      Use .check() instead.