(n: bigint): bigintReturns the result of subtracting 1n from a bigint.
When to use
Use to decrement a bigint counter by one.
Example (Decrementing a bigint)
import { BigInt } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(BigInt.decrement(3n), 2n)math
Source effect/BigInt.ts:2711 lines
export const const decrement: (n: bigint) => bigintReturns the result of subtracting 1n from a bigint.
When to use
Use to decrement a bigint counter by one.
Example (Decrementing a bigint)
import { BigInt } from "effect"
import * as assert from "node:assert"
assert.deepStrictEqual(BigInt.decrement(3n), 2n)
decrement = (n: bigintn: bigint): bigint => n: bigintn - const bigint1: bigintbigint1