Hyperlinkv0.8.0-beta.28

BigInt

BigInt.incrementconsteffect/BigInt.ts:250
(n: bigint): bigint

Returns the result of adding 1n to a bigint.

When to use

Use to increment a bigint counter by one.

Example (Incrementing a bigint)

import { BigInt } from "effect"
import * as assert from "node:assert"

assert.deepStrictEqual(BigInt.increment(2n), 3n)
math
Source effect/BigInt.ts:2501 lines
export const increment = (n: bigint): bigint => n + bigint1