@types/node 20.12.7 → 20.12.9
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 +1 -1
- node/assert.d.ts +41 -44
- node/async_hooks.d.ts +17 -15
- node/buffer.d.ts +7 -7
- node/child_process.d.ts +1 -1
- node/cluster.d.ts +1 -1
- node/console.d.ts +1 -1
- node/crypto.d.ts +38 -3
- node/dgram.d.ts +13 -13
- node/diagnostics_channel.d.ts +3 -3
- node/dns.d.ts +1 -1
- node/domain.d.ts +4 -4
- node/events.d.ts +29 -37
- node/fs/promises.d.ts +12 -12
- node/fs.d.ts +37 -37
- node/http.d.ts +4 -4
- node/http2.d.ts +77 -47
- node/https.d.ts +1 -1
- node/inspector.d.ts +4 -4
- node/net.d.ts +50 -8
- node/os.d.ts +28 -11
- node/package.json +2 -2
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +3 -3
- node/process.d.ts +214 -43
- node/punycode.d.ts +4 -4
- node/querystring.d.ts +18 -6
- node/readline/promises.d.ts +9 -9
- node/readline.d.ts +21 -20
- node/repl.d.ts +7 -7
- node/stream/web.d.ts +2 -2
- node/stream.d.ts +8 -6
- node/string_decoder.d.ts +3 -3
- node/test.d.ts +25 -23
- node/timers/promises.d.ts +10 -6
- node/timers.d.ts +5 -5
- node/tls.d.ts +39 -32
- node/trace_events.d.ts +40 -25
- node/tty.d.ts +8 -8
- node/url.d.ts +5 -5
- node/util.d.ts +115 -22
- node/v8.d.ts +6 -6
- node/vm.d.ts +35 -17
- node/wasi.d.ts +1 -1
- node/worker_threads.d.ts +16 -16
- node/zlib.d.ts +16 -3
node/zlib.d.ts
CHANGED
@@ -8,7 +8,8 @@
|
|
8
8
|
* const zlib = require('node:zlib');
|
9
9
|
* ```
|
10
10
|
*
|
11
|
-
* Compression and decompression are built around the Node.js
|
11
|
+
* Compression and decompression are built around the Node.js
|
12
|
+
* [Streams API](https://nodejs.org/docs/latest-v20.x/api/stream.html).
|
12
13
|
*
|
13
14
|
* Compressing or decompressing a stream (such as a file) can be accomplished by
|
14
15
|
* piping the source stream through a `zlib` `Transform` stream into a destination
|
@@ -88,7 +89,7 @@
|
|
88
89
|
* });
|
89
90
|
* ```
|
90
91
|
* @since v0.5.8
|
91
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.2
|
92
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/zlib.js)
|
92
93
|
*/
|
93
94
|
declare module "zlib" {
|
94
95
|
import * as stream from "node:stream";
|
@@ -110,7 +111,14 @@ declare module "zlib" {
|
|
110
111
|
memLevel?: number | undefined; // compression only
|
111
112
|
strategy?: number | undefined; // compression only
|
112
113
|
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
|
114
|
+
/**
|
115
|
+
* If `true`, returns an object with `buffer` and `engine`.
|
116
|
+
*/
|
113
117
|
info?: boolean | undefined;
|
118
|
+
/**
|
119
|
+
* Limits output size when using convenience methods.
|
120
|
+
* @default buffer.kMaxLength
|
121
|
+
*/
|
114
122
|
maxOutputLength?: number | undefined;
|
115
123
|
}
|
116
124
|
interface BrotliOptions {
|
@@ -134,6 +142,10 @@ declare module "zlib" {
|
|
134
142
|
[key: number]: boolean | number;
|
135
143
|
}
|
136
144
|
| undefined;
|
145
|
+
/**
|
146
|
+
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v20.x/api/zlib.html#convenience-methods).
|
147
|
+
* @default buffer.kMaxLength
|
148
|
+
*/
|
137
149
|
maxOutputLength?: number | undefined;
|
138
150
|
}
|
139
151
|
interface Zlib {
|
@@ -194,7 +206,7 @@ declare module "zlib" {
|
|
194
206
|
/**
|
195
207
|
* Creates and returns a new `DeflateRaw` object.
|
196
208
|
*
|
197
|
-
* An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits`is set to 8 for raw deflate streams. zlib would automatically set `windowBits`to 9 if was initially set to 8
|
209
|
+
* An upgrade of zlib from 1.2.8 to 1.2.11 changed behavior when `windowBits` is set to 8 for raw deflate streams. zlib would automatically set `windowBits` to 9 if was initially set to 8. Newer
|
198
210
|
* versions of zlib will throw an exception,
|
199
211
|
* so Node.js restored the original behavior of upgrading a value of 8 to 9,
|
200
212
|
* since passing `windowBits = 9` to zlib actually results in a compressed stream
|
@@ -433,6 +445,7 @@ declare module "zlib" {
|
|
433
445
|
const Z_FIXED: number;
|
434
446
|
const Z_DEFAULT_STRATEGY: number;
|
435
447
|
const Z_DEFAULT_WINDOWBITS: number;
|
448
|
+
|
436
449
|
const Z_MIN_WINDOWBITS: number;
|
437
450
|
const Z_MAX_WINDOWBITS: number;
|
438
451
|
const Z_MIN_CHUNK: number;
|