Skip to content

Commit b0bc20b

Browse files
committed
Refactor binary_parser type ranges to use BigInt and change TypeScript target to ES6
1 parent c64abc8 commit b0bc20b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/binary_parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ const TYPE_RANGES: {
220220
Uint8: { min: 0, max: 255 },
221221
Uint16: { min: 0, max: 65535 },
222222
Uint32: { min: 0, max: 4294967295 },
223-
BigInt64: { min: -9223372036854775808n, max: 9223372036854775807n },
224-
BigUint64: { min: 0n, max: 18446744073709551615n },
223+
BigInt64: { min: BigInt("-9223372036854775808"), max: BigInt("9223372036854775807") },
224+
BigUint64: { min: BigInt("0"), max: BigInt("18446744073709551615") },
225225
Float32: { min: -3.4e38, max: 3.4e38 },
226226
Float64: { min: -1.8e308, max: 1.8e308 },
227227
};

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "es2020",
3+
"target": "es6",
44
"declaration": true,
55
"declarationMap": true,
66
"sourceMap": true,

0 commit comments

Comments
 (0)