]> zoso.dev Git - buffer.git/commitdiff
Add BigInt operations to types
authorDeklan Webster <deklanw@gmail.com>
Thu, 5 Nov 2020 22:34:10 +0000 (17:34 -0500)
committerDeklan Webster <deklanw@gmail.com>
Thu, 5 Nov 2020 22:34:10 +0000 (17:34 -0500)
index.d.ts

index 5d1a804e5a8465592fec8686337022a65cb2586d..5aa3549fa439baebaf5380c7cabaf86fd0eb0f31 100644 (file)
@@ -20,11 +20,15 @@ export class Buffer extends Uint8Array {
     readUInt16BE(offset: number, noAssert?: boolean): number;
     readUInt32LE(offset: number, noAssert?: boolean): number;
     readUInt32BE(offset: number, noAssert?: boolean): number;
+    readBigUInt64LE(offset: number): BigInt;
+    readBigUInt64BE(offset: number): BigInt;
     readInt8(offset: number, noAssert?: boolean): number;
     readInt16LE(offset: number, noAssert?: boolean): number;
     readInt16BE(offset: number, noAssert?: boolean): number;
     readInt32LE(offset: number, noAssert?: boolean): number;
     readInt32BE(offset: number, noAssert?: boolean): number;
+    readBigInt64LE(offset: number): BigInt;
+    readBigInt64BE(offset: number): BigInt;
     readFloatLE(offset: number, noAssert?: boolean): number;
     readFloatBE(offset: number, noAssert?: boolean): number;
     readDoubleLE(offset: number, noAssert?: boolean): number;
@@ -38,11 +42,15 @@ export class Buffer extends Uint8Array {
     writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
     writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
     writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
+    writeBigUInt64LE(value: number, offset: number): BigInt;
+    writeBigUInt64BE(value: number, offset: number): BigInt;
     writeInt8(value: number, offset: number, noAssert?: boolean): number;
     writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
     writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
     writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
     writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
+    writeBigInt64LE(value: number, offset: number): BigInt;
+    writeBigInt64BE(value: number, offset: number): BigInt;
     writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
     writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
     writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;