| 870 | * (`Number.MAX_SAFE_INTEGER` and `Number.MIN_SAFE_INTEGER`) or if the number is |
| 871 | * not a valid `bigint`, it returns `Option.none()`. |
| 872 | * |
| 873 | * **Example** (Converting numbers to bigints) |
| 874 | * |
| 875 | * ```ts import.meta.vitest |
| 876 | * import { BigInt, Option } from "effect" |
| 877 | * |
| 878 | * BigInt.fromNumber(42) // => Option.some(42n) |
| 879 | * BigInt.fromNumber(Number.MAX_SAFE_INTEGER + 1) // => Option.none() |
| 880 | * BigInt.fromNumber(Number.MIN_SAFE_INTEGER - 1) // => Option.none() |
| 881 | * ``` |
| 882 | * |
| 883 | * @see {@link toNumber} for converting `bigint` values back to safe integer numbers |