From 82236cb8f8d23416bcf2b3b9fb52e8f02edcd321 Mon Sep 17 00:00:00 2001 From: Nikolay Bryskin Date: Tue, 14 Oct 2025 15:42:25 +0300 Subject: [PATCH 1/3] Fix exports --- jsbi.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsbi.d.ts b/jsbi.d.ts index 93a48ec..9116ecc 100644 --- a/jsbi.d.ts +++ b/jsbi.d.ts @@ -40,4 +40,4 @@ declare class JSBI extends Array { static DataViewSetBigInt64(dataview: DataView, byteOffset: number, value: JSBI, littleEndian?: boolean): void; static DataViewSetBigUint64(dataview: DataView, byteOffset: number, value: JSBI, littleEndian?: boolean): void; } -export default JSBI; +export = JSBI; From 1a80614a61065b4e1168763eb3540ccd58ce4b9f Mon Sep 17 00:00:00 2001 From: Nikolay Bryskin Date: Tue, 14 Oct 2025 15:55:37 +0300 Subject: [PATCH 2/3] remove `git` invokation from `ci` script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cddb760..658a355 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "prepublish": "npm run ci", "lint": "eslint . --ext ts --fix", "generate-benchmarks": "for op in add and div mod mul neg not or sar shl sub xor; do scripts/generate-benchmark.py generate \"${op}\" > \"benchmarks/${op}.mjs\"; done", - "ci": "npm run lint && npm run build && git status && git diff-index --quiet HEAD -- || git diff && npm test" + "ci": "npm run lint && npm run build && npm test" }, "license": "Apache-2.0" } From 0182d757e189f2bbd63e153eb7dab62c93cb27d0 Mon Sep 17 00:00:00 2001 From: Nikolay Bryskin Date: Tue, 14 Oct 2025 15:59:52 +0300 Subject: [PATCH 3/3] fixup! Fix exports --- jsbi.d.mts | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 jsbi.d.mts diff --git a/jsbi.d.mts b/jsbi.d.mts new file mode 100644 index 0000000..93a48ec --- /dev/null +++ b/jsbi.d.mts @@ -0,0 +1,43 @@ +declare class JSBI extends Array { + private sign; + private constructor(); + static BigInt(arg: number | string | boolean | object): JSBI; + toDebugString(): string; + toString(radix?: number): string; + valueOf(): void; + static toNumber(x: JSBI): number; + static unaryMinus(x: JSBI): JSBI; + static bitwiseNot(x: JSBI): JSBI; + static exponentiate(x: JSBI, y: JSBI): JSBI; + static multiply(x: JSBI, y: JSBI): JSBI; + static divide(x: JSBI, y: JSBI): JSBI; + static remainder(x: JSBI, y: JSBI): JSBI; + static add(x: JSBI, y: JSBI): JSBI; + static subtract(x: JSBI, y: JSBI): JSBI; + static leftShift(x: JSBI, y: JSBI): JSBI; + static signedRightShift(x: JSBI, y: JSBI): JSBI; + static unsignedRightShift(): void; + static lessThan(x: JSBI, y: JSBI): boolean; + static lessThanOrEqual(x: JSBI, y: JSBI): boolean; + static greaterThan(x: JSBI, y: JSBI): boolean; + static greaterThanOrEqual(x: JSBI, y: JSBI): boolean; + static equal(x: JSBI, y: JSBI): boolean; + static notEqual(x: JSBI, y: JSBI): boolean; + static bitwiseAnd(x: JSBI, y: JSBI): JSBI; + static bitwiseXor(x: JSBI, y: JSBI): JSBI; + static bitwiseOr(x: JSBI, y: JSBI): JSBI; + static asIntN(n: number, x: JSBI): JSBI; + static asUintN(n: number, x: JSBI): JSBI; + static ADD(x: any, y: any): string | number | JSBI; + static LT(x: any, y: any): boolean; + static LE(x: any, y: any): boolean; + static GT(x: any, y: any): boolean; + static GE(x: any, y: any): boolean; + static EQ(x: any, y: any): boolean; + static NE(x: any, y: any): boolean; + static DataViewGetBigInt64(dataview: DataView, byteOffset: number, littleEndian?: boolean): JSBI; + static DataViewGetBigUint64(dataview: DataView, byteOffset: number, littleEndian?: boolean): JSBI; + static DataViewSetBigInt64(dataview: DataView, byteOffset: number, value: JSBI, littleEndian?: boolean): void; + static DataViewSetBigUint64(dataview: DataView, byteOffset: number, value: JSBI, littleEndian?: boolean): void; +} +export default JSBI;