@types/node 20.12.14 → 20.14.0

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/stream.d.ts CHANGED
@@ -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/v20.12.2/lib/stream.js)
18
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/stream.js)
19
19
  */
20
20
  declare module "stream" {
21
21
  import { Abortable, EventEmitter } from "node:events";
@@ -272,14 +272,14 @@ declare module "stream" {
272
272
  * });
273
273
  * ```
274
274
  *
275
- * The `readable.resume()` method has no effect if there is a `'readable'`event listener.
275
+ * The `readable.resume()` method has no effect if there is a `'readable'` event listener.
276
276
  * @since v0.9.4
277
277
  */
278
278
  resume(): this;
279
279
  /**
280
- * The `readable.isPaused()` method returns the current operating state of the `Readable`. This is
281
- * used primarily by the mechanism that underlies the `readable.pipe()` method. In most typical cases,
282
- * there will be no reason to use this method directly.
280
+ * The `readable.isPaused()` method returns the current operating state of the `Readable`.
281
+ * This is used primarily by the mechanism that underlies the `readable.pipe()` method.
282
+ * In most typical cases, there will be no reason to use this method directly.
283
283
  *
284
284
  * ```js
285
285
  * const readable = new stream.Readable();
@@ -381,8 +381,8 @@ declare module "stream" {
381
381
  * however it is best to simply avoid calling `readable.unshift()` while in the
382
382
  * process of performing a read.
383
383
  * @since v0.9.11
384
- * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must be a string, `Buffer`, `Uint8Array`, or `null`. For object mode
385
- * streams, `chunk` may be any JavaScript value.
384
+ * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must
385
+ * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value.
386
386
  * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
387
387
  */
388
388
  unshift(chunk: any, encoding?: BufferEncoding): void;
@@ -782,8 +782,8 @@ declare module "stream" {
782
782
  *
783
783
  * A `Writable` stream in object mode will always ignore the `encoding` argument.
784
784
  * @since v0.9.4
785
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
786
- * JavaScript value other than `null`.
785
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
786
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
787
787
  * @param [encoding='utf8'] The encoding, if `chunk` is a string.
788
788
  * @param callback Callback for when this chunk of data is flushed.
789
789
  * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
@@ -813,8 +813,8 @@ declare module "stream" {
813
813
  * // Writing more now is not allowed!
814
814
  * ```
815
815
  * @since v0.9.4
816
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a string, `Buffer` or `Uint8Array`. For object mode streams, `chunk` may be any
817
- * JavaScript value other than `null`.
816
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
817
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
818
818
  * @param encoding The encoding if `chunk` is a string
819
819
  * @param callback Callback for when the stream is finished.
820
820
  */
@@ -1300,8 +1300,8 @@ declare module "stream" {
1300
1300
  * Attaches an AbortSignal to a readable or writeable stream. This lets code
1301
1301
  * control stream destruction using an `AbortController`.
1302
1302
  *
1303
- * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as
1304
- * calling `.destroy(new AbortError())` on the stream, and `controller.error(new AbortError())` for webstreams.
1303
+ * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the
1304
+ * stream, and `controller.error(new AbortError())` for webstreams.
1305
1305
  *
1306
1306
  * ```js
1307
1307
  * const fs = require('node:fs');
@@ -1417,7 +1417,7 @@ declare module "stream" {
1417
1417
  * Especially useful in error handling scenarios where a stream is destroyed
1418
1418
  * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
1419
1419
  *
1420
- * The `finished` API provides [promise version](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamfinishedstream-options).
1420
+ * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streamfinishedstream-options).
1421
1421
  *
1422
1422
  * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
1423
1423
  * invoked. The reason for this is so that unexpected `'error'` events (due to
@@ -1505,7 +1505,7 @@ declare module "stream" {
1505
1505
  * );
1506
1506
  * ```
1507
1507
  *
1508
- * The `pipeline` API provides a [promise version](https://nodejs.org/docs/latest-v20.x/api/stream.html#streampipelinesource-transforms-destination-options).
1508
+ * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v20.x/api/stream.html#streampipelinesource-transforms-destination-options).
1509
1509
  *
1510
1510
  * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
1511
1511
  *
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]))); // Prints: €
38
38
  * ```
39
- * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/string_decoder.js)
39
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/string_decoder.js)
40
40
  */
41
41
  declare module "string_decoder" {
42
42
  class StringDecoder {