Branded bigint type for 64-bit signed integers. Represents values that can be stored in a BigInt64Array.
const toBigInt64 = (x: bigint): BigInt64 => { const min = -(2n ** 63n); const max = 2n ** 63n - 1n; if (x >= min && x <= max) return x as BigInt64; throw new Error('Out of BigInt64 range');}; Copy
const toBigInt64 = (x: bigint): BigInt64 => { const min = -(2n ** 63n); const max = 2n ** 63n - 1n; if (x >= min && x <= max) return x as BigInt64; throw new Error('Out of BigInt64 range');};
Branded bigint type for 64-bit signed integers. Represents values that can be stored in a BigInt64Array.