@types/node 14.11.11 → 14.14.3

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/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.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 20 Oct 2020 06:54:48 GMT
11
+ * Last updated: Sun, 25 Oct 2020 21:14:09 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node/fs/promises.d.ts CHANGED
@@ -4,7 +4,8 @@ declare module 'fs/promises' {
4
4
  WriteVResult,
5
5
  ReadVResult,
6
6
  PathLike,
7
- RmDirAsyncOptions,
7
+ RmDirOptions,
8
+ RmOptions,
8
9
  MakeDirectoryOptions,
9
10
  Dirent,
10
11
  OpenDirOptions,
@@ -255,7 +256,12 @@ declare module 'fs/promises' {
255
256
  * Asynchronous rmdir(2) - delete a directory.
256
257
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
257
258
  */
258
- function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
259
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
260
+
261
+ /**
262
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
263
+ */
264
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
259
265
 
260
266
  /**
261
267
  * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
@@ -409,6 +415,16 @@ declare module 'fs/promises' {
409
415
  */
410
416
  function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
411
417
 
418
+ /**
419
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
420
+ * with the difference that if the path refers to a symbolic link, then the link is not
421
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
422
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
423
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
424
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
425
+ */
426
+ function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
427
+
412
428
  /**
413
429
  * Asynchronous fchown(2) - Change ownership of a file.
414
430
  * @param handle A `FileHandle`.
node/fs.d.ts CHANGED
@@ -427,6 +427,39 @@ declare module "fs" {
427
427
  */
428
428
  export function lchownSync(path: PathLike, uid: number, gid: number): void;
429
429
 
430
+ /**
431
+ * Changes the access and modification times of a file in the same way as `fs.utimes()`,
432
+ * with the difference that if the path refers to a symbolic link, then the link is not
433
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
434
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
435
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
436
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
437
+ */
438
+ export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
439
+
440
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
441
+ export namespace lutimes {
442
+ /**
443
+ * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
444
+ * with the difference that if the path refers to a symbolic link, then the link is not
445
+ * dereferenced: instead, the timestamps of the symbolic link itself are changed.
446
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
447
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
448
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
449
+ */
450
+ function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
451
+ }
452
+
453
+ /**
454
+ * Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
455
+ * or throws an exception when parameters are incorrect or the operation fails.
456
+ * This is the synchronous version of `fs.lutimes()`.
457
+ * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
458
+ * @param atime The last access time. If a string is provided, it will be coerced to number.
459
+ * @param mtime The last modified time. If a string is provided, it will be coerced to number.
460
+ */
461
+ export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
462
+
430
463
  /**
431
464
  * Asynchronous chmod(2) - Change permissions of a file.
432
465
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
@@ -821,31 +854,32 @@ declare module "fs" {
821
854
 
822
855
  export interface RmDirOptions {
823
856
  /**
857
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
858
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
859
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
860
+ * number of retries. This option is ignored if the `recursive` option is not
861
+ * `true`.
862
+ * @default 0
863
+ */
864
+ maxRetries?: number;
865
+ /**
866
+ * @deprecated since v14.14.0 In future versions of Node.js,
867
+ * `fs.rmdir(path, { recursive: true })` will throw on nonexistent
868
+ * paths, or when given a file as a target.
869
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
870
+ *
824
871
  * If `true`, perform a recursive directory removal. In
825
872
  * recursive mode, errors are not reported if `path` does not exist, and
826
873
  * operations are retried on failure.
827
- * @experimental
828
874
  * @default false
829
875
  */
830
876
  recursive?: boolean;
831
- }
832
-
833
- export interface RmDirAsyncOptions extends RmDirOptions {
834
877
  /**
835
878
  * The amount of time in milliseconds to wait between retries.
836
879
  * This option is ignored if the `recursive` option is not `true`.
837
880
  * @default 100
838
881
  */
839
882
  retryDelay?: number;
840
- /**
841
- * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
842
- * `EPERM` error is encountered, Node.js will retry the operation with a linear
843
- * backoff wait of `retryDelay` ms longer on each try. This option represents the
844
- * number of retries. This option is ignored if the `recursive` option is not
845
- * `true`.
846
- * @default 0
847
- */
848
- maxRetries?: number;
849
883
  }
850
884
 
851
885
  /**
@@ -853,7 +887,7 @@ declare module "fs" {
853
887
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
854
888
  */
855
889
  export function rmdir(path: PathLike, callback: NoParamCallback): void;
856
- export function rmdir(path: PathLike, options: RmDirAsyncOptions, callback: NoParamCallback): void;
890
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
857
891
 
858
892
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
859
893
  export namespace rmdir {
@@ -861,7 +895,7 @@ declare module "fs" {
861
895
  * Asynchronous rmdir(2) - delete a directory.
862
896
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
863
897
  */
864
- function __promisify__(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
898
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
865
899
  }
866
900
 
867
901
  /**
@@ -870,6 +904,55 @@ declare module "fs" {
870
904
  */
871
905
  export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
872
906
 
907
+ export interface RmOptions {
908
+ /**
909
+ * When `true`, exceptions will be ignored if `path` does not exist.
910
+ * @default false
911
+ */
912
+ force?: boolean;
913
+ /**
914
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
915
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
916
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
917
+ * number of retries. This option is ignored if the `recursive` option is not
918
+ * `true`.
919
+ * @default 0
920
+ */
921
+ maxRetries?: number;
922
+ /**
923
+ * If `true`, perform a recursive directory removal. In
924
+ * recursive mode, errors are not reported if `path` does not exist, and
925
+ * operations are retried on failure.
926
+ * @default false
927
+ */
928
+ recursive?: boolean;
929
+ /**
930
+ * The amount of time in milliseconds to wait between retries.
931
+ * This option is ignored if the `recursive` option is not `true`.
932
+ * @default 100
933
+ */
934
+ retryDelay?: number;
935
+ }
936
+
937
+ /**
938
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
939
+ */
940
+ export function rm(path: PathLike, callback: NoParamCallback): void;
941
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
942
+
943
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
944
+ export namespace rm {
945
+ /**
946
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
947
+ */
948
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
949
+ }
950
+
951
+ /**
952
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility).
953
+ */
954
+ export function rmSync(path: PathLike, options?: RmOptions): void;
955
+
873
956
  export interface MakeDirectoryOptions {
874
957
  /**
875
958
  * Indicates whether parent folders should be created.
node/globals.d.ts CHANGED
@@ -541,6 +541,7 @@ declare namespace NodeJS {
541
541
  interface Timer extends RefCounted {
542
542
  hasRef(): boolean;
543
543
  refresh(): this;
544
+ [Symbol.toPrimitive](): number;
544
545
  }
545
546
 
546
547
  interface Immediate extends RefCounted {
@@ -551,6 +552,7 @@ declare namespace NodeJS {
551
552
  interface Timeout extends Timer {
552
553
  hasRef(): boolean;
553
554
  refresh(): this;
555
+ [Symbol.toPrimitive](): number;
554
556
  }
555
557
 
556
558
  type TypedArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
node/http.d.ts CHANGED
@@ -51,6 +51,11 @@ declare module "http" {
51
51
  'range'?: string;
52
52
  'referer'?: string;
53
53
  'retry-after'?: string;
54
+ 'sec-websocket-accept'?: string;
55
+ 'sec-websocket-extensions'?: string;
56
+ 'sec-websocket-key'?: string;
57
+ 'sec-websocket-protocol'?: string;
58
+ 'sec-websocket-version'?: string;
54
59
  'set-cookie'?: string[];
55
60
  'strict-transport-security'?: string;
56
61
  'tk'?: string;
@@ -65,7 +70,9 @@ declare module "http" {
65
70
  }
66
71
 
67
72
  // outgoing headers allows numbers (as they are converted internally to strings)
68
- interface OutgoingHttpHeaders extends NodeJS.Dict<number | string | string[]> {
73
+ type OutgoingHttpHeader = number | string | string[];
74
+
75
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
69
76
  }
70
77
 
71
78
  interface ClientRequestArgs {
@@ -188,8 +195,8 @@ declare module "http" {
188
195
  // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
189
196
  // no args in writeContinue callback
190
197
  writeContinue(callback?: () => void): void;
191
- writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this;
192
- writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
198
+ writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
199
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
193
200
  writeProcessing(): void;
194
201
  }
195
202
 
@@ -205,7 +212,9 @@ declare module "http" {
205
212
 
206
213
  // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
207
214
  class ClientRequest extends OutgoingMessage {
208
- aborted: number;
215
+ aborted: boolean;
216
+ host: string;
217
+ protocol: string;
209
218
 
210
219
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
211
220
 
@@ -370,6 +379,7 @@ declare module "http" {
370
379
  class Agent {
371
380
  maxFreeSockets: number;
372
381
  maxSockets: number;
382
+ maxTotalSockets: number;
373
383
  readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
374
384
  readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
375
385
  readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 14.11
1
+ // Type definitions for non-npm package Node.js 14.14
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.11.11",
3
+ "version": "14.14.3",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -246,6 +246,6 @@
246
246
  },
247
247
  "scripts": {},
248
248
  "dependencies": {},
249
- "typesPublisherContentHash": "c2b0b558a90b2111443786aacee9bd00dccbb5b39a303db22beb1f851fd91469",
249
+ "typesPublisherContentHash": "37f5583cc940418a85d23a7e11aef2e57552c324b40ea16cd1e1c1afa95adfe0",
250
250
  "typeScriptVersion": "3.2"
251
251
  }
node/process.d.ts CHANGED
@@ -271,7 +271,7 @@ declare module "process" {
271
271
  /**
272
272
  * Can only be set if not in worker thread.
273
273
  */
274
- umask(mask: number): number;
274
+ umask(mask: string | number): number;
275
275
  uptime(): number;
276
276
  hrtime: HRTime;
277
277
  domain: Domain;
node/tls.d.ts CHANGED
@@ -707,12 +707,14 @@ declare module "tls" {
707
707
  */
708
708
  sessionIdContext?: string;
709
709
  /**
710
- * 48 bytes of cryptographically strong pseudo-random data.
710
+ * 48-bytes of cryptographically strong pseudo-random data.
711
+ * See Session Resumption for more information.
711
712
  */
712
713
  ticketKeys?: Buffer;
713
714
  /**
714
- * The number of seconds after which a TLS session created by the server
715
- * will no longer be resumable.
715
+ * The number of seconds after which a TLS session created by the
716
+ * server will no longer be resumable. See Session Resumption for more
717
+ * information. Default: 300.
716
718
  */
717
719
  sessionTimeout?: number;
718
720
  }
@@ -738,7 +740,7 @@ declare module "tls" {
738
740
  * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
739
741
  */
740
742
  function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
741
- function createSecureContext(details: SecureContextOptions): SecureContext;
743
+ function createSecureContext(options?: SecureContextOptions): SecureContext;
742
744
  function getCiphers(): string[];
743
745
 
744
746
  /**
node/zlib.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ /* tslint:enable: unified-signatures */
1
2
  declare module "zlib" {
2
3
  import * as stream from "stream";
3
4
 
@@ -51,7 +52,8 @@ declare module "zlib" {
51
52
  readonly bytesWritten: number;
52
53
  shell?: boolean | string;
53
54
  close(callback?: () => void): void;
54
- flush(kind?: number | (() => void), callback?: () => void): void;
55
+ flush(kind?: number, callback?: () => void): void;
56
+ flush(callback?: () => void): void;
55
57
  }
56
58
 
57
59
  interface ZlibParams {
@@ -88,69 +90,76 @@ declare module "zlib" {
88
90
 
89
91
  function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
90
92
  function brotliCompress(buf: InputType, callback: CompressCallback): void;
93
+ namespace brotliCompress {
94
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
95
+ }
96
+
91
97
  function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
98
+
92
99
  function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
93
100
  function brotliDecompress(buf: InputType, callback: CompressCallback): void;
101
+ namespace brotliDecompress {
102
+ function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
103
+ }
104
+
94
105
  function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
106
+
95
107
  function deflate(buf: InputType, callback: CompressCallback): void;
96
108
  function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
109
+ namespace deflate {
110
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
111
+ }
112
+
97
113
  function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
114
+
98
115
  function deflateRaw(buf: InputType, callback: CompressCallback): void;
99
116
  function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
117
+ namespace deflateRaw {
118
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
119
+ }
120
+
100
121
  function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
122
+
101
123
  function gzip(buf: InputType, callback: CompressCallback): void;
102
124
  function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
125
+ namespace gzip {
126
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
127
+ }
128
+
103
129
  function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
130
+
104
131
  function gunzip(buf: InputType, callback: CompressCallback): void;
105
132
  function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
133
+ namespace gunzip {
134
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
135
+ }
136
+
106
137
  function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
138
+
107
139
  function inflate(buf: InputType, callback: CompressCallback): void;
108
140
  function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
141
+ namespace inflate {
142
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
143
+ }
144
+
109
145
  function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
146
+
110
147
  function inflateRaw(buf: InputType, callback: CompressCallback): void;
111
148
  function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
149
+ namespace inflateRaw {
150
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
151
+ }
152
+
112
153
  function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
154
+
113
155
  function unzip(buf: InputType, callback: CompressCallback): void;
114
156
  function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
115
- function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
116
-
117
- namespace brotliCompress {
118
- function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
119
- function __promisify__(buffer: InputType): Promise<Buffer>;
120
- }
121
- namespace brotliDecompress {
122
- function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
123
- function __promisify__(buffer: InputType): Promise<Buffer>;
124
- }
125
- namespace deflate {
126
- function __promisify__(buffer: InputType): Promise<Buffer>;
127
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
128
- }
129
- namespace deflateRaw {
130
- function __promisify__(buffer: InputType): Promise<Buffer>;
131
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
132
- }
133
- namespace gzip {
134
- function __promisify__(buffer: InputType): Promise<Buffer>;
135
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
136
- }
137
- namespace gunzip {
138
- function __promisify__(buffer: InputType): Promise<Buffer>;
139
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
140
- }
141
- namespace inflate {
142
- function __promisify__(buffer: InputType): Promise<Buffer>;
143
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
144
- }
145
- namespace inflateRaw {
146
- function __promisify__(buffer: InputType): Promise<Buffer>;
147
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
148
- }
149
157
  namespace unzip {
150
- function __promisify__(buffer: InputType): Promise<Buffer>;
151
- function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
158
+ function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
152
159
  }
153
160
 
161
+ function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
162
+
154
163
  namespace constants {
155
164
  const BROTLI_DECODE: number;
156
165
  const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
@@ -228,165 +237,126 @@ declare module "zlib" {
228
237
  const INFLATERAW: number;
229
238
  const UNZIP: number;
230
239
 
231
- const Z_BEST_COMPRESSION: number;
232
- const Z_BEST_SPEED: number;
240
+ // Allowed flush values.
241
+ const Z_NO_FLUSH: number;
242
+ const Z_PARTIAL_FLUSH: number;
243
+ const Z_SYNC_FLUSH: number;
244
+ const Z_FULL_FLUSH: number;
245
+ const Z_FINISH: number;
233
246
  const Z_BLOCK: number;
234
- const Z_BUF_ERROR: number;
247
+ const Z_TREES: number;
248
+
249
+ // Return codes for the compression/decompression functions.
250
+ // Negative values are errors, positive values are used for special but normal events.
251
+ const Z_OK: number;
252
+ const Z_STREAM_END: number;
253
+ const Z_NEED_DICT: number;
254
+ const Z_ERRNO: number;
255
+ const Z_STREAM_ERROR: number;
235
256
  const Z_DATA_ERROR: number;
257
+ const Z_MEM_ERROR: number;
258
+ const Z_BUF_ERROR: number;
259
+ const Z_VERSION_ERROR: number;
236
260
 
237
- const Z_DEFAULT_CHUNK: number;
261
+ // Compression levels.
262
+ const Z_NO_COMPRESSION: number;
263
+ const Z_BEST_SPEED: number;
264
+ const Z_BEST_COMPRESSION: number;
238
265
  const Z_DEFAULT_COMPRESSION: number;
239
- const Z_DEFAULT_LEVEL: number;
240
- const Z_DEFAULT_MEMLEVEL: number;
241
- const Z_DEFAULT_STRATEGY: number;
242
- const Z_DEFAULT_WINDOWBITS: number;
243
266
 
244
- const Z_ERRNO: number;
267
+ // Compression strategy.
245
268
  const Z_FILTERED: number;
246
- const Z_FINISH: number;
247
- const Z_FIXED: number;
248
- const Z_FULL_FLUSH: number;
249
269
  const Z_HUFFMAN_ONLY: number;
250
- const Z_MAX_CHUNK: number;
251
- const Z_MAX_LEVEL: number;
252
- const Z_MAX_MEMLEVEL: number;
270
+ const Z_RLE: number;
271
+ const Z_FIXED: number;
272
+ const Z_DEFAULT_STRATEGY: number;
273
+
274
+ const Z_DEFAULT_WINDOWBITS: number;
275
+ const Z_MIN_WINDOWBITS: number;
253
276
  const Z_MAX_WINDOWBITS: number;
254
- const Z_MEM_ERROR: number;
277
+
255
278
  const Z_MIN_CHUNK: number;
256
- const Z_MIN_LEVEL: number;
279
+ const Z_MAX_CHUNK: number;
280
+ const Z_DEFAULT_CHUNK: number;
281
+
257
282
  const Z_MIN_MEMLEVEL: number;
258
- const Z_MIN_WINDOWBITS: number;
259
- const Z_NEED_DICT: number;
260
- const Z_NO_COMPRESSION: number;
261
- const Z_NO_FLUSH: number;
262
- const Z_OK: number;
263
- const Z_PARTIAL_FLUSH: number;
264
- const Z_RLE: number;
265
- const Z_STREAM_END: number;
266
- const Z_STREAM_ERROR: number;
267
- const Z_SYNC_FLUSH: number;
268
- const Z_VERSION_ERROR: number;
283
+ const Z_MAX_MEMLEVEL: number;
284
+ const Z_DEFAULT_MEMLEVEL: number;
285
+
286
+ const Z_MIN_LEVEL: number;
287
+ const Z_MAX_LEVEL: number;
288
+ const Z_DEFAULT_LEVEL: number;
289
+
269
290
  const ZLIB_VERNUM: number;
270
291
  }
271
292
 
272
- /**
273
- * @deprecated
274
- */
293
+ // Allowed flush values.
294
+ /** @deprecated Use `constants.Z_NO_FLUSH` */
275
295
  const Z_NO_FLUSH: number;
276
- /**
277
- * @deprecated
278
- */
296
+ /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
279
297
  const Z_PARTIAL_FLUSH: number;
280
- /**
281
- * @deprecated
282
- */
298
+ /** @deprecated Use `constants.Z_SYNC_FLUSH` */
283
299
  const Z_SYNC_FLUSH: number;
284
- /**
285
- * @deprecated
286
- */
300
+ /** @deprecated Use `constants.Z_FULL_FLUSH` */
287
301
  const Z_FULL_FLUSH: number;
288
- /**
289
- * @deprecated
290
- */
302
+ /** @deprecated Use `constants.Z_FINISH` */
291
303
  const Z_FINISH: number;
292
- /**
293
- * @deprecated
294
- */
304
+ /** @deprecated Use `constants.Z_BLOCK` */
295
305
  const Z_BLOCK: number;
296
- /**
297
- * @deprecated
298
- */
306
+ /** @deprecated Use `constants.Z_TREES` */
299
307
  const Z_TREES: number;
300
- /**
301
- * @deprecated
302
- */
308
+
309
+ // Return codes for the compression/decompression functions.
310
+ // Negative values are errors, positive values are used for special but normal events.
311
+ /** @deprecated Use `constants.Z_OK` */
303
312
  const Z_OK: number;
304
- /**
305
- * @deprecated
306
- */
313
+ /** @deprecated Use `constants.Z_STREAM_END` */
307
314
  const Z_STREAM_END: number;
308
- /**
309
- * @deprecated
310
- */
315
+ /** @deprecated Use `constants.Z_NEED_DICT` */
311
316
  const Z_NEED_DICT: number;
312
- /**
313
- * @deprecated
314
- */
317
+ /** @deprecated Use `constants.Z_ERRNO` */
315
318
  const Z_ERRNO: number;
316
- /**
317
- * @deprecated
318
- */
319
+ /** @deprecated Use `constants.Z_STREAM_ERROR` */
319
320
  const Z_STREAM_ERROR: number;
320
- /**
321
- * @deprecated
322
- */
321
+ /** @deprecated Use `constants.Z_DATA_ERROR` */
323
322
  const Z_DATA_ERROR: number;
324
- /**
325
- * @deprecated
326
- */
323
+ /** @deprecated Use `constants.Z_MEM_ERROR` */
327
324
  const Z_MEM_ERROR: number;
328
- /**
329
- * @deprecated
330
- */
325
+ /** @deprecated Use `constants.Z_BUF_ERROR` */
331
326
  const Z_BUF_ERROR: number;
332
- /**
333
- * @deprecated
334
- */
327
+ /** @deprecated Use `constants.Z_VERSION_ERROR` */
335
328
  const Z_VERSION_ERROR: number;
336
- /**
337
- * @deprecated
338
- */
329
+
330
+ // Compression levels.
331
+ /** @deprecated Use `constants.Z_NO_COMPRESSION` */
339
332
  const Z_NO_COMPRESSION: number;
340
- /**
341
- * @deprecated
342
- */
333
+ /** @deprecated Use `constants.Z_BEST_SPEED` */
343
334
  const Z_BEST_SPEED: number;
344
- /**
345
- * @deprecated
346
- */
335
+ /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
347
336
  const Z_BEST_COMPRESSION: number;
348
- /**
349
- * @deprecated
350
- */
337
+ /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
351
338
  const Z_DEFAULT_COMPRESSION: number;
352
- /**
353
- * @deprecated
354
- */
339
+
340
+ // Compression strategy.
341
+ /** @deprecated Use `constants.Z_FILTERED` */
355
342
  const Z_FILTERED: number;
356
- /**
357
- * @deprecated
358
- */
343
+ /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
359
344
  const Z_HUFFMAN_ONLY: number;
360
- /**
361
- * @deprecated
362
- */
345
+ /** @deprecated Use `constants.Z_RLE` */
363
346
  const Z_RLE: number;
364
- /**
365
- * @deprecated
366
- */
347
+ /** @deprecated Use `constants.Z_FIXED` */
367
348
  const Z_FIXED: number;
368
- /**
369
- * @deprecated
370
- */
349
+ /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
371
350
  const Z_DEFAULT_STRATEGY: number;
372
- /**
373
- * @deprecated
374
- */
351
+
352
+ /** @deprecated */
375
353
  const Z_BINARY: number;
376
- /**
377
- * @deprecated
378
- */
354
+ /** @deprecated */
379
355
  const Z_TEXT: number;
380
- /**
381
- * @deprecated
382
- */
356
+ /** @deprecated */
383
357
  const Z_ASCII: number;
384
- /**
385
- * @deprecated
386
- */
358
+ /** @deprecated */
387
359
  const Z_UNKNOWN: number;
388
- /**
389
- * @deprecated
390
- */
360
+ /** @deprecated */
391
361
  const Z_DEFLATED: number;
392
362
  }