@types/node 20.2.0 → 20.2.2
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 +1 -1
- node/async_hooks.d.ts +1 -1
- node/buffer.d.ts +4 -1
- node/child_process.d.ts +1 -1
- node/cluster.d.ts +1 -1
- node/console.d.ts +1 -1
- node/crypto.d.ts +1 -1
- node/dgram.d.ts +1 -1
- node/diagnostics_channel.d.ts +1 -1
- node/dns.d.ts +1 -1
- node/domain.d.ts +1 -1
- node/events.d.ts +1 -1
- node/fs/promises.d.ts +2 -1
- node/fs.d.ts +3 -2
- node/http.d.ts +1 -1
- node/http2.d.ts +1 -1
- node/https.d.ts +1 -1
- node/inspector.d.ts +1 -1
- node/net.d.ts +1 -1
- node/os.d.ts +1 -1
- node/package.json +2 -2
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +1 -1
- node/punycode.d.ts +1 -1
- node/querystring.d.ts +1 -1
- node/readline.d.ts +1 -1
- node/repl.d.ts +1 -1
- node/stream.d.ts +1 -1
- node/string_decoder.d.ts +1 -1
- node/test.d.ts +50 -27
- node/timers.d.ts +1 -1
- node/tls.d.ts +1 -1
- node/trace_events.d.ts +1 -1
- node/ts4.8/assert.d.ts +1 -1
- node/ts4.8/async_hooks.d.ts +1 -1
- node/ts4.8/buffer.d.ts +4 -1
- node/ts4.8/child_process.d.ts +2 -2
- node/ts4.8/cluster.d.ts +1 -1
- node/ts4.8/console.d.ts +1 -1
- node/ts4.8/crypto.d.ts +1 -1
- node/ts4.8/dgram.d.ts +1 -1
- node/ts4.8/diagnostics_channel.d.ts +1 -1
- node/ts4.8/dns.d.ts +1 -1
- node/ts4.8/domain.d.ts +1 -1
- node/ts4.8/events.d.ts +1 -1
- node/ts4.8/fs.d.ts +3 -2
- node/ts4.8/http.d.ts +5 -4
- node/ts4.8/http2.d.ts +1 -1
- node/ts4.8/https.d.ts +1 -1
- node/ts4.8/inspector.d.ts +1 -1
- node/ts4.8/net.d.ts +1 -1
- node/ts4.8/os.d.ts +1 -1
- node/ts4.8/path.d.ts +1 -1
- node/ts4.8/perf_hooks.d.ts +1 -1
- node/ts4.8/punycode.d.ts +1 -1
- node/ts4.8/querystring.d.ts +1 -1
- node/ts4.8/readline.d.ts +1 -1
- node/ts4.8/repl.d.ts +1 -1
- node/ts4.8/stream.d.ts +1 -1
- node/ts4.8/string_decoder.d.ts +1 -1
- node/ts4.8/test.d.ts +68 -50
- node/ts4.8/timers.d.ts +1 -1
- node/ts4.8/tls.d.ts +1 -1
- node/ts4.8/trace_events.d.ts +1 -1
- node/ts4.8/tty.d.ts +1 -1
- node/ts4.8/url.d.ts +14 -5
- node/ts4.8/util.d.ts +11 -3
- node/ts4.8/v8.d.ts +1 -1
- node/ts4.8/vm.d.ts +1 -1
- node/ts4.8/wasi.d.ts +1 -1
- node/ts4.8/worker_threads.d.ts +1 -1
- node/ts4.8/zlib.d.ts +1 -1
- node/tty.d.ts +1 -1
- node/url.d.ts +14 -5
- node/util.d.ts +1 -1
- node/v8.d.ts +1 -1
- node/vm.d.ts +1 -1
- node/wasi.d.ts +1 -1
- node/worker_threads.d.ts +1 -1
- node/zlib.d.ts +1 -1
node/ts4.8/fs.d.ts
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* All file system operations have synchronous, callback, and promise-based
|
|
18
18
|
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
19
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/fs.js)
|
|
20
20
|
*/
|
|
21
21
|
declare module 'fs' {
|
|
22
22
|
import * as stream from 'node:stream';
|
|
@@ -1246,7 +1246,8 @@ declare module 'fs' {
|
|
|
1246
1246
|
* It can be set to `'dir'`, `'file'`, or `'junction'`. If the `type` argument is
|
|
1247
1247
|
* not a string, Node.js will autodetect `target` type and use `'file'` or `'dir'`.
|
|
1248
1248
|
* If the `target` does not exist, `'file'` will be used. Windows junction points
|
|
1249
|
-
* require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path.
|
|
1249
|
+
* require the destination path to be absolute. When using `'junction'`, the`target` argument will automatically be normalized to absolute path. Junction
|
|
1250
|
+
* points on NTFS volumes can only point to directories.
|
|
1250
1251
|
*
|
|
1251
1252
|
* Relative targets are relative to the link's parent directory.
|
|
1252
1253
|
*
|
node/ts4.8/http.d.ts
CHANGED
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
* 'Host', 'example.com',
|
|
38
38
|
* 'accepT', '*' ]
|
|
39
39
|
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
40
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http.js)
|
|
41
41
|
*/
|
|
42
42
|
declare module 'http' {
|
|
43
43
|
import * as stream from 'node:stream';
|
|
44
44
|
import { URL } from 'node:url';
|
|
45
|
-
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
|
|
46
45
|
import { LookupOptions } from 'node:dns';
|
|
46
|
+
import { EventEmitter } from 'node:events';
|
|
47
|
+
import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
|
|
47
48
|
// incoming headers will never contain number
|
|
48
49
|
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
|
49
50
|
accept?: string | undefined;
|
|
@@ -1310,9 +1311,9 @@ declare module 'http' {
|
|
|
1310
1311
|
* ```
|
|
1311
1312
|
* @since v0.3.4
|
|
1312
1313
|
*/
|
|
1313
|
-
class Agent {
|
|
1314
|
+
class Agent extends EventEmitter {
|
|
1314
1315
|
/**
|
|
1315
|
-
* By default set to 256
|
|
1316
|
+
* By default set to 256. For agents with `keepAlive` enabled, this
|
|
1316
1317
|
* sets the maximum number of sockets that will be left open in the free
|
|
1317
1318
|
* state.
|
|
1318
1319
|
* @since v0.11.7
|
node/ts4.8/http2.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* const http2 = require('node:http2');
|
|
7
7
|
* ```
|
|
8
8
|
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/http2.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'http2' {
|
|
12
12
|
import EventEmitter = require('node:events');
|
node/ts4.8/https.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
3
|
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'https' {
|
|
7
7
|
import { Duplex } from 'node:stream';
|
node/ts4.8/inspector.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* ```js
|
|
23
23
|
* import * as inspector from 'node:inspector';
|
|
24
24
|
* ```
|
|
25
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
25
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/inspector.js)
|
|
26
26
|
*/
|
|
27
27
|
declare module 'inspector' {
|
|
28
28
|
import EventEmitter = require('node:events');
|
node/ts4.8/net.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ```js
|
|
11
11
|
* const net = require('node:net');
|
|
12
12
|
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
13
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/net.js)
|
|
14
14
|
*/
|
|
15
15
|
declare module 'net' {
|
|
16
16
|
import * as stream from 'node:stream';
|
node/ts4.8/os.d.ts
CHANGED
node/ts4.8/path.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ declare module 'path/win32' {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* const path = require('node:path');
|
|
15
15
|
* ```
|
|
16
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
16
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/path.js)
|
|
17
17
|
*/
|
|
18
18
|
declare module 'path' {
|
|
19
19
|
namespace path {
|
node/ts4.8/perf_hooks.d.ts
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* performance.measure('A to B', 'A', 'B');
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
30
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/perf_hooks.js)
|
|
31
31
|
*/
|
|
32
32
|
declare module 'perf_hooks' {
|
|
33
33
|
import { AsyncResource } from 'node:async_hooks';
|
node/ts4.8/punycode.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
25
|
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
26
|
* @deprecated Since v7.0.0 - Deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module 'punycode' {
|
|
30
30
|
/**
|
node/ts4.8/querystring.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `querystring` is more performant than `URLSearchParams` but is not a
|
|
10
10
|
* standardized API. Use `URLSearchParams` when performance is not critical or
|
|
11
11
|
* when compatibility with browser code is desirable.
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'querystring' {
|
|
15
15
|
interface StringifyOptions {
|
node/ts4.8/readline.d.ts
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
|
32
32
|
* received on the `input` stream.
|
|
33
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
33
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/readline.js)
|
|
34
34
|
*/
|
|
35
35
|
declare module 'readline' {
|
|
36
36
|
import { Abortable, EventEmitter } from 'node:events';
|
node/ts4.8/repl.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const repl = require('node:repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/repl.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'repl' {
|
|
12
12
|
import { Interface, Completer, AsyncCompleter } from 'node:readline';
|
node/ts4.8/stream.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* The `node:stream` module is useful for creating new types of stream instances.
|
|
16
16
|
* It is usually not necessary to use the `node:stream` module to consume streams.
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/stream.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
node/ts4.8/string_decoder.d.ts
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
37
|
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module 'string_decoder' {
|
|
42
42
|
class StringDecoder {
|
node/ts4.8/test.d.ts
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
*
|
|
77
77
|
* If any tests fail, the process exit code is set to `1`.
|
|
78
78
|
* @since v18.0.0, v16.17.0
|
|
79
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/test.js)
|
|
80
80
|
*/
|
|
81
81
|
declare module 'node:test' {
|
|
82
82
|
import { Readable } from 'node:stream';
|
|
@@ -136,27 +136,20 @@ declare module 'node:test' {
|
|
|
136
136
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
|
137
137
|
function test(fn?: TestFn): Promise<void>;
|
|
138
138
|
namespace test {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Shorthand for marking a suite as `TODO`, same as `test([name], { only: true }[, fn])`.
|
|
155
|
-
*/
|
|
156
|
-
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
157
|
-
function only(name?: string, fn?: TestFn): void;
|
|
158
|
-
function only(options?: TestOptions, fn?: TestFn): void;
|
|
159
|
-
function only(fn?: TestFn): void;
|
|
139
|
+
export {
|
|
140
|
+
after,
|
|
141
|
+
afterEach,
|
|
142
|
+
before,
|
|
143
|
+
beforeEach,
|
|
144
|
+
describe,
|
|
145
|
+
it,
|
|
146
|
+
run,
|
|
147
|
+
mock,
|
|
148
|
+
test,
|
|
149
|
+
skip,
|
|
150
|
+
todo,
|
|
151
|
+
only
|
|
152
|
+
};
|
|
160
153
|
}
|
|
161
154
|
/**
|
|
162
155
|
* The `describe()` function imported from the `node:test` module. Each
|
|
@@ -188,7 +181,8 @@ declare module 'node:test' {
|
|
|
188
181
|
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
|
189
182
|
function todo(fn?: SuiteFn): void;
|
|
190
183
|
/**
|
|
191
|
-
* Shorthand for marking a suite as `
|
|
184
|
+
* Shorthand for marking a suite as `only`, same as `describe([name], { only: true }[, fn])`.
|
|
185
|
+
* @since v18.15.0
|
|
192
186
|
*/
|
|
193
187
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
|
194
188
|
function only(name?: string, fn?: SuiteFn): void;
|
|
@@ -201,29 +195,58 @@ declare module 'node:test' {
|
|
|
201
195
|
* The `it()` function is imported from the `node:test` module.
|
|
202
196
|
* @since v18.6.0, v16.17.0
|
|
203
197
|
*/
|
|
204
|
-
function it(name?: string, options?: TestOptions, fn?:
|
|
205
|
-
function it(name?: string, fn?:
|
|
206
|
-
function it(options?: TestOptions, fn?:
|
|
207
|
-
function it(fn?:
|
|
198
|
+
function it(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
199
|
+
function it(name?: string, fn?: TestFn): void;
|
|
200
|
+
function it(options?: TestOptions, fn?: TestFn): void;
|
|
201
|
+
function it(fn?: TestFn): void;
|
|
208
202
|
namespace it {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
function skip(options?: TestOptions, fn?:
|
|
213
|
-
function skip(fn?:
|
|
214
|
-
|
|
215
|
-
function
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
function
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
205
|
+
*/
|
|
206
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
207
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
208
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
209
|
+
function skip(fn?: TestFn): void;
|
|
210
|
+
/**
|
|
211
|
+
* Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
212
|
+
*/
|
|
213
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
214
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
215
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
216
|
+
function todo(fn?: TestFn): void;
|
|
217
|
+
/**
|
|
218
|
+
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
219
|
+
* @since v18.15.0
|
|
220
|
+
*/
|
|
221
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
222
|
+
function only(name?: string, fn?: TestFn): void;
|
|
223
|
+
function only(options?: TestOptions, fn?: TestFn): void;
|
|
224
|
+
function only(fn?: TestFn): void;
|
|
226
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Shorthand for skipping a test, same as `test([name], { skip: true }[, fn])`.
|
|
228
|
+
* @since v20.2.0
|
|
229
|
+
*/
|
|
230
|
+
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
231
|
+
function skip(name?: string, fn?: TestFn): void;
|
|
232
|
+
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
233
|
+
function skip(fn?: TestFn): void;
|
|
234
|
+
/**
|
|
235
|
+
* Shorthand for marking a test as `TODO`, same as `test([name], { todo: true }[, fn])`.
|
|
236
|
+
* @since v20.2.0
|
|
237
|
+
*/
|
|
238
|
+
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
239
|
+
function todo(name?: string, fn?: TestFn): void;
|
|
240
|
+
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
241
|
+
function todo(fn?: TestFn): void;
|
|
242
|
+
/**
|
|
243
|
+
* Shorthand for marking a test as `only`, same as `test([name], { only: true }[, fn])`.
|
|
244
|
+
* @since v20.2.0
|
|
245
|
+
*/
|
|
246
|
+
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
247
|
+
function only(name?: string, fn?: TestFn): void;
|
|
248
|
+
function only(options?: TestOptions, fn?: TestFn): void;
|
|
249
|
+
function only(fn?: TestFn): void;
|
|
227
250
|
/**
|
|
228
251
|
* The type of a function under test. The first argument to this function is a
|
|
229
252
|
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
|
@@ -235,11 +258,6 @@ declare module 'node:test' {
|
|
|
235
258
|
* If the test uses callbacks, the callback function is passed as an argument
|
|
236
259
|
*/
|
|
237
260
|
type SuiteFn = (done: (result?: any) => void) => void;
|
|
238
|
-
/**
|
|
239
|
-
* The type of a function under test.
|
|
240
|
-
* If the test uses callbacks, the callback function is passed as an argument
|
|
241
|
-
*/
|
|
242
|
-
type ItFn = (done: (result?: any) => void) => any;
|
|
243
261
|
interface RunOptions {
|
|
244
262
|
/**
|
|
245
263
|
* If a number is provided, then that many files would run in parallel.
|
|
@@ -1030,5 +1048,5 @@ declare module 'node:test' {
|
|
|
1030
1048
|
*/
|
|
1031
1049
|
restore(): void;
|
|
1032
1050
|
}
|
|
1033
|
-
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
|
|
1051
|
+
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock, skip, only, todo };
|
|
1034
1052
|
}
|
node/ts4.8/timers.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The timer functions within Node.js implement a similar API as the timers API
|
|
7
7
|
* provided by Web Browsers but use a different internal implementation that is
|
|
8
8
|
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/timers.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'timers' {
|
|
12
12
|
import { Abortable } from 'node:events';
|
node/ts4.8/tls.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const tls = require('node:tls');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tls.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'tls' {
|
|
12
12
|
import { X509Certificate } from 'node:crypto';
|
node/ts4.8/trace_events.d.ts
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
*
|
|
95
95
|
* The features from this module are not available in `Worker` threads.
|
|
96
96
|
* @experimental
|
|
97
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
97
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/trace_events.js)
|
|
98
98
|
*/
|
|
99
99
|
declare module 'trace_events' {
|
|
100
100
|
/**
|
node/ts4.8/tty.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*
|
|
22
22
|
* In most cases, there should be little to no reason for an application to
|
|
23
23
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
|
|
24
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
24
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tty.js)
|
|
25
25
|
*/
|
|
26
26
|
declare module 'tty' {
|
|
27
27
|
import * as net from 'node:net';
|
node/ts4.8/url.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* import url from 'node:url';
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/url.js)
|
|
9
9
|
*/
|
|
10
10
|
declare module 'url' {
|
|
11
11
|
import { Blob as NodeBlob } from 'node:buffer';
|
|
@@ -748,9 +748,12 @@ declare module 'url' {
|
|
|
748
748
|
*/
|
|
749
749
|
append(name: string, value: string): void;
|
|
750
750
|
/**
|
|
751
|
-
*
|
|
751
|
+
* If `value` is provided, removes all name-value pairs
|
|
752
|
+
* where name is `name` and value is `value`..
|
|
753
|
+
*
|
|
754
|
+
* If `value` is not provided, removes all name-value pairs whose name is `name`.
|
|
752
755
|
*/
|
|
753
|
-
delete(name: string): void;
|
|
756
|
+
delete(name: string, value?: string): void;
|
|
754
757
|
/**
|
|
755
758
|
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
|
756
759
|
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
|
|
@@ -786,9 +789,15 @@ declare module 'url' {
|
|
|
786
789
|
*/
|
|
787
790
|
getAll(name: string): string[];
|
|
788
791
|
/**
|
|
789
|
-
*
|
|
792
|
+
* Checks if the `URLSearchParams` object contains key-value pair(s) based on`name` and an optional `value` argument.
|
|
793
|
+
*
|
|
794
|
+
* If `value` is provided, returns `true` when name-value pair with
|
|
795
|
+
* same `name` and `value` exists.
|
|
796
|
+
*
|
|
797
|
+
* If `value` is not provided, returns `true` if there is at least one name-value
|
|
798
|
+
* pair whose name is `name`.
|
|
790
799
|
*/
|
|
791
|
-
has(name: string): boolean;
|
|
800
|
+
has(name: string, value?: string): boolean;
|
|
792
801
|
/**
|
|
793
802
|
* Returns an ES6 `Iterator` over the names of each name-value pair.
|
|
794
803
|
*
|
node/ts4.8/util.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const util = require('node:util');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/util.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'util' {
|
|
12
12
|
import * as types from 'node:util/types';
|
|
@@ -1195,7 +1195,6 @@ declare module 'util' {
|
|
|
1195
1195
|
*/
|
|
1196
1196
|
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
|
|
1197
1197
|
}
|
|
1198
|
-
|
|
1199
1198
|
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from 'util';
|
|
1200
1199
|
global {
|
|
1201
1200
|
/**
|
|
@@ -1382,15 +1381,19 @@ declare module 'util' {
|
|
|
1382
1381
|
? PreciseTokenForOptions<K & string, T['options'][K]>
|
|
1383
1382
|
: OptionToken
|
|
1384
1383
|
: never;
|
|
1384
|
+
|
|
1385
1385
|
type ParsedOptionToken<T extends ParseArgsConfig> = IfDefaultsTrue<T['strict'], TokenForOptions<T>, OptionToken>;
|
|
1386
|
+
|
|
1386
1387
|
type ParsedPositionalToken<T extends ParseArgsConfig> = IfDefaultsTrue<
|
|
1387
1388
|
T['strict'],
|
|
1388
1389
|
IfDefaultsFalse<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>,
|
|
1389
1390
|
IfDefaultsTrue<T['allowPositionals'], { kind: 'positional'; index: number; value: string }, never>
|
|
1390
1391
|
>;
|
|
1392
|
+
|
|
1391
1393
|
type ParsedTokens<T extends ParseArgsConfig> = Array<
|
|
1392
1394
|
ParsedOptionToken<T> | ParsedPositionalToken<T> | { kind: 'option-terminator'; index: number }
|
|
1393
1395
|
>;
|
|
1396
|
+
|
|
1394
1397
|
type PreciseParsedResults<T extends ParseArgsConfig> = IfDefaultsFalse<
|
|
1395
1398
|
T['tokens'],
|
|
1396
1399
|
{
|
|
@@ -1403,6 +1406,7 @@ declare module 'util' {
|
|
|
1403
1406
|
positionals: ParsedPositionals<T>;
|
|
1404
1407
|
}
|
|
1405
1408
|
>;
|
|
1409
|
+
|
|
1406
1410
|
type OptionToken =
|
|
1407
1411
|
| { kind: 'option'; index: number; name: string; rawName: string; value: string; inlineValue: boolean }
|
|
1408
1412
|
| {
|
|
@@ -1413,6 +1417,7 @@ declare module 'util' {
|
|
|
1413
1417
|
value: undefined;
|
|
1414
1418
|
inlineValue: undefined;
|
|
1415
1419
|
};
|
|
1420
|
+
|
|
1416
1421
|
type Token =
|
|
1417
1422
|
| OptionToken
|
|
1418
1423
|
| { kind: 'positional'; index: number; value: string }
|
|
@@ -1422,11 +1427,14 @@ declare module 'util' {
|
|
|
1422
1427
|
// So we can't rely on the `"not definitely present" implies "definitely not present"` assumption mentioned above.
|
|
1423
1428
|
type ParsedResults<T extends ParseArgsConfig> = ParseArgsConfig extends T
|
|
1424
1429
|
? {
|
|
1425
|
-
values: {
|
|
1430
|
+
values: {
|
|
1431
|
+
[longOption: string]: undefined | string | boolean | Array<string | boolean>;
|
|
1432
|
+
};
|
|
1426
1433
|
positionals: string[];
|
|
1427
1434
|
tokens?: Token[];
|
|
1428
1435
|
}
|
|
1429
1436
|
: PreciseParsedResults<T>;
|
|
1437
|
+
|
|
1430
1438
|
/**
|
|
1431
1439
|
* An implementation of [the MIMEType class](https://bmeck.github.io/node-proposal-mime-api/).
|
|
1432
1440
|
*
|
node/ts4.8/v8.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* ```js
|
|
5
5
|
* const v8 = require('node:v8');
|
|
6
6
|
* ```
|
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/v8.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module 'v8' {
|
|
10
10
|
import { Readable } from 'node:stream';
|
node/ts4.8/vm.d.ts
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
*
|
|
35
35
|
* console.log(x); // 1; y is not defined.
|
|
36
36
|
* ```
|
|
37
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
37
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module 'vm' {
|
|
40
40
|
interface Context extends NodeJS.Dict<any> {}
|
node/ts4.8/wasi.d.ts
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* $ wat2wasm demo.wat
|
|
63
63
|
* ```
|
|
64
64
|
* @experimental
|
|
65
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
65
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/wasi.js)
|
|
66
66
|
*/
|
|
67
67
|
declare module 'wasi' {
|
|
68
68
|
interface WASIOptions {
|
node/ts4.8/worker_threads.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
*
|
|
50
50
|
* Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
|
|
51
51
|
* specifically `argv` and `execArgv` options.
|
|
52
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
52
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/worker_threads.js)
|
|
53
53
|
*/
|
|
54
54
|
declare module 'worker_threads' {
|
|
55
55
|
import { Blob } from 'node:buffer';
|
node/ts4.8/zlib.d.ts
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
* });
|
|
89
89
|
* ```
|
|
90
90
|
* @since v0.5.8
|
|
91
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
91
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/zlib.js)
|
|
92
92
|
*/
|
|
93
93
|
declare module 'zlib' {
|
|
94
94
|
import * as stream from 'node:stream';
|
node/tty.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*
|
|
22
22
|
* In most cases, there should be little to no reason for an application to
|
|
23
23
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
|
|
24
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
24
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/tty.js)
|
|
25
25
|
*/
|
|
26
26
|
declare module 'tty' {
|
|
27
27
|
import * as net from 'node:net';
|
node/url.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* import url from 'node:url';
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/url.js)
|
|
9
9
|
*/
|
|
10
10
|
declare module 'url' {
|
|
11
11
|
import { Blob as NodeBlob } from 'node:buffer';
|
|
@@ -748,9 +748,12 @@ declare module 'url' {
|
|
|
748
748
|
*/
|
|
749
749
|
append(name: string, value: string): void;
|
|
750
750
|
/**
|
|
751
|
-
*
|
|
751
|
+
* If `value` is provided, removes all name-value pairs
|
|
752
|
+
* where name is `name` and value is `value`..
|
|
753
|
+
*
|
|
754
|
+
* If `value` is not provided, removes all name-value pairs whose name is `name`.
|
|
752
755
|
*/
|
|
753
|
-
delete(name: string): void;
|
|
756
|
+
delete(name: string, value?: string): void;
|
|
754
757
|
/**
|
|
755
758
|
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
|
756
759
|
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
|
|
@@ -786,9 +789,15 @@ declare module 'url' {
|
|
|
786
789
|
*/
|
|
787
790
|
getAll(name: string): string[];
|
|
788
791
|
/**
|
|
789
|
-
*
|
|
792
|
+
* Checks if the `URLSearchParams` object contains key-value pair(s) based on`name` and an optional `value` argument.
|
|
793
|
+
*
|
|
794
|
+
* If `value` is provided, returns `true` when name-value pair with
|
|
795
|
+
* same `name` and `value` exists.
|
|
796
|
+
*
|
|
797
|
+
* If `value` is not provided, returns `true` if there is at least one name-value
|
|
798
|
+
* pair whose name is `name`.
|
|
790
799
|
*/
|
|
791
|
-
has(name: string): boolean;
|
|
800
|
+
has(name: string, value?: string): boolean;
|
|
792
801
|
/**
|
|
793
802
|
* Returns an ES6 `Iterator` over the names of each name-value pair.
|
|
794
803
|
*
|
node/util.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const util = require('node:util');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/util.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'util' {
|
|
12
12
|
import * as types from 'node:util/types';
|
node/v8.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* ```js
|
|
5
5
|
* const v8 = require('node:v8');
|
|
6
6
|
* ```
|
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/v8.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module 'v8' {
|
|
10
10
|
import { Readable } from 'node:stream';
|
node/vm.d.ts
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
*
|
|
35
35
|
* console.log(x); // 1; y is not defined.
|
|
36
36
|
* ```
|
|
37
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
37
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module 'vm' {
|
|
40
40
|
interface Context extends NodeJS.Dict<any> {}
|
node/wasi.d.ts
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
* $ wat2wasm demo.wat
|
|
63
63
|
* ```
|
|
64
64
|
* @experimental
|
|
65
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
65
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/wasi.js)
|
|
66
66
|
*/
|
|
67
67
|
declare module 'wasi' {
|
|
68
68
|
interface WASIOptions {
|