@types/node 20.12.13 → 20.12.14

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/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.13.1/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/perf_hooks.js)
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
@@ -150,11 +150,6 @@ declare module "perf_hooks" {
150
150
  * @since v8.5.0
151
151
  */
152
152
  readonly loopStart: number;
153
- /**
154
- * The high resolution millisecond timestamp at which the Node.js process was initialized.
155
- * @since v8.5.0
156
- */
157
- readonly nodeStart: number;
158
153
  /**
159
154
  * The high resolution millisecond timestamp at which the V8 platform was
160
155
  * initialized.
@@ -168,12 +163,12 @@ declare module "perf_hooks" {
168
163
  utilization: number;
169
164
  }
170
165
  /**
171
- * @param utilization1 The result of a previous call to `eventLoopUtilization()`.
172
- * @param utilization2 The result of a previous call to `eventLoopUtilization()` prior to `utilization1`.
166
+ * @param util1 The result of a previous call to eventLoopUtilization()
167
+ * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
173
168
  */
174
169
  type EventLoopUtilityFunction = (
175
- utilization1?: EventLoopUtilization,
176
- utilization2?: EventLoopUtilization,
170
+ util1?: EventLoopUtilization,
171
+ util2?: EventLoopUtilization,
177
172
  ) => EventLoopUtilization;
178
173
  interface MarkOptions {
179
174
  /**
@@ -182,7 +177,7 @@ declare module "perf_hooks" {
182
177
  detail?: unknown | undefined;
183
178
  /**
184
179
  * An optional timestamp to be used as the mark time.
185
- * @default `performance.now()`
180
+ * @default `performance.now()`.
186
181
  */
187
182
  startTime?: number | undefined;
188
183
  }
@@ -206,36 +201,26 @@ declare module "perf_hooks" {
206
201
  }
207
202
  interface TimerifyOptions {
208
203
  /**
209
- * A histogram object created using `perf_hooks.createHistogram()` that will record runtime
210
- * durations in nanoseconds.
204
+ * A histogram object created using
205
+ * `perf_hooks.createHistogram()` that will record runtime durations in
206
+ * nanoseconds.
211
207
  */
212
208
  histogram?: RecordableHistogram | undefined;
213
209
  }
214
210
  interface Performance {
215
211
  /**
216
- * If `name` is not provided, removes all `PerformanceMark` objects from the Performance Timeline.
217
- * If `name` is provided, removes only the named mark.
218
- * @since v8.5.0
212
+ * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
213
+ * If name is provided, removes only the named mark.
214
+ * @param name
219
215
  */
220
216
  clearMarks(name?: string): void;
221
217
  /**
222
- * If `name` is not provided, removes all `PerformanceMeasure` objects from the Performance Timeline.
223
- * If `name` is provided, removes only the named measure.
218
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
219
+ * If name is provided, removes only the named measure.
220
+ * @param name
224
221
  * @since v16.7.0
225
222
  */
226
223
  clearMeasures(name?: string): void;
227
- /**
228
- * If `name` is not provided, removes all `PerformanceResourceTiming` objects from the Resource Timeline.
229
- * If `name` is provided, removes only the named resource.
230
- * @since v18.2.0, v16.17.0
231
- */
232
- clearResourceTimings(name?: string): void;
233
- /**
234
- * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
235
- * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
236
- * No other CPU idle time is taken into consideration.
237
- */
238
- eventLoopUtilization: EventLoopUtilityFunction;
239
224
  /**
240
225
  * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
241
226
  * If you are only interested in performance entries of certain types or that have certain names, see
@@ -259,17 +244,14 @@ declare module "perf_hooks" {
259
244
  */
260
245
  getEntriesByType(type: EntryType): PerformanceEntry[];
261
246
  /**
262
- * Creates a new `PerformanceMark` entry in the Performance Timeline.
263
- * A `PerformanceMark` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'mark'`,
264
- * and whose `performanceEntry.duration` is always `0`.
247
+ * Creates a new PerformanceMark entry in the Performance Timeline.
248
+ * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
249
+ * and whose performanceEntry.duration is always 0.
265
250
  * Performance marks are used to mark specific significant moments in the Performance Timeline.
266
- *
267
- * The created `PerformanceMark` entry is put in the global Performance Timeline and can be queried with
268
- * `performance.getEntries`, `performance.getEntriesByName`, and `performance.getEntriesByType`. When the observation is
269
- * performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`.
270
251
  * @param name
252
+ * @return The PerformanceMark entry that was created
271
253
  */
272
- mark(name: string, options?: MarkOptions): PerformanceMark;
254
+ mark(name?: string, options?: MarkOptions): PerformanceMark;
273
255
  /**
274
256
  * Creates a new PerformanceMeasure entry in the Performance Timeline.
275
257
  * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -289,74 +271,31 @@ declare module "perf_hooks" {
289
271
  measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
290
272
  measure(name: string, options: MeasureOptions): PerformanceMeasure;
291
273
  /**
292
- * _This property is an extension by Node.js. It is not available in Web browsers._
293
- *
294
- * An instance of the `PerformanceNodeTiming` class that provides performance metrics for specific Node.js operational milestones.
295
- * @since v8.5.0
274
+ * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
296
275
  */
297
276
  readonly nodeTiming: PerformanceNodeTiming;
298
277
  /**
299
- * Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process.
300
- * @since v8.5.0
278
+ * @return the current high resolution millisecond timestamp
301
279
  */
302
280
  now(): number;
303
281
  /**
304
- * Sets the global performance resource timing buffer size to the specified number of "resource" type performance entry objects.
305
- *
306
- * By default the max buffer size is set to 250.
307
- * @since v18.8.0
308
- */
309
- setResourceTimingBufferSize(maxSize: number): void;
310
- /**
311
- * The [`timeOrigin`](https://w3c.github.io/hr-time/#dom-performance-timeorigin) specifies the high resolution millisecond timestamp
312
- * at which the current `node` process began, measured in Unix time.
313
- * @since v8.5.0
282
+ * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
314
283
  */
315
284
  readonly timeOrigin: number;
316
285
  /**
317
- * _This property is an extension by Node.js. It is not available in Web browsers._
318
- *
319
286
  * Wraps a function within a new function that measures the running time of the wrapped function.
320
- * A `PerformanceObserver` must be subscribed to the `'function'` event type in order for the timing details to be accessed.
321
- *
322
- * ```js
323
- * const {
324
- * performance,
325
- * PerformanceObserver,
326
- * } = require('node:perf_hooks');
327
- *
328
- * function someFunction() {
329
- * console.log('hello world');
330
- * }
331
- *
332
- * const wrapped = performance.timerify(someFunction);
333
- *
334
- * const obs = new PerformanceObserver((list) => {
335
- * console.log(list.getEntries()[0].duration);
336
- *
337
- * performance.clearMarks();
338
- * performance.clearMeasures();
339
- * obs.disconnect();
340
- * });
341
- * obs.observe({ entryTypes: ['function'] });
342
- *
343
- * // A performance timeline entry will be created
344
- * wrapped();
345
- * ```
346
- *
347
- * If the wrapped function returns a promise, a finally handler will be attached to the promise and the duration will be reported
348
- * once the finally handler is invoked.
287
+ * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
349
288
  * @param fn
350
289
  */
351
290
  timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
352
291
  /**
353
- * An object which is JSON representation of the performance object. It is similar to
354
- * [`window.performance.toJSON`](https://developer.mozilla.org/en-US/docs/Web/API/Performance/toJSON) in browsers.
355
- * @since v16.1.0
292
+ * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
293
+ * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
294
+ * No other CPU idle time is taken into consideration.
356
295
  */
357
- toJSON(): any;
296
+ eventLoopUtilization: EventLoopUtilityFunction;
358
297
  }
359
- class PerformanceObserverEntryList {
298
+ interface PerformanceObserverEntryList {
360
299
  /**
361
300
  * Returns a list of `PerformanceEntry` objects in chronological order
362
301
  * with respect to `performanceEntry.startTime`.
@@ -536,103 +475,6 @@ declare module "perf_hooks" {
536
475
  },
537
476
  ): void;
538
477
  }
539
- /**
540
- * Provides detailed network timing data regarding the loading of an application's resources.
541
- *
542
- * The constructor of this class is not exposed to users directly.
543
- * @since v18.2.0, v16.17.0
544
- */
545
- class PerformanceResourceTiming extends PerformanceEntry {
546
- protected constructor();
547
- /**
548
- * The high resolution millisecond timestamp at immediately before dispatching the `fetch`
549
- * request. If the resource is not intercepted by a worker the property will always return 0.
550
- * @since v18.2.0, v16.17.0
551
- */
552
- readonly workerStart: number;
553
- /**
554
- * The high resolution millisecond timestamp that represents the start time of the fetch which
555
- * initiates the redirect.
556
- * @since v18.2.0, v16.17.0
557
- */
558
- readonly redirectStart: number;
559
- /**
560
- * The high resolution millisecond timestamp that will be created immediately after receiving
561
- * the last byte of the response of the last redirect.
562
- * @since v18.2.0, v16.17.0
563
- */
564
- readonly redirectEnd: number;
565
- /**
566
- * The high resolution millisecond timestamp immediately before the Node.js starts to fetch the resource.
567
- * @since v18.2.0, v16.17.0
568
- */
569
- readonly fetchStart: number;
570
- /**
571
- * The high resolution millisecond timestamp immediately before the Node.js starts the domain name lookup
572
- * for the resource.
573
- * @since v18.2.0, v16.17.0
574
- */
575
- readonly domainLookupStart: number;
576
- /**
577
- * The high resolution millisecond timestamp representing the time immediately after the Node.js finished
578
- * the domain name lookup for the resource.
579
- * @since v18.2.0, v16.17.0
580
- */
581
- readonly domainLookupEnd: number;
582
- /**
583
- * The high resolution millisecond timestamp representing the time immediately before Node.js starts to
584
- * establish the connection to the server to retrieve the resource.
585
- * @since v18.2.0, v16.17.0
586
- */
587
- readonly connectStart: number;
588
- /**
589
- * The high resolution millisecond timestamp representing the time immediately after Node.js finishes
590
- * establishing the connection to the server to retrieve the resource.
591
- * @since v18.2.0, v16.17.0
592
- */
593
- readonly connectEnd: number;
594
- /**
595
- * The high resolution millisecond timestamp representing the time immediately before Node.js starts the
596
- * handshake process to secure the current connection.
597
- * @since v18.2.0, v16.17.0
598
- */
599
- readonly secureConnectionStart: number;
600
- /**
601
- * The high resolution millisecond timestamp representing the time immediately before Node.js receives the
602
- * first byte of the response from the server.
603
- * @since v18.2.0, v16.17.0
604
- */
605
- readonly requestStart: number;
606
- /**
607
- * The high resolution millisecond timestamp representing the time immediately after Node.js receives the
608
- * last byte of the resource or immediately before the transport connection is closed, whichever comes first.
609
- * @since v18.2.0, v16.17.0
610
- */
611
- readonly responseEnd: number;
612
- /**
613
- * A number representing the size (in octets) of the fetched resource. The size includes the response header
614
- * fields plus the response payload body.
615
- * @since v18.2.0, v16.17.0
616
- */
617
- readonly transferSize: number;
618
- /**
619
- * A number representing the size (in octets) received from the fetch (HTTP or cache), of the payload body, before
620
- * removing any applied content-codings.
621
- * @since v18.2.0, v16.17.0
622
- */
623
- readonly encodedBodySize: number;
624
- /**
625
- * A number representing the size (in octets) received from the fetch (HTTP or cache), of the message body, after
626
- * removing any applied content-codings.
627
- * @since v18.2.0, v16.17.0
628
- */
629
- readonly decodedBodySize: number;
630
- /**
631
- * Returns a `object` that is the JSON representation of the `PerformanceResourceTiming` object
632
- * @since v18.2.0, v16.17.0
633
- */
634
- toJSON(): any;
635
- }
636
478
  namespace constants {
637
479
  const NODE_PERFORMANCE_GC_MAJOR: number;
638
480
  const NODE_PERFORMANCE_GC_MINOR: number;
@@ -657,15 +499,10 @@ declare module "perf_hooks" {
657
499
  }
658
500
  interface Histogram {
659
501
  /**
660
- * The number of samples recorded by the histogram.
661
- * @since v17.4.0, v16.14.0
662
- */
663
- readonly count: number;
664
- /**
665
- * The number of samples recorded by the histogram.
666
- * v17.4.0, v16.14.0
502
+ * Returns a `Map` object detailing the accumulated percentile distribution.
503
+ * @since v11.10.0
667
504
  */
668
- readonly countBigInt: bigint;
505
+ readonly percentiles: Map<number, number>;
669
506
  /**
670
507
  * The number of times the event loop delay exceeded the maximum 1 hour event
671
508
  * loop delay threshold.
@@ -673,67 +510,36 @@ declare module "perf_hooks" {
673
510
  */
674
511
  readonly exceeds: number;
675
512
  /**
676
- * The number of times the event loop delay exceeded the maximum 1 hour event loop delay threshold.
677
- * @since v17.4.0, v16.14.0
513
+ * The minimum recorded event loop delay.
514
+ * @since v11.10.0
678
515
  */
679
- readonly exceedsBigInt: bigint;
516
+ readonly min: number;
680
517
  /**
681
518
  * The maximum recorded event loop delay.
682
519
  * @since v11.10.0
683
520
  */
684
521
  readonly max: number;
685
- /**
686
- * The maximum recorded event loop delay.
687
- * v17.4.0, v16.14.0
688
- */
689
- readonly maxBigInt: number;
690
522
  /**
691
523
  * The mean of the recorded event loop delays.
692
524
  * @since v11.10.0
693
525
  */
694
526
  readonly mean: number;
695
527
  /**
696
- * The minimum recorded event loop delay.
697
- * @since v11.10.0
698
- */
699
- readonly min: number;
700
- /**
701
- * The minimum recorded event loop delay.
702
- * v17.4.0, v16.14.0
703
- */
704
- readonly minBigInt: bigint;
705
- /**
706
- * Returns the value at the given percentile.
707
- * @since v11.10.0
708
- * @param percentile A percentile value in the range (0, 100].
709
- */
710
- percentile(percentile: number): number;
711
- /**
712
- * Returns the value at the given percentile.
713
- * @since v17.4.0, v16.14.0
714
- * @param percentile A percentile value in the range (0, 100].
715
- */
716
- percentileBigInt(percentile: number): bigint;
717
- /**
718
- * Returns a `Map` object detailing the accumulated percentile distribution.
528
+ * The standard deviation of the recorded event loop delays.
719
529
  * @since v11.10.0
720
530
  */
721
- readonly percentiles: Map<number, number>;
722
- /**
723
- * Returns a `Map` object detailing the accumulated percentile distribution.
724
- * @since v17.4.0, v16.14.0
725
- */
726
- readonly percentilesBigInt: Map<bigint, bigint>;
531
+ readonly stddev: number;
727
532
  /**
728
533
  * Resets the collected histogram data.
729
534
  * @since v11.10.0
730
535
  */
731
536
  reset(): void;
732
537
  /**
733
- * The standard deviation of the recorded event loop delays.
538
+ * Returns the value at the given percentile.
734
539
  * @since v11.10.0
540
+ * @param percentile A percentile value in the range (0, 100].
735
541
  */
736
- readonly stddev: number;
542
+ percentile(percentile: number): number;
737
543
  }
738
544
  interface IntervalHistogram extends Histogram {
739
545
  /**
@@ -758,6 +564,8 @@ declare module "perf_hooks" {
758
564
  /**
759
565
  * Calculates the amount of time (in nanoseconds) that has passed since the
760
566
  * previous call to `recordDelta()` and records that amount in the histogram.
567
+ *
568
+ * ## Examples
761
569
  * @since v15.9.0, v14.18.0
762
570
  */
763
571
  recordDelta(): void;
@@ -818,79 +626,11 @@ declare module "perf_hooks" {
818
626
  * @since v15.9.0, v14.18.0
819
627
  */
820
628
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
821
- import {
822
- performance as _performance,
823
- PerformanceEntry as _PerformanceEntry,
824
- PerformanceMark as _PerformanceMark,
825
- PerformanceMeasure as _PerformanceMeasure,
826
- PerformanceObserver as _PerformanceObserver,
827
- PerformanceObserverEntryList as _PerformanceObserverEntryList,
828
- PerformanceResourceTiming as _PerformanceResourceTiming,
829
- } from "perf_hooks";
629
+ import { performance as _performance } from "perf_hooks";
830
630
  global {
831
631
  /**
832
- * `PerformanceEntry` is a global reference for `require('node:perf_hooks').PerformanceEntry`
833
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry
834
- * @since v19.0.0
835
- */
836
- var PerformanceEntry: typeof globalThis extends {
837
- onmessage: any;
838
- PerformanceEntry: infer T;
839
- } ? T
840
- : typeof _PerformanceEntry;
841
- /**
842
- * `PerformanceMark` is a global reference for `require('node:perf_hooks').PerformanceMark`
843
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark
844
- * @since v19.0.0
845
- */
846
- var PerformanceMark: typeof globalThis extends {
847
- onmessage: any;
848
- PerformanceMark: infer T;
849
- } ? T
850
- : typeof _PerformanceMark;
851
- /**
852
- * `PerformanceMeasure` is a global reference for `require('node:perf_hooks').PerformanceMeasure`
853
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure
854
- * @since v19.0.0
855
- */
856
- var PerformanceMeasure: typeof globalThis extends {
857
- onmessage: any;
858
- PerformanceMeasure: infer T;
859
- } ? T
860
- : typeof _PerformanceMeasure;
861
- /**
862
- * `PerformanceObserver` is a global reference for `require('node:perf_hooks').PerformanceObserver`
863
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver
864
- * @since v19.0.0
865
- */
866
- var PerformanceObserver: typeof globalThis extends {
867
- onmessage: any;
868
- PerformanceObserver: infer T;
869
- } ? T
870
- : typeof _PerformanceObserver;
871
- /**
872
- * `PerformanceObserverEntryList` is a global reference for `require('node:perf_hooks').PerformanceObserverEntryList`
873
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist
874
- * @since v19.0.0
875
- */
876
- var PerformanceObserverEntryList: typeof globalThis extends {
877
- onmessage: any;
878
- PerformanceObserverEntryList: infer T;
879
- } ? T
880
- : typeof _PerformanceObserverEntryList;
881
- /**
882
- * `PerformanceResourceTiming` is a global reference for `require('node:perf_hooks').PerformanceResourceTiming`
883
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming
884
- * @since v19.0.0
885
- */
886
- var PerformanceResourceTiming: typeof globalThis extends {
887
- onmessage: any;
888
- PerformanceResourceTiming: infer T;
889
- } ? T
890
- : typeof _PerformanceResourceTiming;
891
- /**
892
- * `performance` is a global reference for `require('node:perf_hooks').performance`
893
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance
632
+ * `performance` is a global reference for `require('perf_hooks').performance`
633
+ * https://nodejs.org/api/globals.html#performance
894
634
  * @since v16.0.0
895
635
  */
896
636
  var performance: typeof globalThis extends {
node/process.d.ts CHANGED
@@ -433,13 +433,13 @@ declare module "process" {
433
433
  * the same execution environment as the parent.
434
434
  *
435
435
  * ```bash
436
- * node --icu-data-dir=./foo --require ./bar.js script.js --version
436
+ * node --harmony script.js --version
437
437
  * ```
438
438
  *
439
439
  * Results in `process.execArgv`:
440
440
  *
441
441
  * ```js
442
- * ["--icu-data-dir=./foo", "--require", "./bar.js"]
442
+ * ['--harmony']
443
443
  * ```
444
444
  *
445
445
  * And `process.argv`:
@@ -1293,21 +1293,14 @@ declare module "process" {
1293
1293
  /**
1294
1294
  * Gets the amount of memory available to the process (in bytes) based on
1295
1295
  * limits imposed by the OS. If there is no such constraint, or the constraint
1296
- * is unknown, `0` is returned.
1296
+ * is unknown, `undefined` is returned.
1297
1297
  *
1298
1298
  * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
1299
1299
  * information.
1300
1300
  * @since v19.6.0, v18.15.0
1301
1301
  * @experimental
1302
1302
  */
1303
- constrainedMemory(): number;
1304
- /**
1305
- * Gets the amount of free memory that is still available to the process (in bytes).
1306
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v20.x/api/process.html#processavailablememory) for more information.
1307
- * @experimental
1308
- * @since v20.13.0
1309
- */
1310
- availableMemory(): number;
1303
+ constrainedMemory(): number | undefined;
1311
1304
  /**
1312
1305
  * The `process.cpuUsage()` method returns the user and system CPU time usage of
1313
1306
  * the current process, in an object with properties `user` and `system`, whose
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.13.1/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/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.13.1/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/querystring.js)
13
13
  */
14
14
  declare module "querystring" {
15
15
  interface StringifyOptions {
node/readline.d.ts CHANGED
@@ -31,7 +31,7 @@
31
31
  *
32
32
  * 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
33
33
  * received on the `input` stream.
34
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/readline.js)
35
35
  */
36
36
  declare module "readline" {
37
37
  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.13.1/lib/repl.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/repl.js)
10
10
  */
11
11
  declare module "repl" {
12
12
  import { AsyncCompleter, Completer, Interface } from "node:readline";
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.13.1/lib/stream.js)
18
+ * @see [source](https://github.com/nodejs/node/blob/v20.12.2/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`.
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.
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.
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
385
- * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode 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 be a string, `Buffer`, `Uint8Array`, or `null`. For object mode
385
+ * 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},
786
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any 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` or `Uint8Array`. For object mode streams, `chunk` may be any
786
+ * 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},
817
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any 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` or `Uint8Array`. For object mode streams, `chunk` may be any
817
+ * 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 calling `.destroy(new AbortError())` on the
1304
- * 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
1304
+ * calling `.destroy(new AbortError())` on the 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
  *