@types/node 20.2.1 → 20.2.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.
Files changed (81) hide show
  1. node/README.md +1 -1
  2. node/assert.d.ts +1 -1
  3. node/async_hooks.d.ts +1 -1
  4. node/buffer.d.ts +4 -1
  5. node/child_process.d.ts +1 -1
  6. node/cluster.d.ts +1 -1
  7. node/console.d.ts +1 -1
  8. node/crypto.d.ts +1 -1
  9. node/dgram.d.ts +1 -1
  10. node/diagnostics_channel.d.ts +1 -1
  11. node/dns.d.ts +1 -1
  12. node/domain.d.ts +1 -1
  13. node/events.d.ts +1 -1
  14. node/fs/promises.d.ts +2 -1
  15. node/fs.d.ts +3 -2
  16. node/http.d.ts +1 -1
  17. node/http2.d.ts +1 -1
  18. node/https.d.ts +1 -1
  19. node/inspector.d.ts +1 -1
  20. node/net.d.ts +1 -1
  21. node/os.d.ts +1 -1
  22. node/package.json +2 -2
  23. node/path.d.ts +1 -1
  24. node/perf_hooks.d.ts +1 -1
  25. node/punycode.d.ts +1 -1
  26. node/querystring.d.ts +1 -1
  27. node/readline.d.ts +1 -1
  28. node/repl.d.ts +1 -1
  29. node/stream.d.ts +758 -729
  30. node/string_decoder.d.ts +1 -1
  31. node/test.d.ts +7 -3
  32. node/timers.d.ts +1 -1
  33. node/tls.d.ts +1 -1
  34. node/trace_events.d.ts +1 -1
  35. node/ts4.8/assert.d.ts +1 -1
  36. node/ts4.8/async_hooks.d.ts +1 -1
  37. node/ts4.8/buffer.d.ts +4 -1
  38. node/ts4.8/child_process.d.ts +2 -2
  39. node/ts4.8/cluster.d.ts +1 -1
  40. node/ts4.8/console.d.ts +1 -1
  41. node/ts4.8/crypto.d.ts +1 -1
  42. node/ts4.8/dgram.d.ts +1 -1
  43. node/ts4.8/diagnostics_channel.d.ts +1 -1
  44. node/ts4.8/dns.d.ts +1 -1
  45. node/ts4.8/domain.d.ts +1 -1
  46. node/ts4.8/events.d.ts +1 -1
  47. node/ts4.8/fs.d.ts +3 -2
  48. node/ts4.8/http.d.ts +5 -4
  49. node/ts4.8/http2.d.ts +1 -1
  50. node/ts4.8/https.d.ts +1 -1
  51. node/ts4.8/inspector.d.ts +1 -1
  52. node/ts4.8/net.d.ts +1 -1
  53. node/ts4.8/os.d.ts +1 -1
  54. node/ts4.8/path.d.ts +1 -1
  55. node/ts4.8/perf_hooks.d.ts +1 -1
  56. node/ts4.8/punycode.d.ts +1 -1
  57. node/ts4.8/querystring.d.ts +1 -1
  58. node/ts4.8/readline.d.ts +1 -1
  59. node/ts4.8/repl.d.ts +1 -1
  60. node/ts4.8/stream.d.ts +1 -1
  61. node/ts4.8/string_decoder.d.ts +1 -1
  62. node/ts4.8/test.d.ts +7 -4
  63. node/ts4.8/timers.d.ts +1 -1
  64. node/ts4.8/tls.d.ts +1 -1
  65. node/ts4.8/trace_events.d.ts +1 -1
  66. node/ts4.8/tty.d.ts +1 -1
  67. node/ts4.8/url.d.ts +14 -5
  68. node/ts4.8/util.d.ts +11 -3
  69. node/ts4.8/v8.d.ts +1 -1
  70. node/ts4.8/vm.d.ts +1 -1
  71. node/ts4.8/wasi.d.ts +1 -1
  72. node/ts4.8/worker_threads.d.ts +1 -1
  73. node/ts4.8/zlib.d.ts +1 -1
  74. node/tty.d.ts +1 -1
  75. node/url.d.ts +14 -5
  76. node/util.d.ts +1 -1
  77. node/v8.d.ts +1 -1
  78. node/vm.d.ts +1 -1
  79. node/wasi.d.ts +1 -1
  80. node/worker_threads.d.ts +1 -1
  81. 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: Thu, 18 May 2023 13:32:52 GMT
11
+ * Last updated: Sun, 21 May 2023 22:02:55 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.1.0/lib/assert.js)
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.1.0/lib/async_hooks.js)
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.1.0/lib/buffer.js)
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.1.0/lib/child_process.js)
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.1.0/lib/cluster.js)
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.1.0/lib/console.js)
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.1.0/lib/crypto.js)
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.1.0/lib/dgram.js)
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.1.0/lib/diagnostics_channel.js)
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.1.0/lib/dns.js)
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.1.0/lib/domain.js)
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.1.0/lib/events.js)
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.1.0/lib/fs.js)
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.1.0/lib/http.js)
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.1.0/lib/http2.js)
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.1.0/lib/https.js)
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.1.0/lib/inspector.js)
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.1.0/lib/net.js)
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
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * const os = require('node:os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/os.js)
9
9
  */
10
10
  declare module 'os' {
11
11
  interface CpuInfo {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.2.1",
3
+ "version": "20.2.3",
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": "605a2e642a0979c9b4e6102f238e63c9667e686359383a32c94507a33a0c61a0",
235
+ "typesPublisherContentHash": "a89013fd9f5c22705a8c372d5c9bfd1867dbdf836669c5498a9eda0af24608aa",
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.1.0/lib/path.js)
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.1.0/lib/perf_hooks.js)
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.1.0/lib/punycode.js)
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.1.0/lib/querystring.js)
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.1.0/lib/readline.js)
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.1.0/lib/repl.js)
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';