/** * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/BigInt#%E5%9C%A8_json_%E4%B8%AD%E4%BD%BF%E7%94%A8} */ export const enhanceBigInt = (): void => { // @ts-expect-error - extend BigInt toJSON // oxlint-disable-next-line no-extend-native BigInt.prototype.toJSON = function toJSON(): number { return Number(this.toString()) } }