(input: unknown): input is bigintChecks 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
Source effect/Predicate.ts:6373 lines
export function function isBigInt(
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)
}
isBigInt(input: unknowninput: unknown): input: unknowninput is bigint {
return typeof input: unknowninput === "bigint"
}Referenced by 4 symbols