@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/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://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:
|
|
11
|
+
* Last updated: Sun, 21 May 2023 21:02:52 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/assert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `node:assert` module provides a set of assertion functions for verifying
|
|
3
3
|
* invariants.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'assert' {
|
|
7
7
|
/**
|
node/async_hooks.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import async_hooks from 'node:async_hooks';
|
|
13
13
|
* ```
|
|
14
14
|
* @experimental
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/async_hooks.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'async_hooks' {
|
|
18
18
|
/**
|
node/buffer.d.ts
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
|
42
42
|
* const buf7 = Buffer.from('tést', 'latin1');
|
|
43
43
|
* ```
|
|
44
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
44
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/buffer.js)
|
|
45
45
|
*/
|
|
46
46
|
declare module 'buffer' {
|
|
47
47
|
import { BinaryLike } from 'node:crypto';
|
|
@@ -216,6 +216,9 @@ declare module 'buffer' {
|
|
|
216
216
|
// the copy below in a Node environment.
|
|
217
217
|
type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
|
|
218
218
|
global {
|
|
219
|
+
namespace NodeJS {
|
|
220
|
+
export { BufferEncoding };
|
|
221
|
+
}
|
|
219
222
|
// Buffer class
|
|
220
223
|
type BufferEncoding =
|
|
221
224
|
| 'ascii'
|
node/child_process.d.ts
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
64
64
|
* the synchronous methods can have significant impact on performance due to
|
|
65
65
|
* stalling the event loop while spawned processes complete.
|
|
66
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
66
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/child_process.js)
|
|
67
67
|
*/
|
|
68
68
|
declare module 'child_process' {
|
|
69
69
|
import { ObjectEncodingOptions } from 'node:fs';
|
node/cluster.d.ts
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
53
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/cluster.js)
|
|
54
54
|
*/
|
|
55
55
|
declare module 'cluster' {
|
|
56
56
|
import * as child from 'node:child_process';
|
node/console.d.ts
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
54
54
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
55
55
|
* ```
|
|
56
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/console.js)
|
|
57
57
|
*/
|
|
58
58
|
declare module 'console' {
|
|
59
59
|
import console = require('node:console');
|
node/crypto.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* // Prints:
|
|
15
15
|
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
16
|
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'crypto' {
|
|
20
20
|
import * as stream from 'node:stream';
|
node/dgram.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* server.bind(41234);
|
|
24
24
|
* // Prints: server listening 0.0.0.0:41234
|
|
25
25
|
* ```
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
26
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dgram.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module 'dgram' {
|
|
29
29
|
import { AddressInfo } from 'node:net';
|
node/diagnostics_channel.d.ts
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* should generally include the module name to avoid collisions with data from
|
|
21
21
|
* other modules.
|
|
22
22
|
* @since v15.1.0, v14.17.0
|
|
23
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
23
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/diagnostics_channel.js)
|
|
24
24
|
*/
|
|
25
25
|
declare module 'diagnostics_channel' {
|
|
26
26
|
/**
|
node/dns.d.ts
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
44
|
* See the `Implementation considerations section` for more information.
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
|
|
46
46
|
*/
|
|
47
47
|
declare module 'dns' {
|
|
48
48
|
import * as dnsPromises from 'node:dns/promises';
|
node/domain.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
|
|
13
13
|
* exit immediately with an error code.
|
|
14
14
|
* @deprecated Since v1.4.2 - Deprecated
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/domain.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'domain' {
|
|
18
18
|
import EventEmitter = require('node:events');
|
node/events.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* });
|
|
33
33
|
* myEmitter.emit('event');
|
|
34
34
|
* ```
|
|
35
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
35
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/events.js)
|
|
36
36
|
*/
|
|
37
37
|
declare module 'events' {
|
|
38
38
|
// NOTE: This class is in the docs but is **not actually exported** by Node.
|
node/fs/promises.d.ts
CHANGED
|
@@ -720,7 +720,8 @@ declare module 'fs/promises' {
|
|
|
720
720
|
* autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
|
|
721
721
|
* exist, `'file'` will be used. Windows junction points require the destination
|
|
722
722
|
* path to be absolute. When using `'junction'`, the `target` argument will
|
|
723
|
-
* automatically be normalized to absolute path.
|
|
723
|
+
* automatically be normalized to absolute path. Junction points on NTFS volumes
|
|
724
|
+
* can only point to directories.
|
|
724
725
|
* @since v10.0.0
|
|
725
726
|
* @param [type='null']
|
|
726
727
|
* @return Fulfills with `undefined` upon success.
|
node/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/http.d.ts
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
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';
|
node/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/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/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/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/os.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.2.
|
|
3
|
+
"version": "20.2.2",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -232,6 +232,6 @@
|
|
|
232
232
|
},
|
|
233
233
|
"scripts": {},
|
|
234
234
|
"dependencies": {},
|
|
235
|
-
"typesPublisherContentHash": "
|
|
235
|
+
"typesPublisherContentHash": "df5cf2b57e98abb3ae95b635a6538ed8a362483563f3819276cf5b9d3362e8bb",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|
node/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/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/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/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/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/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/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/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/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;
|
|
@@ -206,24 +200,53 @@ declare module 'node:test' {
|
|
|
206
200
|
function it(options?: TestOptions, fn?: TestFn): void;
|
|
207
201
|
function it(fn?: TestFn): void;
|
|
208
202
|
namespace it {
|
|
209
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
|
205
|
+
*/
|
|
210
206
|
function skip(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
211
207
|
function skip(name?: string, fn?: TestFn): void;
|
|
212
208
|
function skip(options?: TestOptions, fn?: TestFn): void;
|
|
213
209
|
function skip(fn?: TestFn): void;
|
|
214
|
-
|
|
210
|
+
/**
|
|
211
|
+
* Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
|
212
|
+
*/
|
|
215
213
|
function todo(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
216
214
|
function todo(name?: string, fn?: TestFn): void;
|
|
217
215
|
function todo(options?: TestOptions, fn?: TestFn): void;
|
|
218
216
|
function todo(fn?: TestFn): void;
|
|
219
217
|
/**
|
|
220
|
-
* Shorthand for marking a
|
|
218
|
+
* Shorthand for marking a test as `only`, same as `it([name], { only: true }[, fn])`.
|
|
219
|
+
* @since v18.15.0
|
|
221
220
|
*/
|
|
222
221
|
function only(name?: string, options?: TestOptions, fn?: TestFn): void;
|
|
223
222
|
function only(name?: string, fn?: TestFn): void;
|
|
224
223
|
function only(options?: TestOptions, fn?: TestFn): void;
|
|
225
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
|
|
@@ -1025,5 +1048,5 @@ declare module 'node:test' {
|
|
|
1025
1048
|
*/
|
|
1026
1049
|
restore(): void;
|
|
1027
1050
|
}
|
|
1028
|
-
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 };
|
|
1029
1052
|
}
|
node/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/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/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/assert.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `node:assert` module provides a set of assertion functions for verifying
|
|
3
3
|
* invariants.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'assert' {
|
|
7
7
|
/**
|
node/ts4.8/async_hooks.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* import async_hooks from 'node:async_hooks';
|
|
13
13
|
* ```
|
|
14
14
|
* @experimental
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/async_hooks.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'async_hooks' {
|
|
18
18
|
/**
|
node/ts4.8/buffer.d.ts
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
|
42
42
|
* const buf7 = Buffer.from('tést', 'latin1');
|
|
43
43
|
* ```
|
|
44
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
44
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/buffer.js)
|
|
45
45
|
*/
|
|
46
46
|
declare module 'buffer' {
|
|
47
47
|
import { BinaryLike } from 'node:crypto';
|
|
@@ -216,6 +216,9 @@ declare module 'buffer' {
|
|
|
216
216
|
// the copy below in a Node environment.
|
|
217
217
|
type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
|
|
218
218
|
global {
|
|
219
|
+
namespace NodeJS {
|
|
220
|
+
export { BufferEncoding };
|
|
221
|
+
}
|
|
219
222
|
// Buffer class
|
|
220
223
|
type BufferEncoding =
|
|
221
224
|
| 'ascii'
|
node/ts4.8/child_process.d.ts
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
64
64
|
* the synchronous methods can have significant impact on performance due to
|
|
65
65
|
* stalling the event loop while spawned processes complete.
|
|
66
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
66
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/child_process.js)
|
|
67
67
|
*/
|
|
68
68
|
declare module 'child_process' {
|
|
69
69
|
import { ObjectEncodingOptions } from 'node:fs';
|
|
@@ -1310,7 +1310,7 @@ declare module 'child_process' {
|
|
|
1310
1310
|
interface CommonExecOptions extends CommonOptions {
|
|
1311
1311
|
input?: string | NodeJS.ArrayBufferView | undefined;
|
|
1312
1312
|
/**
|
|
1313
|
-
* Can be set to 'pipe', 'inherit
|
|
1313
|
+
* Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
|
|
1314
1314
|
* If passed as an array, the first element is used for `stdin`, the second for
|
|
1315
1315
|
* `stdout`, and the third for `stderr`. A fourth element can be used to
|
|
1316
1316
|
* specify the `stdio` behavior beyond the standard streams. See
|
node/ts4.8/cluster.d.ts
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
* ```
|
|
51
51
|
*
|
|
52
52
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
53
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/cluster.js)
|
|
54
54
|
*/
|
|
55
55
|
declare module 'cluster' {
|
|
56
56
|
import * as child from 'node:child_process';
|
node/ts4.8/console.d.ts
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
54
54
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
55
55
|
* ```
|
|
56
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/console.js)
|
|
57
57
|
*/
|
|
58
58
|
declare module 'console' {
|
|
59
59
|
import console = require('node:console');
|
node/ts4.8/crypto.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* // Prints:
|
|
15
15
|
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
16
|
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'crypto' {
|
|
20
20
|
import * as stream from 'node:stream';
|
node/ts4.8/dgram.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* server.bind(41234);
|
|
24
24
|
* // Prints: server listening 0.0.0.0:41234
|
|
25
25
|
* ```
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
26
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dgram.js)
|
|
27
27
|
*/
|
|
28
28
|
declare module 'dgram' {
|
|
29
29
|
import { AddressInfo } from 'node:net';
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* should generally include the module name to avoid collisions with data from
|
|
21
21
|
* other modules.
|
|
22
22
|
* @since v15.1.0, v14.17.0
|
|
23
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
23
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/diagnostics_channel.js)
|
|
24
24
|
*/
|
|
25
25
|
declare module 'diagnostics_channel' {
|
|
26
26
|
/**
|
node/ts4.8/dns.d.ts
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
* ```
|
|
43
43
|
*
|
|
44
44
|
* See the `Implementation considerations section` for more information.
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/dns.js)
|
|
46
46
|
*/
|
|
47
47
|
declare module 'dns' {
|
|
48
48
|
import * as dnsPromises from 'node:dns/promises';
|
node/ts4.8/domain.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* will be notified, rather than losing the context of the error in the`process.on('uncaughtException')` handler, or causing the program to
|
|
13
13
|
* exit immediately with an error code.
|
|
14
14
|
* @deprecated Since v1.4.2 - Deprecated
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/domain.js)
|
|
16
16
|
*/
|
|
17
17
|
declare module 'domain' {
|
|
18
18
|
import EventEmitter = require('node:events');
|
node/ts4.8/events.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* });
|
|
33
33
|
* myEmitter.emit('event');
|
|
34
34
|
* ```
|
|
35
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
35
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/events.js)
|
|
36
36
|
*/
|
|
37
37
|
declare module 'events' {
|
|
38
38
|
// NOTE: This class is in the docs but is **not actually exported** by Node.
|