effect-io-ai

Package: effect
Module: Predicate

Predicate.isBigInt

Checks whether a value is a bigint.

When to use

Use when you need a Predicate guard to narrow an unknown value to a bigint.

Details

Uses typeof input === "bigint".

Example (Guarding bigints)

import { Predicate } from "effect"

const data: unknown = 1n

if (Predicate.isBigInt(data)) {
  console.log(data + 2n)
}

See

Signature

declare const isBigInt: (input: unknown) => input is bigint

Source

Since v2.0.0