@types/node 18.19.43 → 18.19.44

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 v18.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 02 Aug 2024 08:37:31 GMT
11
+ * Last updated: Fri, 09 Aug 2024 18:08:59 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.43",
3
+ "version": "18.19.44",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -217,6 +217,6 @@
217
217
  "dependencies": {
218
218
  "undici-types": "~5.26.4"
219
219
  },
220
- "typesPublisherContentHash": "7822f2e7f22f7070d22af915d93cb6dc4dcdf3e8a784cab073ce5b99d8a6f6bd",
220
+ "typesPublisherContentHash": "d4e04897ec9bde3e0b6c729e0ab0e4da065a312fc2bf6b83619bd70cfd75353c",
221
221
  "typeScriptVersion": "4.8"
222
222
  }
@@ -30,7 +30,17 @@
30
30
  */
31
31
  declare module "perf_hooks" {
32
32
  import { AsyncResource } from "node:async_hooks";
33
- type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http" | "dns";
33
+ type EntryType =
34
+ | "dns" // Node.js only
35
+ | "function" // Node.js only
36
+ | "gc" // Node.js only
37
+ | "http2" // Node.js only
38
+ | "http" // Node.js only
39
+ | "mark" // available on the Web
40
+ | "measure" // available on the Web
41
+ | "net" // Node.js only
42
+ | "node" // Node.js only
43
+ | "resource"; // available on the Web
34
44
  interface NodeGCPerformanceDetail {
35
45
  /**
36
46
  * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
@@ -240,6 +250,24 @@ declare module "perf_hooks" {
240
250
  * @return The PerformanceMark entry that was created
241
251
  */
242
252
  mark(name?: string, options?: MarkOptions): PerformanceMark;
253
+ /**
254
+ * Creates a new `PerformanceResourceTiming` entry in the Resource Timeline.
255
+ * A `PerformanceResourceTiming` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'resource'`.
256
+ * Performance resources are used to mark moments in the Resource Timeline.
257
+ * @param timingInfo [Fetch Timing Info](https://fetch.spec.whatwg.org/#fetch-timing-info)
258
+ * @param requestedUrl The resource url
259
+ * @param initiatorType The initiator name, e.g: 'fetch'
260
+ * @param global
261
+ * @param cacheMode The cache mode must be an empty string ('') or 'local'
262
+ * @since v18.2.0, v16.17.0
263
+ */
264
+ markResourceTiming(
265
+ timingInfo: object,
266
+ requestedUrl: string,
267
+ initiatorType: string,
268
+ global: object,
269
+ cacheMode: "" | "local",
270
+ ): PerformanceResourceTiming;
243
271
  /**
244
272
  * Creates a new PerformanceMeasure entry in the Performance Timeline.
245
273
  * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
@@ -454,6 +482,105 @@ declare module "perf_hooks" {
454
482
  },
455
483
  ): void;
456
484
  }
485
+ /**
486
+ * Provides detailed network timing data regarding the loading of an application's resources.
487
+ *
488
+ * The constructor of this class is not exposed to users directly.
489
+ * @since v18.2.0, v16.17.0
490
+ */
491
+ class PerformanceResourceTiming extends PerformanceEntry {
492
+ readonly entryType: "resource";
493
+ protected constructor();
494
+ /**
495
+ * The high resolution millisecond timestamp at immediately before dispatching the `fetch`
496
+ * request. If the resource is not intercepted by a worker the property will always return 0.
497
+ * @since v18.2.0, v16.17.0
498
+ */
499
+ readonly workerStart: number;
500
+ /**
501
+ * The high resolution millisecond timestamp that represents the start time of the fetch which
502
+ * initiates the redirect.
503
+ * @since v18.2.0, v16.17.0
504
+ */
505
+ readonly redirectStart: number;
506
+ /**
507
+ * The high resolution millisecond timestamp that will be created immediately after receiving
508
+ * the last byte of the response of the last redirect.
509
+ * @since v18.2.0, v16.17.0
510
+ */
511
+ readonly redirectEnd: number;
512
+ /**
513
+ * The high resolution millisecond timestamp immediately before the Node.js starts to fetch the resource.
514
+ * @since v18.2.0, v16.17.0
515
+ */
516
+ readonly fetchStart: number;
517
+ /**
518
+ * The high resolution millisecond timestamp immediately before the Node.js starts the domain name lookup
519
+ * for the resource.
520
+ * @since v18.2.0, v16.17.0
521
+ */
522
+ readonly domainLookupStart: number;
523
+ /**
524
+ * The high resolution millisecond timestamp representing the time immediately after the Node.js finished
525
+ * the domain name lookup for the resource.
526
+ * @since v18.2.0, v16.17.0
527
+ */
528
+ readonly domainLookupEnd: number;
529
+ /**
530
+ * The high resolution millisecond timestamp representing the time immediately before Node.js starts to
531
+ * establish the connection to the server to retrieve the resource.
532
+ * @since v18.2.0, v16.17.0
533
+ */
534
+ readonly connectStart: number;
535
+ /**
536
+ * The high resolution millisecond timestamp representing the time immediately after Node.js finishes
537
+ * establishing the connection to the server to retrieve the resource.
538
+ * @since v18.2.0, v16.17.0
539
+ */
540
+ readonly connectEnd: number;
541
+ /**
542
+ * The high resolution millisecond timestamp representing the time immediately before Node.js starts the
543
+ * handshake process to secure the current connection.
544
+ * @since v18.2.0, v16.17.0
545
+ */
546
+ readonly secureConnectionStart: number;
547
+ /**
548
+ * The high resolution millisecond timestamp representing the time immediately before Node.js receives the
549
+ * first byte of the response from the server.
550
+ * @since v18.2.0, v16.17.0
551
+ */
552
+ readonly requestStart: number;
553
+ /**
554
+ * The high resolution millisecond timestamp representing the time immediately after Node.js receives the
555
+ * last byte of the resource or immediately before the transport connection is closed, whichever comes first.
556
+ * @since v18.2.0, v16.17.0
557
+ */
558
+ readonly responseEnd: number;
559
+ /**
560
+ * A number representing the size (in octets) of the fetched resource. The size includes the response header
561
+ * fields plus the response payload body.
562
+ * @since v18.2.0, v16.17.0
563
+ */
564
+ readonly transferSize: number;
565
+ /**
566
+ * A number representing the size (in octets) received from the fetch (HTTP or cache), of the payload body, before
567
+ * removing any applied content-codings.
568
+ * @since v18.2.0, v16.17.0
569
+ */
570
+ readonly encodedBodySize: number;
571
+ /**
572
+ * A number representing the size (in octets) received from the fetch (HTTP or cache), of the message body, after
573
+ * removing any applied content-codings.
574
+ * @since v18.2.0, v16.17.0
575
+ */
576
+ readonly decodedBodySize: number;
577
+ /**
578
+ * Returns a `object` that is the JSON representation of the `PerformanceResourceTiming` object
579
+ * @since v18.2.0, v16.17.0
580
+ */
581
+ toJSON(): any;
582
+ }
583
+
457
584
  namespace constants {
458
585
  const NODE_PERFORMANCE_GC_MAJOR: number;
459
586
  const NODE_PERFORMANCE_GC_MINOR: number;