Hyperlinkv0.8.0-beta.28

Predicate

Predicate.isBigIntfunctioneffect/Predicate.ts:637
(input: unknown): input is bigint

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)
}
guardsisNumber
export function isBigInt(input: unknown): input is bigint {
  return typeof input === "bigint"
}
Referenced by 4 symbols