Skip to content

Commit

Permalink
Add reverse() method, and allow Buffer.from(Uint8Array)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukstv committed Aug 27, 2019
1 parent d31e0ee commit 8bf89a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class Buffer extends Uint8Array {
readFloatBE(offset: number, noAssert?: boolean): number;
readDoubleLE(offset: number, noAssert?: boolean): number;
readDoubleBE(offset: number, noAssert?: boolean): number;
reverse(): this;
swap16(): Buffer;
swap32(): Buffer;
swap64(): Buffer;
Expand Down Expand Up @@ -113,7 +114,7 @@ export class Buffer extends Uint8Array {
*
* @param buffer
*/
static from(buffer: Buffer): Buffer;
static from(buffer: Buffer | Uint8Array): Buffer;
/**
* Creates a new Buffer containing the given JavaScript string {str}.
* If provided, the {encoding} parameter identifies the character encoding.
Expand Down Expand Up @@ -182,4 +183,4 @@ export class Buffer extends Uint8Array {
* @param size count of octets to allocate
*/
static allocUnsafeSlow(size: number): Buffer;
}
}

0 comments on commit 8bf89a5

Please sign in to comment.