// Until there's BigInt.fromString(val, radix) ... https://github.com/tc39/proposal-number-fromstring
export function parseBigInt(val, radix) {
    const base = BigInt(radix);
    let result = 0n;
    for (let i = 0; i < val.length; i++) {
        result *= base;
        result += BigInt(parseInt(val[i], radix));
    }
    return result;
}
//# sourceMappingURL=parse-big-int.js.map