🐛 fix: handle bigint with json serialize helper

This commit is contained in:
2026-02-05 22:20:25 +07:00
parent 9dd02d097d
commit 81cc1057b4
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,5 @@
export const serializeBigInt = <T>(data: T): T => {
return JSON.parse(
JSON.stringify(data, (_, v) => (typeof v === "bigint" ? Number(v) : v)),
);
};