mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
[node] correct SlowBuffer
This commit is contained in:
Vendored
+8
-2
@@ -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 };
|
||||
}
|
||||
|
||||
Vendored
-10
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user