@types/node 10.17.38 → 10.17.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node v10.17/README.md +1 -1
- node v10.17/child_process.d.ts +6 -6
- node v10.17/dgram.d.ts +1 -1
- node v10.17/globals.d.ts +5 -5
- node v10.17/http.d.ts +2 -2
- node v10.17/http2.d.ts +1 -1
- node v10.17/package.json +2 -2
- node v10.17/perf_hooks.d.ts +1 -1
- node v10.17/punycode.d.ts +58 -2
- node v10.17/stream.d.ts +5 -2
- node v10.17/tls.d.ts +3 -3
- node v10.17/url.d.ts +1 -1
- node v10.17/vm.d.ts +1 -1
- node v10.17/worker_threads.d.ts +2 -2
- node v10.17/zlib.d.ts +99 -16
node v10.17/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v10.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 21 Oct 2020 21:01:55 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v10.17/child_process.d.ts
CHANGED
|
@@ -243,19 +243,19 @@ declare module "child_process" {
|
|
|
243
243
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
244
244
|
namespace execFile {
|
|
245
245
|
function __promisify__(file: string): Promise<{ stdout: string, stderr: string }>;
|
|
246
|
-
function __promisify__(file: string, args: string
|
|
246
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): Promise<{ stdout: string, stderr: string }>;
|
|
247
247
|
function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>;
|
|
248
|
-
function __promisify__(file: string, args: string
|
|
248
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): Promise<{ stdout: Buffer, stderr: Buffer }>;
|
|
249
249
|
function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>;
|
|
250
|
-
function __promisify__(file: string, args: string
|
|
250
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): Promise<{ stdout: string, stderr: string }>;
|
|
251
251
|
function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
252
|
-
function __promisify__(file: string, args: string
|
|
252
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithOtherEncoding): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
253
253
|
function __promisify__(file: string, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>;
|
|
254
|
-
function __promisify__(file: string, args: string
|
|
254
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): Promise<{ stdout: string, stderr: string }>;
|
|
255
255
|
function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
256
256
|
function __promisify__(
|
|
257
257
|
file: string,
|
|
258
|
-
args: string
|
|
258
|
+
args: ReadonlyArray<string> | undefined | null,
|
|
259
259
|
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
|
|
260
260
|
): Promise<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
261
261
|
}
|
node v10.17/dgram.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare module "dgram" {
|
|
|
29
29
|
function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
30
30
|
|
|
31
31
|
class Socket extends events.EventEmitter {
|
|
32
|
-
send(msg: Buffer | string | Uint8Array | any
|
|
32
|
+
send(msg: Buffer | string | Uint8Array | ReadonlyArray<any>, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
33
33
|
send(msg: Buffer | string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
34
34
|
bind(port?: number, address?: string, callback?: () => void): void;
|
|
35
35
|
bind(port?: number, callback?: () => void): void;
|
node v10.17/globals.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ interface Console {
|
|
|
62
62
|
* This method does not display anything unless used in the inspector.
|
|
63
63
|
* Prints to `stdout` the array `array` formatted as a table.
|
|
64
64
|
*/
|
|
65
|
-
table(tabularData: any, properties?: string
|
|
65
|
+
table(tabularData: any, properties?: ReadonlyArray<string>): void;
|
|
66
66
|
/**
|
|
67
67
|
* Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
|
|
68
68
|
*/
|
|
@@ -331,7 +331,7 @@ declare const Buffer: {
|
|
|
331
331
|
* @param array The octets to store.
|
|
332
332
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
333
333
|
*/
|
|
334
|
-
new(array: any
|
|
334
|
+
new(array: ReadonlyArray<any>): Buffer;
|
|
335
335
|
/**
|
|
336
336
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
337
337
|
*
|
|
@@ -353,7 +353,7 @@ declare const Buffer: {
|
|
|
353
353
|
* Creates a new Buffer using the passed {data}
|
|
354
354
|
* @param data data to create a new Buffer
|
|
355
355
|
*/
|
|
356
|
-
from(data: any
|
|
356
|
+
from(data: ReadonlyArray<any>): Buffer;
|
|
357
357
|
from(data: Uint8Array): Buffer;
|
|
358
358
|
/**
|
|
359
359
|
* Creates a new buffer containing the coerced value of an object
|
|
@@ -404,7 +404,7 @@ declare const Buffer: {
|
|
|
404
404
|
* @param totalLength Total length of the buffers when concatenated.
|
|
405
405
|
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
406
406
|
*/
|
|
407
|
-
concat(list: Uint8Array
|
|
407
|
+
concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
|
|
408
408
|
/**
|
|
409
409
|
* The same as buf1.compare(buf2).
|
|
410
410
|
*/
|
|
@@ -739,7 +739,7 @@ declare namespace NodeJS {
|
|
|
739
739
|
getegid(): number;
|
|
740
740
|
setegid(id: number | string): void;
|
|
741
741
|
getgroups(): number[];
|
|
742
|
-
setgroups(groups:
|
|
742
|
+
setgroups(groups: ReadonlyArray<string | number>): void;
|
|
743
743
|
setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
|
|
744
744
|
hasUncaughtExceptionCaptureCallback(): boolean;
|
|
745
745
|
version: string;
|
node v10.17/http.d.ts
CHANGED
|
@@ -134,13 +134,13 @@ declare module "http" {
|
|
|
134
134
|
constructor();
|
|
135
135
|
|
|
136
136
|
setTimeout(msecs: number, callback?: () => void): this;
|
|
137
|
-
setHeader(name: string, value: number | string | string
|
|
137
|
+
setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
|
|
138
138
|
getHeader(name: string): number | string | string[] | undefined;
|
|
139
139
|
getHeaders(): OutgoingHttpHeaders;
|
|
140
140
|
getHeaderNames(): string[];
|
|
141
141
|
hasHeader(name: string): boolean;
|
|
142
142
|
removeHeader(name: string): void;
|
|
143
|
-
addTrailers(headers: OutgoingHttpHeaders |
|
|
143
|
+
addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
|
144
144
|
flushHeaders(): void;
|
|
145
145
|
}
|
|
146
146
|
|
node v10.17/http2.d.ts
CHANGED
|
@@ -571,7 +571,7 @@ declare module "http2" {
|
|
|
571
571
|
readonly headersSent: boolean;
|
|
572
572
|
removeHeader(name: string): void;
|
|
573
573
|
sendDate: boolean;
|
|
574
|
-
setHeader(name: string, value: number | string | string
|
|
574
|
+
setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
|
|
575
575
|
setTimeout(msecs: number, callback?: () => void): void;
|
|
576
576
|
socket: net.Socket | tls.TLSSocket;
|
|
577
577
|
statusCode: number;
|
node v10.17/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.17.
|
|
3
|
+
"version": "10.17.42",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -196,6 +196,6 @@
|
|
|
196
196
|
},
|
|
197
197
|
"scripts": {},
|
|
198
198
|
"dependencies": {},
|
|
199
|
-
"typesPublisherContentHash": "
|
|
199
|
+
"typesPublisherContentHash": "d8f78b67817e1e8469341e8c26b1885119bf28dbb40e64f77e0730be1087b478",
|
|
200
200
|
"typeScriptVersion": "3.2"
|
|
201
201
|
}
|
node v10.17/perf_hooks.d.ts
CHANGED
|
@@ -155,7 +155,7 @@ declare module "perf_hooks" {
|
|
|
155
155
|
* Property buffered defaults to false.
|
|
156
156
|
* @param options
|
|
157
157
|
*/
|
|
158
|
-
observe(options: { entryTypes: string
|
|
158
|
+
observe(options: { entryTypes: ReadonlyArray<string>, buffered?: boolean }): void;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
namespace constants {
|
node v10.17/punycode.d.ts
CHANGED
|
@@ -1,12 +1,68 @@
|
|
|
1
1
|
declare module "punycode" {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated since v7.0.0
|
|
4
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
5
|
+
* In a future major version of Node.js this module will be removed.
|
|
6
|
+
* Users currently depending on the punycode module should switch to using
|
|
7
|
+
* the userland-provided Punycode.js module instead.
|
|
8
|
+
*/
|
|
2
9
|
function decode(string: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated since v7.0.0
|
|
12
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
13
|
+
* In a future major version of Node.js this module will be removed.
|
|
14
|
+
* Users currently depending on the punycode module should switch to using
|
|
15
|
+
* the userland-provided Punycode.js module instead.
|
|
16
|
+
*/
|
|
3
17
|
function encode(string: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated since v7.0.0
|
|
20
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
21
|
+
* In a future major version of Node.js this module will be removed.
|
|
22
|
+
* Users currently depending on the punycode module should switch to using
|
|
23
|
+
* the userland-provided Punycode.js module instead.
|
|
24
|
+
*/
|
|
4
25
|
function toUnicode(domain: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated since v7.0.0
|
|
28
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
29
|
+
* In a future major version of Node.js this module will be removed.
|
|
30
|
+
* Users currently depending on the punycode module should switch to using
|
|
31
|
+
* the userland-provided Punycode.js module instead.
|
|
32
|
+
*/
|
|
5
33
|
function toASCII(domain: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated since v7.0.0
|
|
36
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
37
|
+
* In a future major version of Node.js this module will be removed.
|
|
38
|
+
* Users currently depending on the punycode module should switch to using
|
|
39
|
+
* the userland-provided Punycode.js module instead.
|
|
40
|
+
*/
|
|
6
41
|
const ucs2: ucs2;
|
|
7
42
|
interface ucs2 {
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated since v7.0.0
|
|
45
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
46
|
+
* In a future major version of Node.js this module will be removed.
|
|
47
|
+
* Users currently depending on the punycode module should switch to using
|
|
48
|
+
* the userland-provided Punycode.js module instead.
|
|
49
|
+
*/
|
|
8
50
|
decode(string: string): number[];
|
|
9
|
-
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated since v7.0.0
|
|
53
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
54
|
+
* In a future major version of Node.js this module will be removed.
|
|
55
|
+
* Users currently depending on the punycode module should switch to using
|
|
56
|
+
* the userland-provided Punycode.js module instead.
|
|
57
|
+
*/
|
|
58
|
+
encode(codePoints: ReadonlyArray<number>): string;
|
|
10
59
|
}
|
|
11
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated since v7.0.0
|
|
62
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
63
|
+
* In a future major version of Node.js this module will be removed.
|
|
64
|
+
* Users currently depending on the punycode module should switch to using
|
|
65
|
+
* the userland-provided Punycode.js module instead.
|
|
66
|
+
*/
|
|
67
|
+
const version: string;
|
|
12
68
|
}
|
node v10.17/stream.d.ts
CHANGED
|
@@ -273,7 +273,10 @@ declare module "stream" {
|
|
|
273
273
|
stream5: T,
|
|
274
274
|
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
275
275
|
): T;
|
|
276
|
-
function pipeline(
|
|
276
|
+
function pipeline(
|
|
277
|
+
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
|
278
|
+
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
279
|
+
): NodeJS.WritableStream;
|
|
277
280
|
function pipeline(
|
|
278
281
|
stream1: NodeJS.ReadableStream,
|
|
279
282
|
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
@@ -290,7 +293,7 @@ declare module "stream" {
|
|
|
290
293
|
stream4: NodeJS.ReadWriteStream,
|
|
291
294
|
stream5: NodeJS.WritableStream,
|
|
292
295
|
): Promise<void>;
|
|
293
|
-
function __promisify__(streams:
|
|
296
|
+
function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
|
|
294
297
|
function __promisify__(
|
|
295
298
|
stream1: NodeJS.ReadableStream,
|
|
296
299
|
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
node v10.17/tls.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ declare module "tls" {
|
|
|
114
114
|
* An array of strings or a Buffer naming possible NPN protocols.
|
|
115
115
|
* (Protocols should be ordered by their priority.)
|
|
116
116
|
*/
|
|
117
|
-
NPNProtocols?: string
|
|
117
|
+
NPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
|
|
118
118
|
/**
|
|
119
119
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
120
120
|
* (Protocols should be ordered by their priority.) When the server
|
|
@@ -122,7 +122,7 @@ declare module "tls" {
|
|
|
122
122
|
* precedence over NPN and the server does not send an NPN extension
|
|
123
123
|
* to the client.
|
|
124
124
|
*/
|
|
125
|
-
ALPNProtocols?: string
|
|
125
|
+
ALPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
|
|
126
126
|
/**
|
|
127
127
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
128
128
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -447,7 +447,7 @@ declare module "tls" {
|
|
|
447
447
|
function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
448
448
|
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
449
449
|
function createSecurePair(credentials?: crypto.Credentials, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
|
|
450
|
-
function createSecureContext(
|
|
450
|
+
function createSecureContext(options?: SecureContextOptions): SecureContext;
|
|
451
451
|
function getCiphers(): string[];
|
|
452
452
|
|
|
453
453
|
/**
|
node v10.17/url.d.ts
CHANGED
|
@@ -86,7 +86,7 @@ declare module "url" {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
class URLSearchParams implements Iterable<[string, string]> {
|
|
89
|
-
constructor(init?: URLSearchParams | string | { [key: string]: string | string
|
|
89
|
+
constructor(init?: URLSearchParams | string | { [key: string]: string | ReadonlyArray<string> | undefined } | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
|
|
90
90
|
append(name: string, value: string): void;
|
|
91
91
|
delete(name: string): void;
|
|
92
92
|
entries(): IterableIterator<[string, string]>;
|
node v10.17/vm.d.ts
CHANGED
|
@@ -75,5 +75,5 @@ declare module "vm" {
|
|
|
75
75
|
function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
|
|
76
76
|
function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
|
|
77
77
|
function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
|
|
78
|
-
function compileFunction(code: string, params?: string
|
|
78
|
+
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
|
|
79
79
|
}
|
node v10.17/worker_threads.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare module "worker_threads" {
|
|
|
14
14
|
|
|
15
15
|
class MessagePort extends EventEmitter {
|
|
16
16
|
close(): void;
|
|
17
|
-
postMessage(value: any, transferList?:
|
|
17
|
+
postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
|
|
18
18
|
ref(): void;
|
|
19
19
|
unref(): void;
|
|
20
20
|
start(): void;
|
|
@@ -68,7 +68,7 @@ declare module "worker_threads" {
|
|
|
68
68
|
|
|
69
69
|
constructor(filename: string, options?: WorkerOptions);
|
|
70
70
|
|
|
71
|
-
postMessage(value: any, transferList?:
|
|
71
|
+
postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
|
|
72
72
|
ref(): void;
|
|
73
73
|
unref(): void;
|
|
74
74
|
terminate(callback?: (err: any, exitCode: number) => void): void;
|
node v10.17/zlib.d.ts
CHANGED
|
@@ -40,7 +40,8 @@ declare module "zlib" {
|
|
|
40
40
|
readonly bytesWritten: number;
|
|
41
41
|
shell?: boolean | string;
|
|
42
42
|
close(callback?: () => void): void;
|
|
43
|
-
flush(kind?: number
|
|
43
|
+
flush(kind?: number, callback?: () => void): void;
|
|
44
|
+
flush(callback?: () => void): void;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
interface ZlibParams {
|
|
@@ -77,30 +78,74 @@ declare module "zlib" {
|
|
|
77
78
|
|
|
78
79
|
function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
79
80
|
function brotliCompress(buf: InputType, callback: CompressCallback): void;
|
|
81
|
+
namespace brotliCompress {
|
|
82
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
|
|
83
|
+
}
|
|
84
|
+
|
|
80
85
|
function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
|
|
86
|
+
|
|
81
87
|
function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
82
88
|
function brotliDecompress(buf: InputType, callback: CompressCallback): void;
|
|
89
|
+
namespace brotliDecompress {
|
|
90
|
+
function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
|
|
91
|
+
}
|
|
92
|
+
|
|
83
93
|
function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
|
|
84
|
-
|
|
85
|
-
function deflate(buf: InputType,
|
|
94
|
+
|
|
95
|
+
function deflate(buf: InputType, callback: CompressCallback): void;
|
|
96
|
+
function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
97
|
+
namespace deflate {
|
|
98
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
99
|
+
}
|
|
100
|
+
|
|
86
101
|
function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
87
|
-
|
|
88
|
-
function deflateRaw(buf: InputType,
|
|
102
|
+
|
|
103
|
+
function deflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
104
|
+
function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
105
|
+
namespace deflateRaw {
|
|
106
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
107
|
+
}
|
|
108
|
+
|
|
89
109
|
function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
90
|
-
|
|
91
|
-
function gzip(buf: InputType,
|
|
110
|
+
|
|
111
|
+
function gzip(buf: InputType, callback: CompressCallback): void;
|
|
112
|
+
function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
113
|
+
namespace gzip {
|
|
114
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
115
|
+
}
|
|
116
|
+
|
|
92
117
|
function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
93
|
-
|
|
94
|
-
function gunzip(buf: InputType,
|
|
118
|
+
|
|
119
|
+
function gunzip(buf: InputType, callback: CompressCallback): void;
|
|
120
|
+
function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
121
|
+
namespace gunzip {
|
|
122
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
123
|
+
}
|
|
124
|
+
|
|
95
125
|
function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
96
|
-
|
|
97
|
-
function inflate(buf: InputType,
|
|
126
|
+
|
|
127
|
+
function inflate(buf: InputType, callback: CompressCallback): void;
|
|
128
|
+
function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
129
|
+
namespace inflate {
|
|
130
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
131
|
+
}
|
|
132
|
+
|
|
98
133
|
function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
99
|
-
|
|
100
|
-
function inflateRaw(buf: InputType,
|
|
134
|
+
|
|
135
|
+
function inflateRaw(buf: InputType, callback: CompressCallback): void;
|
|
136
|
+
function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
137
|
+
namespace inflateRaw {
|
|
138
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
139
|
+
}
|
|
140
|
+
|
|
101
141
|
function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
102
|
-
|
|
103
|
-
function unzip(buf: InputType,
|
|
142
|
+
|
|
143
|
+
function unzip(buf: InputType, callback: CompressCallback): void;
|
|
144
|
+
function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
145
|
+
namespace unzip {
|
|
146
|
+
function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
|
|
147
|
+
}
|
|
148
|
+
|
|
104
149
|
function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
105
150
|
|
|
106
151
|
namespace constants {
|
|
@@ -210,35 +255,73 @@ declare module "zlib" {
|
|
|
210
255
|
const BROTLI_PARAM_SIZE_HINT: number;
|
|
211
256
|
}
|
|
212
257
|
|
|
213
|
-
//
|
|
258
|
+
// Allowed flush values.
|
|
259
|
+
/** @deprecated Use `constants.Z_NO_FLUSH` */
|
|
214
260
|
const Z_NO_FLUSH: number;
|
|
261
|
+
/** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
|
|
215
262
|
const Z_PARTIAL_FLUSH: number;
|
|
263
|
+
/** @deprecated Use `constants.Z_SYNC_FLUSH` */
|
|
216
264
|
const Z_SYNC_FLUSH: number;
|
|
265
|
+
/** @deprecated Use `constants.Z_FULL_FLUSH` */
|
|
217
266
|
const Z_FULL_FLUSH: number;
|
|
267
|
+
/** @deprecated Use `constants.Z_FINISH` */
|
|
218
268
|
const Z_FINISH: number;
|
|
269
|
+
/** @deprecated Use `constants.Z_BLOCK` */
|
|
219
270
|
const Z_BLOCK: number;
|
|
271
|
+
/** @deprecated Use `constants.Z_TREES` */
|
|
220
272
|
const Z_TREES: number;
|
|
273
|
+
|
|
274
|
+
// Return codes for the compression/decompression functions.
|
|
275
|
+
// Negative values are errors, positive values are used for special but normal events.
|
|
276
|
+
/** @deprecated Use `constants.Z_OK` */
|
|
221
277
|
const Z_OK: number;
|
|
278
|
+
/** @deprecated Use `constants.Z_STREAM_END` */
|
|
222
279
|
const Z_STREAM_END: number;
|
|
280
|
+
/** @deprecated Use `constants.Z_NEED_DICT` */
|
|
223
281
|
const Z_NEED_DICT: number;
|
|
282
|
+
/** @deprecated Use `constants.Z_ERRNO` */
|
|
224
283
|
const Z_ERRNO: number;
|
|
284
|
+
/** @deprecated Use `constants.Z_STREAM_ERROR` */
|
|
225
285
|
const Z_STREAM_ERROR: number;
|
|
286
|
+
/** @deprecated Use `constants.Z_DATA_ERROR` */
|
|
226
287
|
const Z_DATA_ERROR: number;
|
|
288
|
+
/** @deprecated Use `constants.Z_MEM_ERROR` */
|
|
227
289
|
const Z_MEM_ERROR: number;
|
|
290
|
+
/** @deprecated Use `constants.Z_BUF_ERROR` */
|
|
228
291
|
const Z_BUF_ERROR: number;
|
|
292
|
+
/** @deprecated Use `constants.Z_VERSION_ERROR` */
|
|
229
293
|
const Z_VERSION_ERROR: number;
|
|
294
|
+
|
|
295
|
+
// Compression levels.
|
|
296
|
+
/** @deprecated Use `constants.Z_NO_COMPRESSION` */
|
|
230
297
|
const Z_NO_COMPRESSION: number;
|
|
298
|
+
/** @deprecated Use `constants.Z_BEST_SPEED` */
|
|
231
299
|
const Z_BEST_SPEED: number;
|
|
300
|
+
/** @deprecated Use `constants.Z_BEST_COMPRESSION` */
|
|
232
301
|
const Z_BEST_COMPRESSION: number;
|
|
302
|
+
/** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
|
|
233
303
|
const Z_DEFAULT_COMPRESSION: number;
|
|
304
|
+
|
|
305
|
+
// Compression strategy.
|
|
306
|
+
/** @deprecated Use `constants.Z_FILTERED` */
|
|
234
307
|
const Z_FILTERED: number;
|
|
308
|
+
/** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
|
|
235
309
|
const Z_HUFFMAN_ONLY: number;
|
|
310
|
+
/** @deprecated Use `constants.Z_RLE` */
|
|
236
311
|
const Z_RLE: number;
|
|
312
|
+
/** @deprecated Use `constants.Z_FIXED` */
|
|
237
313
|
const Z_FIXED: number;
|
|
314
|
+
/** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
|
|
238
315
|
const Z_DEFAULT_STRATEGY: number;
|
|
316
|
+
|
|
317
|
+
/** @deprecated */
|
|
239
318
|
const Z_BINARY: number;
|
|
319
|
+
/** @deprecated */
|
|
240
320
|
const Z_TEXT: number;
|
|
321
|
+
/** @deprecated */
|
|
241
322
|
const Z_ASCII: number;
|
|
323
|
+
/** @deprecated */
|
|
242
324
|
const Z_UNKNOWN: number;
|
|
325
|
+
/** @deprecated */
|
|
243
326
|
const Z_DEFLATED: number;
|
|
244
327
|
}
|