1 2 3 4 5 6 7 8 9 10 11 12 13
import "missing-native-js-functions"; export function convertBigIntToString(obj: any) { if (typeof obj === "bigint") obj = obj.toString(); if (typeof obj === "object") { obj.keys().forEach((key: string) => { obj[key] = convertBigIntToString(obj[key]); }); } return obj; }