@types/node 18.11.5 → 20.2.5

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 (97) hide show
  1. node/README.md +2 -2
  2. node/assert.d.ts +86 -75
  3. node/async_hooks.d.ts +66 -37
  4. node/buffer.d.ts +193 -100
  5. node/child_process.d.ts +82 -56
  6. node/cluster.d.ts +12 -12
  7. node/console.d.ts +5 -5
  8. node/crypto.d.ts +233 -235
  9. node/dgram.d.ts +15 -15
  10. node/diagnostics_channel.d.ts +59 -21
  11. node/dns/promises.d.ts +50 -6
  12. node/dns.d.ts +26 -17
  13. node/domain.d.ts +4 -4
  14. node/events.d.ts +111 -65
  15. node/fs/promises.d.ts +99 -47
  16. node/fs.d.ts +244 -73
  17. node/globals.d.ts +6 -3
  18. node/http.d.ts +265 -148
  19. node/http2.d.ts +42 -47
  20. node/https.d.ts +53 -153
  21. node/index.d.ts +2 -1
  22. node/inspector.d.ts +10 -3
  23. node/module.d.ts +6 -4
  24. node/net.d.ts +32 -15
  25. node/os.d.ts +27 -16
  26. node/package.json +9 -4
  27. node/path.d.ts +4 -4
  28. node/perf_hooks.d.ts +28 -15
  29. node/process.d.ts +49 -46
  30. node/punycode.d.ts +1 -1
  31. node/querystring.d.ts +5 -5
  32. node/readline/promises.d.ts +65 -63
  33. node/readline.d.ts +32 -159
  34. node/repl.d.ts +20 -20
  35. node/stream/consumers.d.ts +1 -1
  36. node/stream.d.ts +950 -869
  37. node/string_decoder.d.ts +6 -6
  38. node/test.d.ts +877 -139
  39. node/timers/promises.d.ts +26 -1
  40. node/timers.d.ts +125 -4
  41. node/tls.d.ts +120 -29
  42. node/trace_events.d.ts +20 -9
  43. node/ts4.8/assert.d.ts +86 -75
  44. node/ts4.8/async_hooks.d.ts +66 -37
  45. node/ts4.8/buffer.d.ts +193 -101
  46. node/ts4.8/child_process.d.ts +82 -56
  47. node/ts4.8/cluster.d.ts +12 -12
  48. node/ts4.8/console.d.ts +5 -5
  49. node/ts4.8/crypto.d.ts +230 -233
  50. node/ts4.8/dgram.d.ts +15 -15
  51. node/ts4.8/diagnostics_channel.d.ts +59 -21
  52. node/ts4.8/dns/promises.d.ts +50 -6
  53. node/ts4.8/dns.d.ts +26 -17
  54. node/ts4.8/domain.d.ts +4 -4
  55. node/ts4.8/events.d.ts +111 -65
  56. node/ts4.8/fs/promises.d.ts +97 -46
  57. node/ts4.8/fs.d.ts +244 -73
  58. node/ts4.8/globals.d.ts +21 -12
  59. node/ts4.8/http.d.ts +265 -148
  60. node/ts4.8/http2.d.ts +42 -47
  61. node/ts4.8/https.d.ts +53 -153
  62. node/ts4.8/inspector.d.ts +10 -3
  63. node/ts4.8/module.d.ts +6 -4
  64. node/ts4.8/net.d.ts +33 -16
  65. node/ts4.8/os.d.ts +27 -16
  66. node/ts4.8/path.d.ts +4 -4
  67. node/ts4.8/perf_hooks.d.ts +28 -15
  68. node/ts4.8/process.d.ts +49 -46
  69. node/ts4.8/punycode.d.ts +1 -1
  70. node/ts4.8/querystring.d.ts +5 -5
  71. node/ts4.8/readline/promises.d.ts +65 -63
  72. node/ts4.8/readline.d.ts +32 -159
  73. node/ts4.8/repl.d.ts +20 -20
  74. node/ts4.8/stream/consumers.d.ts +1 -1
  75. node/ts4.8/stream.d.ts +192 -140
  76. node/ts4.8/string_decoder.d.ts +6 -6
  77. node/ts4.8/test.d.ts +877 -139
  78. node/ts4.8/timers/promises.d.ts +26 -1
  79. node/ts4.8/timers.d.ts +125 -4
  80. node/ts4.8/tls.d.ts +120 -29
  81. node/ts4.8/trace_events.d.ts +20 -9
  82. node/ts4.8/tty.d.ts +4 -5
  83. node/ts4.8/url.d.ts +46 -42
  84. node/ts4.8/util.d.ts +325 -123
  85. node/ts4.8/v8.d.ts +253 -14
  86. node/ts4.8/vm.d.ts +417 -32
  87. node/ts4.8/wasi.d.ts +13 -19
  88. node/ts4.8/worker_threads.d.ts +38 -34
  89. node/ts4.8/zlib.d.ts +11 -11
  90. node/tty.d.ts +4 -5
  91. node/url.d.ts +46 -42
  92. node/util.d.ts +325 -123
  93. node/v8.d.ts +253 -14
  94. node/vm.d.ts +417 -32
  95. node/wasi.d.ts +13 -19
  96. node/worker_threads.d.ts +38 -34
  97. node/zlib.d.ts +11 -11
node/repl.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  /**
2
- * The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
3
- * is available both as a standalone program or includible in other applications.
4
- * It can be accessed using:
2
+ * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
3
+ * that is available both as a standalone program or includible in other
4
+ * applications. It can be accessed using:
5
5
  *
6
6
  * ```js
7
- * const repl = require('repl');
7
+ * const repl = require('node:repl');
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v18.0.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';
@@ -41,8 +41,8 @@ declare module 'repl' {
41
41
  * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
42
42
  * additional lines.
43
43
  *
44
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
45
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
44
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
45
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions
46
46
  */
47
47
  eval?: REPLEval | undefined;
48
48
  /**
@@ -74,13 +74,13 @@ declare module 'repl' {
74
74
  * The function to invoke to format the output of each command before writing to `output`.
75
75
  * Default: a wrapper for `util.inspect`.
76
76
  *
77
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
77
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output
78
78
  */
79
79
  writer?: REPLWriter | undefined;
80
80
  /**
81
81
  * An optional function used for custom Tab auto completion.
82
82
  *
83
- * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
83
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function
84
84
  */
85
85
  completer?: Completer | AsyncCompleter | undefined;
86
86
  /**
@@ -124,7 +124,7 @@ declare module 'repl' {
124
124
  * or directly using the JavaScript `new` keyword.
125
125
  *
126
126
  * ```js
127
- * const repl = require('repl');
127
+ * const repl = require('node:repl');
128
128
  *
129
129
  * const options = { useColors: true };
130
130
  *
@@ -162,33 +162,33 @@ declare module 'repl' {
162
162
  /**
163
163
  * A value indicating whether the REPL is currently in "editor mode".
164
164
  *
165
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
165
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys
166
166
  */
167
167
  readonly editorMode: boolean;
168
168
  /**
169
169
  * A value indicating whether the `_` variable has been assigned.
170
170
  *
171
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
171
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
172
172
  */
173
173
  readonly underscoreAssigned: boolean;
174
174
  /**
175
175
  * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
176
176
  *
177
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
177
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
178
178
  */
179
179
  readonly last: any;
180
180
  /**
181
181
  * A value indicating whether the `_error` variable has been assigned.
182
182
  *
183
183
  * @since v9.8.0
184
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
184
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
185
185
  */
186
186
  readonly underscoreErrAssigned: boolean;
187
187
  /**
188
188
  * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
189
189
  *
190
190
  * @since v9.8.0
191
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
191
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
192
192
  */
193
193
  readonly lastError: any;
194
194
  /**
@@ -240,7 +240,7 @@ declare module 'repl' {
240
240
  *
241
241
  * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
242
242
  *
243
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
243
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
244
244
  */
245
245
  private constructor();
246
246
  /**
@@ -251,7 +251,7 @@ declare module 'repl' {
251
251
  * The following example shows two new commands added to the REPL instance:
252
252
  *
253
253
  * ```js
254
- * const repl = require('repl');
254
+ * const repl = require('node:repl');
255
255
  *
256
256
  * const replServer = repl.start({ prompt: '> ' });
257
257
  * replServer.defineCommand('sayhello', {
@@ -260,7 +260,7 @@ declare module 'repl' {
260
260
  * this.clearBufferedCommand();
261
261
  * console.log(`Hello, ${name}!`);
262
262
  * this.displayPrompt();
263
- * }
263
+ * },
264
264
  * });
265
265
  * replServer.defineCommand('saybye', function saybye() {
266
266
  * console.log('Goodbye!');
@@ -401,7 +401,7 @@ declare module 'repl' {
401
401
  * If `options` is a string, then it specifies the input prompt:
402
402
  *
403
403
  * ```js
404
- * const repl = require('repl');
404
+ * const repl = require('node:repl');
405
405
  *
406
406
  * // a Unix style prompt
407
407
  * repl.start('$ ');
@@ -412,7 +412,7 @@ declare module 'repl' {
412
412
  /**
413
413
  * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
414
414
  *
415
- * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
415
+ * @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
416
416
  */
417
417
  class Recoverable extends SyntaxError {
418
418
  err: Error;
@@ -1,5 +1,5 @@
1
1
  declare module 'stream/consumers' {
2
- import { Blob as NodeBlob } from "node:buffer";
2
+ import { Blob as NodeBlob } from 'node:buffer';
3
3
  import { Readable } from 'node:stream';
4
4
  function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
5
5
  function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;