@types/node 18.19.52 → 18.19.54

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 (47) hide show
  1. node v18.19/README.md +1 -1
  2. node v18.19/buffer.buffer.d.ts +385 -0
  3. node v18.19/buffer.d.ts +10 -384
  4. node v18.19/child_process.d.ts +35 -30
  5. node v18.19/cluster.d.ts +1 -1
  6. node v18.19/console.d.ts +2 -2
  7. node v18.19/crypto.d.ts +1 -1
  8. node v18.19/dns/promises.d.ts +6 -5
  9. node v18.19/dns.d.ts +5 -5
  10. node v18.19/domain.d.ts +2 -2
  11. node v18.19/events.d.ts +13 -13
  12. node v18.19/fs/promises.d.ts +2 -2
  13. node v18.19/fs.d.ts +1 -1
  14. node v18.19/globals.d.ts +0 -14
  15. node v18.19/globals.typedarray.d.ts +21 -0
  16. node v18.19/http.d.ts +4 -4
  17. node v18.19/http2.d.ts +24 -24
  18. node v18.19/https.d.ts +9 -9
  19. node v18.19/index.d.ts +5 -1
  20. node v18.19/inspector.d.ts +1 -1
  21. node v18.19/module.d.ts +3 -3
  22. node v18.19/net.d.ts +2 -2
  23. node v18.19/os.d.ts +1 -1
  24. node v18.19/package.json +9 -2
  25. node v18.19/path.d.ts +1 -1
  26. node v18.19/perf_hooks.d.ts +11 -11
  27. node v18.19/punycode.d.ts +1 -1
  28. node v18.19/querystring.d.ts +1 -1
  29. node v18.19/readline/promises.d.ts +1 -1
  30. node v18.19/readline.d.ts +18 -18
  31. node v18.19/repl.d.ts +4 -4
  32. node v18.19/stream.d.ts +21 -21
  33. node v18.19/string_decoder.d.ts +3 -3
  34. node v18.19/timers/promises.d.ts +1 -1
  35. node v18.19/timers.d.ts +1 -1
  36. node v18.19/tls.d.ts +5 -5
  37. node v18.19/trace_events.d.ts +3 -3
  38. node v18.19/ts5.6/buffer.buffer.d.ts +385 -0
  39. node v18.19/ts5.6/globals.typedarray.d.ts +19 -0
  40. node v18.19/ts5.6/index.d.ts +91 -0
  41. node v18.19/tty.d.ts +1 -1
  42. node v18.19/url.d.ts +7 -7
  43. node v18.19/util.d.ts +41 -41
  44. node v18.19/v8.d.ts +12 -12
  45. node v18.19/vm.d.ts +11 -12
  46. node v18.19/worker_threads.d.ts +22 -22
  47. node v18.19/zlib.d.ts +8 -8
node v18.19/buffer.d.ts CHANGED
@@ -124,7 +124,7 @@ declare module "buffer" {
124
124
  export interface BlobOptions {
125
125
  /**
126
126
  * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
127
- * will be converted to the platform native line-ending as specified by `require('node:os').EOL`.
127
+ * will be converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`.
128
128
  */
129
129
  endings?: "transparent" | "native";
130
130
  /**
@@ -189,7 +189,7 @@ declare module "buffer" {
189
189
  export interface FileOptions {
190
190
  /**
191
191
  * One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
192
- * converted to the platform native line-ending as specified by `require('node:os').EOL`.
192
+ * converted to the platform native line-ending as specified by `import { EOL } from 'node:node:os'`.
193
193
  */
194
194
  endings?: "native" | "transparent";
195
195
  /** The File content-type. */
@@ -239,113 +239,15 @@ declare module "buffer" {
239
239
  | {
240
240
  valueOf(): T;
241
241
  };
242
- // `WithArrayBufferLike` is a backwards-compatible workaround for the addition of a `TArrayBuffer` type parameter to
243
- // `Uint8Array` to ensure that `Buffer` remains assignment-compatible with `Uint8Array`, but without the added
244
- // complexity involved with making `Buffer` itself generic as that would require re-introducing `"typesVersions"` to
245
- // the NodeJS types. It is likely this interface will become deprecated in the future once `Buffer` does become generic.
246
- interface WithArrayBufferLike<TArrayBuffer extends ArrayBufferLike> {
247
- readonly buffer: TArrayBuffer;
248
- }
249
242
  /**
250
243
  * Raw data is stored in instances of the Buffer class.
251
244
  * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
252
245
  * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'base64url'|'binary'(deprecated)|'hex'
253
246
  */
254
247
  interface BufferConstructor {
255
- /**
256
- * Allocates a new buffer containing the given {str}.
257
- *
258
- * @param str String to store in buffer.
259
- * @param encoding encoding to use, optional. Default is 'utf8'
260
- * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
261
- */
262
- new(str: string, encoding?: BufferEncoding): Buffer;
263
- /**
264
- * Allocates a new buffer of {size} octets.
265
- *
266
- * @param size count of octets to allocate.
267
- * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
268
- */
269
- new(size: number): Buffer;
270
- /**
271
- * Allocates a new buffer containing the given {array} of octets.
272
- *
273
- * @param array The octets to store.
274
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
275
- */
276
- new(array: Uint8Array): Buffer;
277
- /**
278
- * Produces a Buffer backed by the same allocated memory as
279
- * the given {ArrayBuffer}/{SharedArrayBuffer}.
280
- *
281
- * @param arrayBuffer The ArrayBuffer with which to share memory.
282
- * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
283
- */
284
- new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
285
- /**
286
- * Allocates a new buffer containing the given {array} of octets.
287
- *
288
- * @param array The octets to store.
289
- * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
290
- */
291
- new(array: readonly any[]): Buffer;
292
- /**
293
- * Copies the passed {buffer} data onto a new {Buffer} instance.
294
- *
295
- * @param buffer The buffer to copy.
296
- * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
297
- */
298
- new(buffer: Buffer): Buffer;
299
- /**
300
- * Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
301
- * Array entries outside that range will be truncated to fit into it.
302
- *
303
- * ```js
304
- * import { Buffer } from 'node:buffer';
305
- *
306
- * // Creates a new Buffer containing the UTF-8 bytes of the string 'buffer'.
307
- * const buf = Buffer.from([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]);
308
- * ```
309
- *
310
- * If `array` is an `Array`\-like object (that is, one with a `length` property of
311
- * type `number`), it is treated as if it is an array, unless it is a `Buffer` or
312
- * a `Uint8Array`. This means all other `TypedArray` variants get treated as an`Array`. To create a `Buffer` from the bytes backing a `TypedArray`, use `Buffer.copyBytesFrom()`.
313
- *
314
- * A `TypeError` will be thrown if `array` is not an `Array` or another type
315
- * appropriate for `Buffer.from()` variants.
316
- *
317
- * `Buffer.from(array)` and `Buffer.from(string)` may also use the internal`Buffer` pool like `Buffer.allocUnsafe()` does.
318
- * @since v5.10.0
319
- */
320
- from(
321
- arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
322
- byteOffset?: number,
323
- length?: number,
324
- ): Buffer;
325
- /**
326
- * Creates a new Buffer using the passed {data}
327
- * @param data data to create a new Buffer
328
- */
329
- from(data: Uint8Array | readonly number[]): Buffer;
330
- from(data: WithImplicitCoercion<Uint8Array | readonly number[] | string>): Buffer;
331
- /**
332
- * Creates a new Buffer containing the given JavaScript string {str}.
333
- * If provided, the {encoding} parameter identifies the character encoding.
334
- * If not provided, {encoding} defaults to 'utf8'.
335
- */
336
- from(
337
- str:
338
- | WithImplicitCoercion<string>
339
- | {
340
- [Symbol.toPrimitive](hint: "string"): string;
341
- },
342
- encoding?: BufferEncoding,
343
- ): Buffer;
344
- /**
345
- * Creates a new Buffer using the passed {data}
346
- * @param values to create a new Buffer
347
- */
348
- of(...items: number[]): Buffer;
248
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
249
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
250
+
349
251
  /**
350
252
  * Returns `true` if `obj` is a `Buffer`, `false` otherwise.
351
253
  *
@@ -417,62 +319,6 @@ declare module "buffer" {
417
319
  string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
418
320
  encoding?: BufferEncoding,
419
321
  ): number;
420
- /**
421
- * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
422
- *
423
- * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
424
- *
425
- * If `totalLength` is not provided, it is calculated from the `Buffer` instances
426
- * in `list` by adding their lengths.
427
- *
428
- * If `totalLength` is provided, it is coerced to an unsigned integer. If the
429
- * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
430
- * truncated to `totalLength`.
431
- *
432
- * ```js
433
- * import { Buffer } from 'node:buffer';
434
- *
435
- * // Create a single `Buffer` from a list of three `Buffer` instances.
436
- *
437
- * const buf1 = Buffer.alloc(10);
438
- * const buf2 = Buffer.alloc(14);
439
- * const buf3 = Buffer.alloc(18);
440
- * const totalLength = buf1.length + buf2.length + buf3.length;
441
- *
442
- * console.log(totalLength);
443
- * // Prints: 42
444
- *
445
- * const bufA = Buffer.concat([buf1, buf2, buf3], totalLength);
446
- *
447
- * console.log(bufA);
448
- * // Prints: <Buffer 00 00 00 00 ...>
449
- * console.log(bufA.length);
450
- * // Prints: 42
451
- * ```
452
- *
453
- * `Buffer.concat()` may also use the internal `Buffer` pool like `Buffer.allocUnsafe()` does.
454
- * @since v0.7.11
455
- * @param list List of `Buffer` or {@link Uint8Array} instances to concatenate.
456
- * @param totalLength Total length of the `Buffer` instances in `list` when concatenated.
457
- */
458
- concat(list: readonly Uint8Array[], totalLength?: number): Buffer;
459
- /**
460
- * Copies the underlying memory of `view` into a new `Buffer`.
461
- *
462
- * ```js
463
- * const u16 = new Uint16Array([0, 0xffff]);
464
- * const buf = Buffer.copyBytesFrom(u16, 1, 1);
465
- * u16[1] = 0;
466
- * console.log(buf.length); // 2
467
- * console.log(buf[0]); // 255
468
- * console.log(buf[1]); // 255
469
- * ```
470
- * @since v18.16.0
471
- * @param view The {TypedArray} to copy.
472
- * @param [offset=0] The starting offset within `view`.
473
- * @param [length=view.length - offset] The number of elements from `view` to copy.
474
- */
475
- copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
476
322
  /**
477
323
  * Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of`Buffer` instances. This is equivalent to calling `buf1.compare(buf2)`.
478
324
  *
@@ -491,135 +337,6 @@ declare module "buffer" {
491
337
  * @return Either `-1`, `0`, or `1`, depending on the result of the comparison. See `compare` for details.
492
338
  */
493
339
  compare(buf1: Uint8Array, buf2: Uint8Array): -1 | 0 | 1;
494
- /**
495
- * Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the`Buffer` will be zero-filled.
496
- *
497
- * ```js
498
- * import { Buffer } from 'node:buffer';
499
- *
500
- * const buf = Buffer.alloc(5);
501
- *
502
- * console.log(buf);
503
- * // Prints: <Buffer 00 00 00 00 00>
504
- * ```
505
- *
506
- * If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
507
- *
508
- * If `fill` is specified, the allocated `Buffer` will be initialized by calling `buf.fill(fill)`.
509
- *
510
- * ```js
511
- * import { Buffer } from 'node:buffer';
512
- *
513
- * const buf = Buffer.alloc(5, 'a');
514
- *
515
- * console.log(buf);
516
- * // Prints: <Buffer 61 61 61 61 61>
517
- * ```
518
- *
519
- * If both `fill` and `encoding` are specified, the allocated `Buffer` will be
520
- * initialized by calling `buf.fill(fill, encoding)`.
521
- *
522
- * ```js
523
- * import { Buffer } from 'node:buffer';
524
- *
525
- * const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');
526
- *
527
- * console.log(buf);
528
- * // Prints: <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>
529
- * ```
530
- *
531
- * Calling `Buffer.alloc()` can be measurably slower than the alternative `Buffer.allocUnsafe()` but ensures that the newly created `Buffer` instance
532
- * contents will never contain sensitive data from previous allocations, including
533
- * data that might not have been allocated for `Buffer`s.
534
- *
535
- * A `TypeError` will be thrown if `size` is not a number.
536
- * @since v5.10.0
537
- * @param size The desired length of the new `Buffer`.
538
- * @param [fill=0] A value to pre-fill the new `Buffer` with.
539
- * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
540
- */
541
- alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
542
- /**
543
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
544
- *
545
- * The underlying memory for `Buffer` instances created in this way is _not_
546
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `Buffer.alloc()` instead to initialize`Buffer` instances with zeroes.
547
- *
548
- * ```js
549
- * import { Buffer } from 'node:buffer';
550
- *
551
- * const buf = Buffer.allocUnsafe(10);
552
- *
553
- * console.log(buf);
554
- * // Prints (contents may vary): <Buffer a0 8b 28 3f 01 00 00 00 50 32>
555
- *
556
- * buf.fill(0);
557
- *
558
- * console.log(buf);
559
- * // Prints: <Buffer 00 00 00 00 00 00 00 00 00 00>
560
- * ```
561
- *
562
- * A `TypeError` will be thrown if `size` is not a number.
563
- *
564
- * The `Buffer` module pre-allocates an internal `Buffer` instance of
565
- * size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
566
- * and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two).
567
- *
568
- * Use of this pre-allocated internal memory pool is a key difference between
569
- * calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
570
- * Specifically, `Buffer.alloc(size, fill)` will _never_ use the internal `Buffer`pool, while `Buffer.allocUnsafe(size).fill(fill)`_will_ use the internal`Buffer` pool if `size` is less
571
- * than or equal to half `Buffer.poolSize`. The
572
- * difference is subtle but can be important when an application requires the
573
- * additional performance that `Buffer.allocUnsafe()` provides.
574
- * @since v5.10.0
575
- * @param size The desired length of the new `Buffer`.
576
- */
577
- allocUnsafe(size: number): Buffer;
578
- /**
579
- * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown. A zero-length `Buffer` is created if
580
- * `size` is 0.
581
- *
582
- * The underlying memory for `Buffer` instances created in this way is _not_
583
- * _initialized_. The contents of the newly created `Buffer` are unknown and _may contain sensitive data_. Use `buf.fill(0)` to initialize
584
- * such `Buffer` instances with zeroes.
585
- *
586
- * When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
587
- * allocations under 4 KiB are sliced from a single pre-allocated `Buffer`. This
588
- * allows applications to avoid the garbage collection overhead of creating many
589
- * individually allocated `Buffer` instances. This approach improves both
590
- * performance and memory usage by eliminating the need to track and clean up as
591
- * many individual `ArrayBuffer` objects.
592
- *
593
- * However, in the case where a developer may need to retain a small chunk of
594
- * memory from a pool for an indeterminate amount of time, it may be appropriate
595
- * to create an un-pooled `Buffer` instance using `Buffer.allocUnsafeSlow()` and
596
- * then copying out the relevant bits.
597
- *
598
- * ```js
599
- * import { Buffer } from 'node:buffer';
600
- *
601
- * // Need to keep around a few small chunks of memory.
602
- * const store = [];
603
- *
604
- * socket.on('readable', () => {
605
- * let data;
606
- * while (null !== (data = readable.read())) {
607
- * // Allocate for retained data.
608
- * const sb = Buffer.allocUnsafeSlow(10);
609
- *
610
- * // Copy the data into the new allocation.
611
- * data.copy(sb, 0, 0, 10);
612
- *
613
- * store.push(sb);
614
- * }
615
- * });
616
- * ```
617
- *
618
- * A `TypeError` will be thrown if `size` is not a number.
619
- * @since v5.12.0
620
- * @param size The desired length of the new `Buffer`.
621
- */
622
- allocUnsafeSlow(size: number): Buffer;
623
340
  /**
624
341
  * This is the size (in bytes) of pre-allocated internal `Buffer` instances used
625
342
  * for pooling. This value may be modified.
@@ -627,7 +344,10 @@ declare module "buffer" {
627
344
  */
628
345
  poolSize: number;
629
346
  }
630
- interface Buffer extends Uint8Array {
347
+ interface Buffer {
348
+ // see buffer.buffer.d.ts for implementation specific to TypeScript 5.7 and later
349
+ // see ts5.6/buffer.buffer.d.ts for implementation specific to TypeScript 5.6 and earlier
350
+
631
351
  /**
632
352
  * Writes `string` to `buf` at `offset` according to the character encoding in`encoding`. The `length` parameter is the number of bytes to write. If `buf` did
633
353
  * not contain enough space to fit the entire string, only part of `string` will be
@@ -864,100 +584,6 @@ declare module "buffer" {
864
584
  * @return The number of bytes copied.
865
585
  */
866
586
  copy(target: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
867
- /**
868
- * Returns a new `Buffer` that references the same memory as the original, but
869
- * offset and cropped by the `start` and `end` indices.
870
- *
871
- * This method is not compatible with the `Uint8Array.prototype.slice()`,
872
- * which is a superclass of `Buffer`. To copy the slice, use`Uint8Array.prototype.slice()`.
873
- *
874
- * ```js
875
- * import { Buffer } from 'node:buffer';
876
- *
877
- * const buf = Buffer.from('buffer');
878
- *
879
- * const copiedBuf = Uint8Array.prototype.slice.call(buf);
880
- * copiedBuf[0]++;
881
- * console.log(copiedBuf.toString());
882
- * // Prints: cuffer
883
- *
884
- * console.log(buf.toString());
885
- * // Prints: buffer
886
- *
887
- * // With buf.slice(), the original buffer is modified.
888
- * const notReallyCopiedBuf = buf.slice();
889
- * notReallyCopiedBuf[0]++;
890
- * console.log(notReallyCopiedBuf.toString());
891
- * // Prints: cuffer
892
- * console.log(buf.toString());
893
- * // Also prints: cuffer (!)
894
- * ```
895
- * @since v0.3.0
896
- * @deprecated Use `subarray` instead.
897
- * @param [start=0] Where the new `Buffer` will start.
898
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
899
- */
900
- slice(start?: number, end?: number): Buffer & WithArrayBufferLike<ArrayBuffer>;
901
- /**
902
- * Returns a new `Buffer` that references the same memory as the original, but
903
- * offset and cropped by the `start` and `end` indices.
904
- *
905
- * Specifying `end` greater than `buf.length` will return the same result as
906
- * that of `end` equal to `buf.length`.
907
- *
908
- * This method is inherited from [`TypedArray.prototype.subarray()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray).
909
- *
910
- * Modifying the new `Buffer` slice will modify the memory in the original `Buffer`because the allocated memory of the two objects overlap.
911
- *
912
- * ```js
913
- * import { Buffer } from 'node:buffer';
914
- *
915
- * // Create a `Buffer` with the ASCII alphabet, take a slice, and modify one byte
916
- * // from the original `Buffer`.
917
- *
918
- * const buf1 = Buffer.allocUnsafe(26);
919
- *
920
- * for (let i = 0; i < 26; i++) {
921
- * // 97 is the decimal ASCII value for 'a'.
922
- * buf1[i] = i + 97;
923
- * }
924
- *
925
- * const buf2 = buf1.subarray(0, 3);
926
- *
927
- * console.log(buf2.toString('ascii', 0, buf2.length));
928
- * // Prints: abc
929
- *
930
- * buf1[0] = 33;
931
- *
932
- * console.log(buf2.toString('ascii', 0, buf2.length));
933
- * // Prints: !bc
934
- * ```
935
- *
936
- * Specifying negative indexes causes the slice to be generated relative to the
937
- * end of `buf` rather than the beginning.
938
- *
939
- * ```js
940
- * import { Buffer } from 'node:buffer';
941
- *
942
- * const buf = Buffer.from('buffer');
943
- *
944
- * console.log(buf.subarray(-6, -1).toString());
945
- * // Prints: buffe
946
- * // (Equivalent to buf.subarray(0, 5).)
947
- *
948
- * console.log(buf.subarray(-6, -2).toString());
949
- * // Prints: buff
950
- * // (Equivalent to buf.subarray(0, 4).)
951
- *
952
- * console.log(buf.subarray(-5, -2).toString());
953
- * // Prints: uff
954
- * // (Equivalent to buf.subarray(1, 4).)
955
- * ```
956
- * @since v3.0.0
957
- * @param [start=0] Where the new `Buffer` will start.
958
- * @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
959
- */
960
- subarray(start?: number, end?: number): Buffer & WithArrayBufferLike<this["buffer"]>;
961
587
  /**
962
588
  * Writes `value` to `buf` at the specified `offset` as big-endian.
963
589
  *
@@ -2264,7 +1890,7 @@ declare module "buffer" {
2264
1890
  function btoa(data: string): string;
2265
1891
  interface Blob extends _Blob {}
2266
1892
  /**
2267
- * `Blob` class is a global reference for `require('node:buffer').Blob`
1893
+ * `Blob` class is a global reference for `import { Blob } from 'node:node:buffer'`
2268
1894
  * https://nodejs.org/api/buffer.html#class-blob
2269
1895
  * @since v18.0.0
2270
1896
  */