diff --git a/index.d.ts b/index.d.ts index 623a6613..0227c9c2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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; @@ -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. @@ -182,4 +183,4 @@ export class Buffer extends Uint8Array { * @param size count of octets to allocate */ static allocUnsafeSlow(size: number): Buffer; -} \ No newline at end of file +}