@types/node 10.17.36 → 10.17.40
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/assert.d.ts +23 -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 +2 -2
- 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 +103 -0
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: Fri, 16 Oct 2020 16:30:54 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/assert.d.ts
CHANGED
|
@@ -62,7 +62,29 @@ declare module 'assert' {
|
|
|
62
62
|
message?: string | Error,
|
|
63
63
|
): Promise<void>;
|
|
64
64
|
|
|
65
|
-
const strict:
|
|
65
|
+
const strict: Omit<
|
|
66
|
+
typeof assert,
|
|
67
|
+
| 'strict'
|
|
68
|
+
| 'deepEqual'
|
|
69
|
+
| 'notDeepEqual'
|
|
70
|
+
| 'equal'
|
|
71
|
+
| 'notEqual'
|
|
72
|
+
| 'ok'
|
|
73
|
+
| 'strictEqual'
|
|
74
|
+
| 'deepStrictEqual'
|
|
75
|
+
| 'ifError'
|
|
76
|
+
> & {
|
|
77
|
+
(value: any, message?: string | Error): asserts value;
|
|
78
|
+
strict: typeof strict;
|
|
79
|
+
deepEqual: typeof deepStrictEqual;
|
|
80
|
+
notDeepEqual: typeof notDeepStrictEqual;
|
|
81
|
+
equal: typeof strictEqual;
|
|
82
|
+
notEqual: typeof notStrictEqual;
|
|
83
|
+
ok(value: any, message?: string | Error): asserts value;
|
|
84
|
+
strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
|
|
85
|
+
deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
|
|
86
|
+
ifError(value: any): asserts value is null | undefined;
|
|
87
|
+
};
|
|
66
88
|
}
|
|
67
89
|
|
|
68
90
|
export = assert;
|
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.40",
|
|
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": "572ed54bbcf7d36285d67614b3ad58d09bc184ff57a1b5153a15ca4aa036b3a6",
|
|
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
|
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
|
@@ -10,6 +10,28 @@ declare module "zlib" {
|
|
|
10
10
|
memLevel?: number; // compression only
|
|
11
11
|
strategy?: number; // compression only
|
|
12
12
|
dictionary?: Buffer | NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
|
13
|
+
info?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface BrotliOptions {
|
|
17
|
+
/**
|
|
18
|
+
* @default constants.BROTLI_OPERATION_PROCESS
|
|
19
|
+
*/
|
|
20
|
+
flush?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @default constants.BROTLI_OPERATION_FINISH
|
|
23
|
+
*/
|
|
24
|
+
finishFlush?: number;
|
|
25
|
+
/**
|
|
26
|
+
* @default 16*1024
|
|
27
|
+
*/
|
|
28
|
+
chunkSize?: number;
|
|
29
|
+
params?: {
|
|
30
|
+
/**
|
|
31
|
+
* Each key is a `constants.BROTLI_*` constant.
|
|
32
|
+
*/
|
|
33
|
+
[key: number]: boolean | number;
|
|
34
|
+
};
|
|
13
35
|
}
|
|
14
36
|
|
|
15
37
|
interface Zlib {
|
|
@@ -29,6 +51,8 @@ declare module "zlib" {
|
|
|
29
51
|
reset(): void;
|
|
30
52
|
}
|
|
31
53
|
|
|
54
|
+
interface BrotliCompress extends stream.Transform, Zlib { }
|
|
55
|
+
interface BrotliDecompress extends stream.Transform, Zlib { }
|
|
32
56
|
interface Gzip extends stream.Transform, Zlib { }
|
|
33
57
|
interface Gunzip extends stream.Transform, Zlib { }
|
|
34
58
|
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
|
|
@@ -37,6 +61,8 @@ declare module "zlib" {
|
|
|
37
61
|
interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
|
|
38
62
|
interface Unzip extends stream.Transform, Zlib { }
|
|
39
63
|
|
|
64
|
+
function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
|
|
65
|
+
function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
|
|
40
66
|
function createGzip(options?: ZlibOptions): Gzip;
|
|
41
67
|
function createGunzip(options?: ZlibOptions): Gunzip;
|
|
42
68
|
function createDeflate(options?: ZlibOptions): Deflate;
|
|
@@ -46,6 +72,15 @@ declare module "zlib" {
|
|
|
46
72
|
function createUnzip(options?: ZlibOptions): Unzip;
|
|
47
73
|
|
|
48
74
|
type InputType = string | Buffer | DataView | ArrayBuffer | NodeJS.TypedArray;
|
|
75
|
+
|
|
76
|
+
type CompressCallback = (error: Error | null, result: Buffer) => void;
|
|
77
|
+
|
|
78
|
+
function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
79
|
+
function brotliCompress(buf: InputType, callback: CompressCallback): void;
|
|
80
|
+
function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
|
|
81
|
+
function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
|
|
82
|
+
function brotliDecompress(buf: InputType, callback: CompressCallback): void;
|
|
83
|
+
function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
|
|
49
84
|
function deflate(buf: InputType, callback: (error: Error | null, result: Buffer) => void): void;
|
|
50
85
|
function deflate(buf: InputType, options: ZlibOptions, callback: (error: Error | null, result: Buffer) => void): void;
|
|
51
86
|
function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
@@ -105,6 +140,74 @@ declare module "zlib" {
|
|
|
105
140
|
const Z_RLE: number;
|
|
106
141
|
const Z_FIXED: number;
|
|
107
142
|
const Z_DEFAULT_STRATEGY: number;
|
|
143
|
+
|
|
144
|
+
const BROTLI_DECODE: number;
|
|
145
|
+
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
|
|
146
|
+
const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
|
|
147
|
+
const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
|
|
148
|
+
const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
|
|
149
|
+
const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
|
|
150
|
+
const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
|
|
151
|
+
const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
|
|
152
|
+
const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
|
|
153
|
+
const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
|
|
154
|
+
const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
|
|
155
|
+
const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
|
|
156
|
+
const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
|
|
157
|
+
const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
|
|
158
|
+
const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
|
|
159
|
+
const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
|
|
160
|
+
const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
|
|
161
|
+
const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
|
|
162
|
+
const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
|
|
163
|
+
const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
|
|
164
|
+
const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
|
|
165
|
+
const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
|
|
166
|
+
const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
|
|
167
|
+
const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
|
|
168
|
+
const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
|
|
169
|
+
const BROTLI_DECODER_ERROR_UNREACHABLE: number;
|
|
170
|
+
const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
|
|
171
|
+
const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
|
|
172
|
+
const BROTLI_DECODER_NO_ERROR: number;
|
|
173
|
+
const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
|
|
174
|
+
const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
|
|
175
|
+
const BROTLI_DECODER_RESULT_ERROR: number;
|
|
176
|
+
const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
|
|
177
|
+
const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
|
|
178
|
+
const BROTLI_DECODER_RESULT_SUCCESS: number;
|
|
179
|
+
const BROTLI_DECODER_SUCCESS: number;
|
|
180
|
+
|
|
181
|
+
const BROTLI_DEFAULT_MODE: number;
|
|
182
|
+
const BROTLI_DEFAULT_QUALITY: number;
|
|
183
|
+
const BROTLI_DEFAULT_WINDOW: number;
|
|
184
|
+
const BROTLI_ENCODE: number;
|
|
185
|
+
const BROTLI_LARGE_MAX_WINDOW_BITS: number;
|
|
186
|
+
const BROTLI_MAX_INPUT_BLOCK_BITS: number;
|
|
187
|
+
const BROTLI_MAX_QUALITY: number;
|
|
188
|
+
const BROTLI_MAX_WINDOW_BITS: number;
|
|
189
|
+
const BROTLI_MIN_INPUT_BLOCK_BITS: number;
|
|
190
|
+
const BROTLI_MIN_QUALITY: number;
|
|
191
|
+
const BROTLI_MIN_WINDOW_BITS: number;
|
|
192
|
+
|
|
193
|
+
const BROTLI_MODE_FONT: number;
|
|
194
|
+
const BROTLI_MODE_GENERIC: number;
|
|
195
|
+
const BROTLI_MODE_TEXT: number;
|
|
196
|
+
|
|
197
|
+
const BROTLI_OPERATION_EMIT_METADATA: number;
|
|
198
|
+
const BROTLI_OPERATION_FINISH: number;
|
|
199
|
+
const BROTLI_OPERATION_FLUSH: number;
|
|
200
|
+
const BROTLI_OPERATION_PROCESS: number;
|
|
201
|
+
|
|
202
|
+
const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
|
|
203
|
+
const BROTLI_PARAM_LARGE_WINDOW: number;
|
|
204
|
+
const BROTLI_PARAM_LGBLOCK: number;
|
|
205
|
+
const BROTLI_PARAM_LGWIN: number;
|
|
206
|
+
const BROTLI_PARAM_MODE: number;
|
|
207
|
+
const BROTLI_PARAM_NDIRECT: number;
|
|
208
|
+
const BROTLI_PARAM_NPOSTFIX: number;
|
|
209
|
+
const BROTLI_PARAM_QUALITY: number;
|
|
210
|
+
const BROTLI_PARAM_SIZE_HINT: number;
|
|
108
211
|
}
|
|
109
212
|
|
|
110
213
|
// Constants
|