[node] correct SlowBuffer

This commit is contained in:
Gerhard Stoebich
2019-02-04 19:55:39 +01:00
parent 4835d6430a
commit 8fcf35037f
2 changed files with 8 additions and 12 deletions
+8 -2
View File
@@ -1,6 +1,12 @@
declare module "buffer" {
export const INSPECT_MAX_BYTES: number;
const BuffType: typeof Buffer;
const SlowBuffType: typeof SlowBuffer;
export { BuffType as Buffer, SlowBuffType as SlowBuffer };
export const SlowBuffer: {
/** @deprecated since v6.0.0, use Buffer.allocUnsafeSlow() */
new(size: number): Buffer;
prototype: Buffer;
};
export { BuffType as Buffer };
}
-10
View File
@@ -249,16 +249,6 @@ declare var module: NodeModule;
// Same as module.exports
declare var exports: any;
declare const SlowBuffer: {
new(str: string, encoding?: string): Buffer;
new(size: number): Buffer;
new(size: Uint8Array): Buffer;
new(array: any[]): Buffer;
prototype: Buffer;
isBuffer(obj: any): boolean;
byteLength(string: string, encoding?: string): number;
concat(list: Buffer[], totalLength?: number): Buffer;
};
// Buffer class
type BufferEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "base64" | "latin1" | "binary" | "hex";