@types/node 22.16.0 → 24.0.1

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 (72) hide show
  1. node v22.16/README.md → node/README.md +2 -2
  2. node v22.16/assert.d.ts → node/assert.d.ts +5 -5
  3. node v22.16/async_hooks.d.ts → node/async_hooks.d.ts +25 -5
  4. node v22.16/buffer.d.ts → node/buffer.d.ts +1 -4
  5. node v22.16/child_process.d.ts → node/child_process.d.ts +2 -2
  6. node v22.16/cluster.d.ts → node/cluster.d.ts +15 -15
  7. node v22.16/compatibility/iterators.d.ts → node/compatibility/iterators.d.ts +1 -0
  8. node v22.16/console.d.ts → node/console.d.ts +17 -17
  9. node v22.16/crypto.d.ts → node/crypto.d.ts +35 -28
  10. node v22.16/dgram.d.ts → node/dgram.d.ts +1 -1
  11. node v22.16/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +1 -1
  12. node v22.16/dns/promises.d.ts → node/dns/promises.d.ts +1 -27
  13. node v22.16/dns.d.ts → node/dns.d.ts +18 -72
  14. node v22.16/domain.d.ts → node/domain.d.ts +1 -1
  15. node v22.16/events.d.ts → node/events.d.ts +1 -1
  16. node v22.16/fs/promises.d.ts → node/fs/promises.d.ts +18 -12
  17. node v22.16/fs.d.ts → node/fs.d.ts +29 -20
  18. node v22.16/globals.d.ts → node/globals.d.ts +7 -4
  19. node v22.16/globals.typedarray.d.ts → node/globals.typedarray.d.ts +1 -0
  20. node v22.16/http.d.ts → node/http.d.ts +3 -80
  21. node v22.16/http2.d.ts → node/http2.d.ts +6 -3
  22. node v22.16/https.d.ts → node/https.d.ts +1 -1
  23. node v22.16/index.d.ts → node/index.d.ts +7 -5
  24. node v22.16/inspector.d.ts → node/inspector.d.ts +3 -7
  25. node v22.16/module.d.ts → node/module.d.ts +18 -63
  26. node v22.16/net.d.ts → node/net.d.ts +2 -5
  27. node v22.16/os.d.ts → node/os.d.ts +8 -7
  28. node v22.16/package.json → node/package.json +13 -3
  29. node v22.16/path.d.ts → node/path.d.ts +1 -1
  30. node v22.16/perf_hooks.d.ts → node/perf_hooks.d.ts +8 -8
  31. node v22.16/process.d.ts → node/process.d.ts +21 -9
  32. node v22.16/punycode.d.ts → node/punycode.d.ts +1 -1
  33. node v22.16/querystring.d.ts → node/querystring.d.ts +1 -1
  34. node v22.16/readline/promises.d.ts → node/readline/promises.d.ts +0 -1
  35. node v22.16/readline.d.ts → node/readline.d.ts +13 -13
  36. node v22.16/repl.d.ts → node/repl.d.ts +12 -12
  37. node v22.16/sea.d.ts → node/sea.d.ts +1 -1
  38. node v22.16/sqlite.d.ts → node/sqlite.d.ts +15 -7
  39. node v22.16/stream/web.d.ts → node/stream/web.d.ts +0 -4
  40. node v22.16/stream.d.ts → node/stream.d.ts +8 -19
  41. node v22.16/string_decoder.d.ts → node/string_decoder.d.ts +1 -1
  42. node/test.d.ts +2318 -0
  43. node v22.16/timers/promises.d.ts → node/timers/promises.d.ts +1 -1
  44. node v22.16/timers.d.ts → node/timers.d.ts +1 -1
  45. node v22.16/tls.d.ts → node/tls.d.ts +2 -48
  46. node v22.16/trace_events.d.ts → node/trace_events.d.ts +6 -6
  47. node v22.16/compatibility/disposable.d.ts → node/ts5.1/compatibility/disposable.d.ts +0 -2
  48. node/ts5.1/index.d.ts +98 -0
  49. node/ts5.6/compatibility/float16array.d.ts +71 -0
  50. node v22.16/ts5.6/globals.typedarray.d.ts → node/ts5.6/globals.typedarray.d.ts +1 -0
  51. node v22.16/ts5.6/index.d.ts → node/ts5.6/index.d.ts +9 -5
  52. node/ts5.7/compatibility/float16array.d.ts +72 -0
  53. node/ts5.7/index.d.ts +96 -0
  54. node v22.16/tty.d.ts → node/tty.d.ts +1 -1
  55. node v22.16/url.d.ts → node/url.d.ts +61 -19
  56. node v22.16/util.d.ts → node/util.d.ts +7 -298
  57. node v22.16/v8.d.ts → node/v8.d.ts +29 -65
  58. node v22.16/vm.d.ts → node/vm.d.ts +17 -10
  59. node v22.16/wasi.d.ts → node/wasi.d.ts +1 -1
  60. node v22.16/worker_threads.d.ts → node/worker_threads.d.ts +8 -2
  61. node v22.16/zlib.d.ts → node/zlib.d.ts +5 -7
  62. node v22.16/compatibility/index.d.ts +0 -9
  63. node v22.16/compatibility/indexable.d.ts +0 -20
  64. node v22.16/test.d.ts +0 -2175
  65. {node v22.16 → node}/LICENSE +0 -0
  66. {node v22.16 → node}/assert/strict.d.ts +0 -0
  67. {node v22.16 → node}/buffer.buffer.d.ts +0 -0
  68. {node v22.16 → node}/constants.d.ts +0 -0
  69. {node v22.16 → node}/dom-events.d.ts +0 -0
  70. {node v22.16 → node}/stream/consumers.d.ts +0 -0
  71. {node v22.16 → node}/stream/promises.d.ts +0 -0
  72. {node v22.16 → node}/ts5.6/buffer.buffer.d.ts +0 -0
@@ -2,10 +2,10 @@
2
2
  * A stream is an abstract interface for working with streaming data in Node.js.
3
3
  * The `node:stream` module provides an API for implementing the stream interface.
4
4
  *
5
- * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage)
6
- * and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances.
5
+ * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v24.x/api/http.html#class-httpincomingmessage)
6
+ * and [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) are both stream instances.
7
7
  *
8
- * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter).
8
+ * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v24.x/api/events.html#class-eventemitter).
9
9
  *
10
10
  * To access the `node:stream` module:
11
11
  *
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * The `node:stream` module is useful for creating new types of stream instances.
17
17
  * It is usually not necessary to use the `node:stream` module to consume streams.
18
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js)
18
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/stream.js)
19
19
  */
20
20
  declare module "stream" {
21
21
  import { Abortable, EventEmitter } from "node:events";
@@ -76,7 +76,6 @@ declare module "stream" {
76
76
  /**
77
77
  * A utility method for creating a `Readable` from a web `ReadableStream`.
78
78
  * @since v17.0.0
79
- * @experimental
80
79
  */
81
80
  static fromWeb(
82
81
  readableStream: streamWeb.ReadableStream,
@@ -85,7 +84,6 @@ declare module "stream" {
85
84
  /**
86
85
  * A utility method for creating a web `ReadableStream` from a `Readable`.
87
86
  * @since v17.0.0
88
- * @experimental
89
87
  */
90
88
  static toWeb(
91
89
  streamReadable: Readable,
@@ -101,7 +99,6 @@ declare module "stream" {
101
99
  /**
102
100
  * Returns whether the stream was destroyed or errored before emitting `'end'`.
103
101
  * @since v16.8.0
104
- * @experimental
105
102
  */
106
103
  readonly readableAborted: boolean;
107
104
  /**
@@ -113,7 +110,6 @@ declare module "stream" {
113
110
  /**
114
111
  * Returns whether `'data'` has been emitted.
115
112
  * @since v16.7.0, v14.18.0
116
- * @experimental
117
113
  */
118
114
  readonly readableDidRead: boolean;
119
115
  /**
@@ -122,13 +118,13 @@ declare module "stream" {
122
118
  */
123
119
  readonly readableEncoding: BufferEncoding | null;
124
120
  /**
125
- * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.
121
+ * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v24.x/api/stream.html#event-end) event is emitted.
126
122
  * @since v12.9.0
127
123
  */
128
124
  readonly readableEnded: boolean;
129
125
  /**
130
126
  * This property reflects the current state of a `Readable` stream as described
131
- * in the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.
127
+ * in the [Three states](https://nodejs.org/docs/latest-v24.x/api/stream.html#three-states) section.
132
128
  * @since v9.4.0
133
129
  */
134
130
  readonly readableFlowing: boolean | null;
@@ -719,7 +715,6 @@ declare module "stream" {
719
715
  /**
720
716
  * A utility method for creating a `Writable` from a web `WritableStream`.
721
717
  * @since v17.0.0
722
- * @experimental
723
718
  */
724
719
  static fromWeb(
725
720
  writableStream: streamWeb.WritableStream,
@@ -728,7 +723,6 @@ declare module "stream" {
728
723
  /**
729
724
  * A utility method for creating a web `WritableStream` from a `Writable`.
730
725
  * @since v17.0.0
731
- * @experimental
732
726
  */
733
727
  static toWeb(streamWritable: Writable): streamWeb.WritableStream;
734
728
  /**
@@ -740,7 +734,6 @@ declare module "stream" {
740
734
  /**
741
735
  * Returns whether the stream was destroyed or errored before emitting `'finish'`.
742
736
  * @since v18.0.0, v16.17.0
743
- * @experimental
744
737
  */
745
738
  readonly writableAborted: boolean;
746
739
  /**
@@ -1090,7 +1083,6 @@ declare module "stream" {
1090
1083
  /**
1091
1084
  * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
1092
1085
  * @since v17.0.0
1093
- * @experimental
1094
1086
  */
1095
1087
  static toWeb(streamDuplex: Duplex): {
1096
1088
  readable: streamWeb.ReadableStream;
@@ -1099,7 +1091,6 @@ declare module "stream" {
1099
1091
  /**
1100
1092
  * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
1101
1093
  * @since v17.0.0
1102
- * @experimental
1103
1094
  */
1104
1095
  static fromWeb(
1105
1096
  duplexStream: {
@@ -1380,7 +1371,7 @@ declare module "stream" {
1380
1371
  * Especially useful in error handling scenarios where a stream is destroyed
1381
1372
  * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
1382
1373
  *
1383
- * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamfinishedstream-options).
1374
+ * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamfinishedstream-options).
1384
1375
  *
1385
1376
  * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
1386
1377
  * invoked. The reason for this is so that unexpected `'error'` events (due to
@@ -1468,7 +1459,7 @@ declare module "stream" {
1468
1459
  * );
1469
1460
  * ```
1470
1461
  *
1471
- * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streampipelinesource-transforms-destination-options).
1462
+ * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v24.x/api/stream.html#streampipelinesource-transforms-destination-options).
1472
1463
  *
1473
1464
  * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
1474
1465
  *
@@ -1650,13 +1641,11 @@ declare module "stream" {
1650
1641
  /**
1651
1642
  * Returns whether the stream has encountered an error.
1652
1643
  * @since v17.3.0, v16.14.0
1653
- * @experimental
1654
1644
  */
1655
1645
  function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
1656
1646
  /**
1657
1647
  * Returns whether the stream is readable.
1658
1648
  * @since v17.4.0, v16.14.0
1659
- * @experimental
1660
1649
  */
1661
1650
  function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
1662
1651
  }
@@ -36,7 +36,7 @@
36
36
  * decoder.write(Buffer.from([0x82]));
37
37
  * console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
38
38
  * ```
39
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js)
39
+ * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/string_decoder.js)
40
40
  */
41
41
  declare module "string_decoder" {
42
42
  class StringDecoder {