effect-io-ai

Package: effect
Module: BigInt

BigInt.decrement

Returns 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)

Signature

declare const decrement: (n: bigint) => bigint

Source

Since v2.0.0