Skip to content

Commit

Permalink
fix. example of BigInt.toNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
coleea committed Mar 25, 2024
1 parent 3383f2f commit e946010
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/effect/src/BigInt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,12 @@ export const multiplyAll = (collection: Iterable<bigint>): bigint => {
* @param b - The `bigint` to be converted to a `number`.
*
* @example
* import { fromBigInt } from "effect/Number"
* import { toNumber } from "effect/BigInt"
* import { Option } from "effect"
*
* assert.deepStrictEqual(fromBigInt(BigInt(42)), Option.some(42))
* assert.deepStrictEqual(fromBigInt(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none())
* assert.deepStrictEqual(fromBigInt(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none())
* assert.deepStrictEqual(toNumber(BigInt(42)), Option.some(42))
* assert.deepStrictEqual(toNumber(BigInt(Number.MAX_SAFE_INTEGER) + BigInt(1)), Option.none())
* assert.deepStrictEqual(toNumber(BigInt(Number.MIN_SAFE_INTEGER) - BigInt(1)), Option.none())
*
* @category conversions
* @since 2.0.0
Expand Down

0 comments on commit e946010

Please sign in to comment.