@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/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.12.2/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/perf_hooks.js)
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
@@ -150,6 +150,11 @@ 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;
153
158
  /**
154
159
  * The high resolution millisecond timestamp at which the V8 platform was
155
160
  * initialized.
@@ -163,12 +168,12 @@ declare module "perf_hooks" {
163
168
  utilization: number;
164
169
  }
165
170
  /**
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
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`.
168
173
  */
169
174
  type EventLoopUtilityFunction = (
170
- util1?: EventLoopUtilization,
171
- util2?: EventLoopUtilization,
175
+ utilization1?: EventLoopUtilization,
176
+ utilization2?: EventLoopUtilization,
172
177
  ) => EventLoopUtilization;
173
178
  interface MarkOptions {
174
179
  /**
@@ -177,7 +182,7 @@ declare module "perf_hooks" {
177
182
  detail?: unknown | undefined;
178
183
  /**
179
184
  * An optional timestamp to be used as the mark time.
180
- * @default `performance.now()`.
185
+ * @default `performance.now()`
181
186
  */
182
187
  startTime?: number | undefined;
183
188
  }
@@ -201,26 +206,36 @@ declare module "perf_hooks" {
201
206
  }
202
207
  interface TimerifyOptions {
203
208
  /**
204
- * A histogram object created using
205
- * `perf_hooks.createHistogram()` that will record runtime durations in
206
- * nanoseconds.
209
+ * A histogram object created using `perf_hooks.createHistogram()` that will record runtime
210
+ * durations in nanoseconds.
207
211
  */
208
212
  histogram?: RecordableHistogram | undefined;
209
213
  }
210
214
  interface Performance {
211
215
  /**
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
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
215
219
  */
216
220
  clearMarks(name?: string): void;
217
221
  /**
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
222
+ * If `name` is not provided, removes all `PerformanceMeasure` objects from the Performance Timeline.
223
+ * If `name` is provided, removes only the named measure.
221
224
  * @since v16.7.0
222
225
  */
223
226
  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;
224
239
  /**
225
240
  * Returns a list of `PerformanceEntry` objects in chronological order with respect to `performanceEntry.startTime`.
226
241
  * If you are only interested in performance entries of certain types or that have certain names, see
@@ -244,14 +259,17 @@ declare module "perf_hooks" {
244
259
  */
245
260
  getEntriesByType(type: EntryType): PerformanceEntry[];
246
261
  /**
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.
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`.
250
265
  * 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`.
251
270
  * @param name
252
- * @return The PerformanceMark entry that was created
253
271
  */
254
- mark(name?: string, options?: MarkOptions): PerformanceMark;
272
+ mark(name: string, options?: MarkOptions): PerformanceMark;
255
273
  /**
256
274
  * Creates a new PerformanceMeasure entry in the Performance Timeline.
257
275
  * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -271,31 +289,74 @@ declare module "perf_hooks" {
271
289
  measure(name: string, startMark?: string, endMark?: string): PerformanceMeasure;
272
290
  measure(name: string, options: MeasureOptions): PerformanceMeasure;
273
291
  /**
274
- * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
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
275
296
  */
276
297
  readonly nodeTiming: PerformanceNodeTiming;
277
298
  /**
278
- * @return the current high resolution millisecond timestamp
299
+ * Returns the current high resolution millisecond timestamp, where 0 represents the start of the current `node` process.
300
+ * @since v8.5.0
279
301
  */
280
302
  now(): number;
281
303
  /**
282
- * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
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
283
314
  */
284
315
  readonly timeOrigin: number;
285
316
  /**
317
+ * _This property is an extension by Node.js. It is not available in Web browsers._
318
+ *
286
319
  * Wraps a function within a new function that measures the running time of the wrapped function.
287
- * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
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.
288
349
  * @param fn
289
350
  */
290
351
  timerify<T extends (...params: any[]) => any>(fn: T, options?: TimerifyOptions): T;
291
352
  /**
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.
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
295
356
  */
296
- eventLoopUtilization: EventLoopUtilityFunction;
357
+ toJSON(): any;
297
358
  }
298
- interface PerformanceObserverEntryList {
359
+ class PerformanceObserverEntryList {
299
360
  /**
300
361
  * Returns a list of `PerformanceEntry` objects in chronological order
301
362
  * with respect to `performanceEntry.startTime`.
@@ -445,7 +506,7 @@ declare module "perf_hooks" {
445
506
  */
446
507
  disconnect(): void;
447
508
  /**
448
- * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
509
+ * Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes` or `options.type`:
449
510
  *
450
511
  * ```js
451
512
  * const {
@@ -475,6 +536,103 @@ declare module "perf_hooks" {
475
536
  },
476
537
  ): void;
477
538
  }
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
+ }
478
636
  namespace constants {
479
637
  const NODE_PERFORMANCE_GC_MAJOR: number;
480
638
  const NODE_PERFORMANCE_GC_MINOR: number;
@@ -499,10 +657,15 @@ declare module "perf_hooks" {
499
657
  }
500
658
  interface Histogram {
501
659
  /**
502
- * Returns a `Map` object detailing the accumulated percentile distribution.
503
- * @since v11.10.0
660
+ * The number of samples recorded by the histogram.
661
+ * @since v17.4.0, v16.14.0
504
662
  */
505
- readonly percentiles: Map<number, number>;
663
+ readonly count: number;
664
+ /**
665
+ * The number of samples recorded by the histogram.
666
+ * v17.4.0, v16.14.0
667
+ */
668
+ readonly countBigInt: bigint;
506
669
  /**
507
670
  * The number of times the event loop delay exceeded the maximum 1 hour event
508
671
  * loop delay threshold.
@@ -510,36 +673,67 @@ declare module "perf_hooks" {
510
673
  */
511
674
  readonly exceeds: number;
512
675
  /**
513
- * The minimum recorded event loop delay.
514
- * @since v11.10.0
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
515
678
  */
516
- readonly min: number;
679
+ readonly exceedsBigInt: bigint;
517
680
  /**
518
681
  * The maximum recorded event loop delay.
519
682
  * @since v11.10.0
520
683
  */
521
684
  readonly max: number;
685
+ /**
686
+ * The maximum recorded event loop delay.
687
+ * v17.4.0, v16.14.0
688
+ */
689
+ readonly maxBigInt: number;
522
690
  /**
523
691
  * The mean of the recorded event loop delays.
524
692
  * @since v11.10.0
525
693
  */
526
694
  readonly mean: number;
527
695
  /**
528
- * The standard deviation of the recorded event loop delays.
696
+ * The minimum recorded event loop delay.
529
697
  * @since v11.10.0
530
698
  */
531
- readonly stddev: number;
699
+ readonly min: number;
532
700
  /**
533
- * Resets the collected histogram data.
534
- * @since v11.10.0
701
+ * The minimum recorded event loop delay.
702
+ * v17.4.0, v16.14.0
535
703
  */
536
- reset(): void;
704
+ readonly minBigInt: bigint;
537
705
  /**
538
706
  * Returns the value at the given percentile.
539
707
  * @since v11.10.0
540
708
  * @param percentile A percentile value in the range (0, 100].
541
709
  */
542
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.
719
+ * @since v11.10.0
720
+ */
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>;
727
+ /**
728
+ * Resets the collected histogram data.
729
+ * @since v11.10.0
730
+ */
731
+ reset(): void;
732
+ /**
733
+ * The standard deviation of the recorded event loop delays.
734
+ * @since v11.10.0
735
+ */
736
+ readonly stddev: number;
543
737
  }
544
738
  interface IntervalHistogram extends Histogram {
545
739
  /**
@@ -564,8 +758,6 @@ declare module "perf_hooks" {
564
758
  /**
565
759
  * Calculates the amount of time (in nanoseconds) that has passed since the
566
760
  * previous call to `recordDelta()` and records that amount in the histogram.
567
- *
568
- * ## Examples
569
761
  * @since v15.9.0, v14.18.0
570
762
  */
571
763
  recordDelta(): void;
@@ -626,11 +818,79 @@ declare module "perf_hooks" {
626
818
  * @since v15.9.0, v14.18.0
627
819
  */
628
820
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
629
- import { performance as _performance } from "perf_hooks";
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";
630
830
  global {
631
831
  /**
632
- * `performance` is a global reference for `require('perf_hooks').performance`
633
- * https://nodejs.org/api/globals.html#performance
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
634
894
  * @since v16.0.0
635
895
  */
636
896
  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 --harmony script.js --version
436
+ * node --icu-data-dir=./foo --require ./bar.js script.js --version
437
437
  * ```
438
438
  *
439
439
  * Results in `process.execArgv`:
440
440
  *
441
441
  * ```js
442
- * ['--harmony']
442
+ * ["--icu-data-dir=./foo", "--require", "./bar.js"]
443
443
  * ```
444
444
  *
445
445
  * And `process.argv`:
@@ -1242,7 +1242,7 @@ declare module "process" {
1242
1242
  title: string;
1243
1243
  /**
1244
1244
  * The operating system CPU architecture for which the Node.js binary was compiled.
1245
- * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1245
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
1246
1246
  *
1247
1247
  * ```js
1248
1248
  * import { arch } from 'node:process';
@@ -1293,14 +1293,21 @@ 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, `undefined` is returned.
1296
+ * is unknown, `0` 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 | undefined;
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;
1304
1311
  /**
1305
1312
  * The `process.cpuUsage()` method returns the user and system CPU time usage of
1306
1313
  * 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.12.2/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/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.12.2/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/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.12.2/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/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.12.2/lib/repl.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/repl.js)
10
10
  */
11
11
  declare module "repl" {
12
12
  import { AsyncCompleter, Completer, Interface } from "node:readline";
@@ -251,7 +251,7 @@ declare module "repl" {
251
251
  private constructor();
252
252
  /**
253
253
  * The `replServer.defineCommand()` method is used to add new `.`\-prefixed commands
254
- * to the REPL instance. Such commands are invoked by typing a `.` followed by the`keyword`. The `cmd` is either a `Function` or an `Object` with the following
254
+ * to the REPL instance. Such commands are invoked by typing a `.` followed by the `keyword`. The `cmd` is either a `Function` or an `Object` with the following
255
255
  * properties:
256
256
  *
257
257
  * The following example shows two new commands added to the REPL instance:
@@ -289,7 +289,7 @@ declare module "repl" {
289
289
  defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
290
290
  /**
291
291
  * The `replServer.displayPrompt()` method readies the REPL instance for input
292
- * from the user, printing the configured `prompt` to a new line in the `output`and resuming the `input` to accept new input.
292
+ * from the user, printing the configured `prompt` to a new line in the `output` and resuming the `input` to accept new input.
293
293
  *
294
294
  * When multi-line input is being entered, an ellipsis is printed rather than the
295
295
  * 'prompt'.
@@ -304,7 +304,7 @@ declare module "repl" {
304
304
  /**
305
305
  * The `replServer.clearBufferedCommand()` method clears any command that has been
306
306
  * buffered but not yet executed. This method is primarily intended to be
307
- * called from within the action function for commands registered using the`replServer.defineCommand()` method.
307
+ * called from within the action function for commands registered using the `replServer.defineCommand()` method.
308
308
  * @since v9.0.0
309
309
  */
310
310
  clearBufferedCommand(): void;