lighthouse 12.1.0-dev.20240629 → 12.1.0-dev.20240701

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 (115) hide show
  1. package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +5 -7
  2. package/core/audits/byte-efficiency/byte-efficiency-audit.js +3 -6
  3. package/core/audits/byte-efficiency/render-blocking-resources.d.ts +3 -7
  4. package/core/audits/byte-efficiency/render-blocking-resources.js +10 -16
  5. package/core/audits/dobetterweb/uses-http2.d.ts +4 -6
  6. package/core/audits/dobetterweb/uses-http2.js +2 -5
  7. package/core/audits/long-tasks.d.ts +6 -6
  8. package/core/audits/long-tasks.js +4 -4
  9. package/core/audits/prioritize-lcp-image.d.ts +1 -1
  10. package/core/audits/uses-rel-preload.d.ts +4 -3
  11. package/core/audits/uses-rel-preload.js +8 -6
  12. package/core/computed/critical-request-chains.d.ts +4 -3
  13. package/core/computed/critical-request-chains.js +5 -4
  14. package/core/computed/document-urls.js +1 -1
  15. package/core/computed/load-simulator.d.ts +3 -4
  16. package/core/computed/load-simulator.js +1 -1
  17. package/core/computed/main-resource.js +1 -1
  18. package/core/computed/metrics/lantern-first-contentful-paint.d.ts +2 -4
  19. package/core/computed/metrics/lantern-first-contentful-paint.js +1 -3
  20. package/core/computed/metrics/lantern-interactive.d.ts +2 -4
  21. package/core/computed/metrics/lantern-interactive.js +1 -3
  22. package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +2 -4
  23. package/core/computed/metrics/lantern-largest-contentful-paint.js +1 -3
  24. package/core/computed/metrics/lantern-max-potential-fid.d.ts +2 -4
  25. package/core/computed/metrics/lantern-max-potential-fid.js +1 -3
  26. package/core/computed/metrics/lantern-metric.d.ts +8 -8
  27. package/core/computed/metrics/lantern-metric.js +1 -1
  28. package/core/computed/metrics/lantern-speed-index.d.ts +2 -4
  29. package/core/computed/metrics/lantern-speed-index.js +1 -3
  30. package/core/computed/metrics/lantern-total-blocking-time.d.ts +2 -4
  31. package/core/computed/metrics/lantern-total-blocking-time.js +1 -3
  32. package/core/computed/metrics/total-blocking-time.js +1 -1
  33. package/core/computed/network-analysis.js +1 -1
  34. package/core/computed/page-dependency-graph.d.ts +3 -6
  35. package/core/computed/page-dependency-graph.js +3 -4
  36. package/core/computed/tbt-impact-tasks.js +2 -2
  37. package/core/lib/asset-saver.js +1 -1
  38. package/core/lib/lantern/lantern.d.ts +2 -19
  39. package/core/lib/lantern/lantern.js +2 -45
  40. package/core/lib/lantern-trace-saver.d.ts +4 -6
  41. package/core/lib/lantern-trace-saver.js +2 -3
  42. package/core/lib/navigation-error.js +2 -2
  43. package/core/lib/network-recorder.js +1 -1
  44. package/core/lib/network-request.d.ts +4 -4
  45. package/core/lib/network-request.js +2 -2
  46. package/package.json +2 -2
  47. package/tsconfig.json +0 -11
  48. package/types/artifacts.d.ts +2 -2
  49. package/types/gatherer.d.ts +4 -5
  50. package/core/lib/lantern/BaseNode.d.ts +0 -163
  51. package/core/lib/lantern/BaseNode.js +0 -369
  52. package/core/lib/lantern/BaseNode.test.js +0 -385
  53. package/core/lib/lantern/CpuNode.d.ts +0 -43
  54. package/core/lib/lantern/CpuNode.js +0 -99
  55. package/core/lib/lantern/LanternError.d.ts +0 -8
  56. package/core/lib/lantern/LanternError.js +0 -9
  57. package/core/lib/lantern/Metric.d.ts +0 -69
  58. package/core/lib/lantern/Metric.js +0 -137
  59. package/core/lib/lantern/NetworkNode.d.ts +0 -49
  60. package/core/lib/lantern/NetworkNode.js +0 -136
  61. package/core/lib/lantern/PageDependencyGraph.d.ts +0 -82
  62. package/core/lib/lantern/PageDependencyGraph.js +0 -610
  63. package/core/lib/lantern/PageDependencyGraph.test.js +0 -654
  64. package/core/lib/lantern/TBTUtils.d.ts +0 -44
  65. package/core/lib/lantern/TBTUtils.js +0 -76
  66. package/core/lib/lantern/TBTUtils.test.d.ts +0 -2
  67. package/core/lib/lantern/TBTUtils.test.js +0 -130
  68. package/core/lib/lantern/TraceEngineComputationData.d.ts +0 -25
  69. package/core/lib/lantern/TraceEngineComputationData.js +0 -466
  70. package/core/lib/lantern/metrics/FirstContentfulPaint.d.ts +0 -79
  71. package/core/lib/lantern/metrics/FirstContentfulPaint.js +0 -198
  72. package/core/lib/lantern/metrics/FirstContentfulPaint.test.js +0 -54
  73. package/core/lib/lantern/metrics/Interactive.d.ts +0 -20
  74. package/core/lib/lantern/metrics/Interactive.js +0 -109
  75. package/core/lib/lantern/metrics/Interactive.test.js +0 -56
  76. package/core/lib/lantern/metrics/LargestContentfulPaint.d.ts +0 -19
  77. package/core/lib/lantern/metrics/LargestContentfulPaint.js +0 -105
  78. package/core/lib/lantern/metrics/LargestContentfulPaint.test.js +0 -42
  79. package/core/lib/lantern/metrics/MaxPotentialFID.d.ts +0 -24
  80. package/core/lib/lantern/metrics/MaxPotentialFID.js +0 -91
  81. package/core/lib/lantern/metrics/MetricTestUtils.d.ts +0 -19
  82. package/core/lib/lantern/metrics/MetricTestUtils.js +0 -48
  83. package/core/lib/lantern/metrics/SpeedIndex.d.ts +0 -32
  84. package/core/lib/lantern/metrics/SpeedIndex.js +0 -142
  85. package/core/lib/lantern/metrics/SpeedIndex.test.js +0 -83
  86. package/core/lib/lantern/metrics/TotalBlockingTime.d.ts +0 -25
  87. package/core/lib/lantern/metrics/TotalBlockingTime.js +0 -125
  88. package/core/lib/lantern/metrics/__snapshots__/FirstContentfulPaint.test.js.snap +0 -11
  89. package/core/lib/lantern/metrics/__snapshots__/Interactive.test.js.snap +0 -17
  90. package/core/lib/lantern/metrics/metrics.d.ts +0 -9
  91. package/core/lib/lantern/metrics/metrics.js +0 -16
  92. package/core/lib/lantern/simulation/ConnectionPool.d.ts +0 -48
  93. package/core/lib/lantern/simulation/ConnectionPool.js +0 -152
  94. package/core/lib/lantern/simulation/ConnectionPool.test.js +0 -195
  95. package/core/lib/lantern/simulation/Constants.d.ts +0 -52
  96. package/core/lib/lantern/simulation/Constants.js +0 -48
  97. package/core/lib/lantern/simulation/DNSCache.d.ts +0 -42
  98. package/core/lib/lantern/simulation/DNSCache.js +0 -74
  99. package/core/lib/lantern/simulation/DNSCache.test.js +0 -72
  100. package/core/lib/lantern/simulation/NetworkAnalyzer.d.ts +0 -209
  101. package/core/lib/lantern/simulation/NetworkAnalyzer.js +0 -597
  102. package/core/lib/lantern/simulation/NetworkAnalyzer.test.js +0 -475
  103. package/core/lib/lantern/simulation/SimulationTimingMap.d.ts +0 -153
  104. package/core/lib/lantern/simulation/SimulationTimingMap.js +0 -219
  105. package/core/lib/lantern/simulation/Simulator.d.ts +0 -157
  106. package/core/lib/lantern/simulation/Simulator.js +0 -593
  107. package/core/lib/lantern/simulation/Simulator.test.js +0 -434
  108. package/core/lib/lantern/simulation/TCPConnection.test.d.ts +0 -2
  109. package/core/lib/lantern/simulation/TCPConnection.test.js +0 -374
  110. package/core/lib/lantern/simulation/TcpConnection.d.ts +0 -89
  111. package/core/lib/lantern/simulation/TcpConnection.js +0 -230
  112. package/core/lib/lantern/simulation/simulation.d.ts +0 -21
  113. package/core/lib/lantern/simulation/simulation.js +0 -28
  114. package/core/lib/lantern/types/lantern.d.ts +0 -256
  115. package/core/lib/lantern/types/lantern.js +0 -7
@@ -1,5 +1,3 @@
1
- export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
2
- export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
3
1
  export type ByteEfficiencyProduct = {
4
2
  items: Array<LH.Audit.ByteEfficiencyItem>;
5
3
  wastedBytesByUrl?: Map<string, number> | undefined;
@@ -43,12 +41,12 @@ export class ByteEfficiencyAudit extends Audit {
43
41
  * Computes the estimated effect of all the byte savings on the provided graph.
44
42
  *
45
43
  * @param {Array<LH.Audit.ByteEfficiencyItem>} results The array of byte savings results per resource
46
- * @param {Node} graph
47
- * @param {Simulator} simulator
44
+ * @param {LH.Gatherer.Simulation.GraphNode} graph
45
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
48
46
  * @param {{label?: string, providedWastedBytesByUrl?: Map<string, number>}=} options
49
47
  * @return {{savings: number, simulationBeforeChanges: LH.Gatherer.Simulation.Result, simulationAfterChanges: LH.Gatherer.Simulation.Result}}
50
48
  */
51
- static computeWasteWithGraph(results: Array<LH.Audit.ByteEfficiencyItem>, graph: Node, simulator: Simulator, options?: {
49
+ static computeWasteWithGraph(results: Array<LH.Audit.ByteEfficiencyItem>, graph: LH.Gatherer.Simulation.GraphNode, simulator: LH.Gatherer.Simulation.Simulator, options?: {
52
50
  label?: string;
53
51
  providedWastedBytesByUrl?: Map<string, number>;
54
52
  } | undefined): {
@@ -58,12 +56,12 @@ export class ByteEfficiencyAudit extends Audit {
58
56
  };
59
57
  /**
60
58
  * @param {ByteEfficiencyProduct} result
61
- * @param {Simulator} simulator
59
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
62
60
  * @param {LH.Artifacts.MetricComputationDataInput} metricComputationInput
63
61
  * @param {LH.Audit.Context} context
64
62
  * @return {Promise<LH.Audit.Product>}
65
63
  */
66
- static createAuditProduct(result: ByteEfficiencyProduct, simulator: Simulator, metricComputationInput: LH.Artifacts.MetricComputationDataInput, context: LH.Audit.Context): Promise<LH.Audit.Product>;
64
+ static createAuditProduct(result: ByteEfficiencyProduct, simulator: LH.Gatherer.Simulation.Simulator, metricComputationInput: LH.Artifacts.MetricComputationDataInput, context: LH.Audit.Context): Promise<LH.Audit.Product>;
67
65
  /**
68
66
  * @param {LH.Artifacts} artifacts
69
67
  * @param {Array<LH.Artifacts.NetworkRequest>} networkRecords
@@ -14,9 +14,6 @@ import {LCPImageRecord} from '../../computed/lcp-image-record.js';
14
14
 
15
15
  const str_ = i18n.createIcuMessageFn(import.meta.url, {});
16
16
 
17
- /** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
18
- /** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
19
-
20
17
  // Parameters for log-normal distribution scoring. These values were determined by fitting the
21
18
  // log-normal cumulative distribution function curve to the former method of linear interpolation
22
19
  // scoring between the control points {average = 300 ms, poor = 750 ms, zero = 5000 ms} using the
@@ -96,8 +93,8 @@ class ByteEfficiencyAudit extends Audit {
96
93
  * Computes the estimated effect of all the byte savings on the provided graph.
97
94
  *
98
95
  * @param {Array<LH.Audit.ByteEfficiencyItem>} results The array of byte savings results per resource
99
- * @param {Node} graph
100
- * @param {Simulator} simulator
96
+ * @param {LH.Gatherer.Simulation.GraphNode} graph
97
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
101
98
  * @param {{label?: string, providedWastedBytesByUrl?: Map<string, number>}=} options
102
99
  * @return {{savings: number, simulationBeforeChanges: LH.Gatherer.Simulation.Result, simulationAfterChanges: LH.Gatherer.Simulation.Result}}
103
100
  */
@@ -151,7 +148,7 @@ class ByteEfficiencyAudit extends Audit {
151
148
 
152
149
  /**
153
150
  * @param {ByteEfficiencyProduct} result
154
- * @param {Simulator} simulator
151
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
155
152
  * @param {LH.Artifacts.MetricComputationDataInput} metricComputationInput
156
153
  * @param {LH.Audit.Context} context
157
154
  * @return {Promise<LH.Audit.Product>}
@@ -1,7 +1,4 @@
1
1
  export default RenderBlockingResources;
2
- export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
3
- export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
4
- export type NetworkNode = import('../../lib/lantern/NetworkNode.js').NetworkNode<LH.Artifacts.NetworkRequest>;
5
2
  declare class RenderBlockingResources extends Audit {
6
3
  /**
7
4
  * @param {LH.Artifacts} artifacts
@@ -27,14 +24,14 @@ declare class RenderBlockingResources extends Audit {
27
24
  * devs that they should be able to get to a reasonable first paint without JS, which is not a bad
28
25
  * thing.
29
26
  *
30
- * @param {Simulator} simulator
31
- * @param {Node} fcpGraph
27
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
28
+ * @param {LH.Gatherer.Simulation.GraphNode} fcpGraph
32
29
  * @param {Set<string>} deferredIds
33
30
  * @param {Map<string, number>} wastedCssBytesByUrl
34
31
  * @param {LH.Artifacts.DetectedStack[]} Stacks
35
32
  * @return {number}
36
33
  */
37
- static estimateSavingsWithGraphs(simulator: Simulator, fcpGraph: Node, deferredIds: Set<string>, wastedCssBytesByUrl: Map<string, number>, Stacks: LH.Artifacts.DetectedStack[]): number;
34
+ static estimateSavingsWithGraphs(simulator: LH.Gatherer.Simulation.Simulator, fcpGraph: LH.Gatherer.Simulation.GraphNode, deferredIds: Set<string>, wastedCssBytesByUrl: Map<string, number>, Stacks: LH.Artifacts.DetectedStack[]): number;
38
35
  /**
39
36
  * @param {LH.Artifacts} artifacts
40
37
  * @param {LH.Audit.Context} context
@@ -52,6 +49,5 @@ export namespace UIStrings {
52
49
  const title: string;
53
50
  const description: string;
54
51
  }
55
- import { NetworkRequest } from '../../lib/network-request.js';
56
52
  import { Audit } from '../audit.js';
57
53
  //# sourceMappingURL=render-blocking-resources.d.ts.map
@@ -8,10 +8,9 @@
8
8
  * @fileoverview Audit a page to see if it does have resources that are blocking first paint
9
9
  */
10
10
 
11
-
12
11
  import {Audit} from '../audit.js';
13
12
  import * as i18n from '../../lib/i18n/i18n.js';
14
- import {BaseNode} from '../../lib/lantern/lantern.js';
13
+ import * as Lantern from '../../lib/lantern/lantern.js';
15
14
  import {UnusedCSS} from '../../computed/unused-css.js';
16
15
  import {NetworkRequest} from '../../lib/network-request.js';
17
16
  import {LoadSimulator} from '../../computed/load-simulator.js';
@@ -19,11 +18,6 @@ import {FirstContentfulPaint} from '../../computed/metrics/first-contentful-pain
19
18
  import {LCPImageRecord} from '../../computed/lcp-image-record.js';
20
19
  import {NavigationInsights} from '../../computed/navigation-insights.js';
21
20
 
22
-
23
- /** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
24
- /** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
25
- /** @typedef {import('../../lib/lantern/NetworkNode.js').NetworkNode<LH.Artifacts.NetworkRequest>} NetworkNode */
26
-
27
21
  // Because of the way we detect blocking stylesheets, asynchronously loaded
28
22
  // CSS with link[rel=preload] and an onload handler (see https://github.com/filamentgroup/loadCSS)
29
23
  // can be falsely flagged as blocking. Therefore, ignore stylesheets that loaded fast enough
@@ -44,10 +38,10 @@ const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
44
38
  /**
45
39
  * Given a simulation's nodeTimings, return an object with the nodes/timing keyed by network URL
46
40
  * @param {LH.Gatherer.Simulation.Result['nodeTimings']} nodeTimings
47
- * @return {Map<string, {node: Node, nodeTiming: LH.Gatherer.Simulation.NodeTiming}>}
41
+ * @return {Map<string, {node: LH.Gatherer.Simulation.GraphNode, nodeTiming: LH.Gatherer.Simulation.NodeTiming}>}
48
42
  */
49
43
  function getNodesAndTimingByRequestId(nodeTimings) {
50
- /** @type {Map<string, {node: Node, nodeTiming: LH.Gatherer.Simulation.NodeTiming}>} */
44
+ /** @type {Map<string, {node: LH.Gatherer.Simulation.GraphNode, nodeTiming: LH.Gatherer.Simulation.NodeTiming}>} */
51
45
  const requestIdToNode = new Map();
52
46
 
53
47
  for (const [node, nodeTiming] of nodeTimings) {
@@ -61,8 +55,8 @@ function getNodesAndTimingByRequestId(nodeTimings) {
61
55
 
62
56
  /**
63
57
  * Adjust the timing of a node and its dependencies to account for stack specific overrides.
64
- * @param {Map<Node, LH.Gatherer.Simulation.NodeTiming>} adjustedNodeTimings
65
- * @param {Node} node
58
+ * @param {Map<LH.Gatherer.Simulation.GraphNode, LH.Gatherer.Simulation.NodeTiming>} adjustedNodeTimings
59
+ * @param {LH.Gatherer.Simulation.GraphNode} node
66
60
  * @param {LH.Artifacts.DetectedStack[]} Stacks
67
61
  */
68
62
  function adjustNodeTimings(adjustedNodeTimings, node, Stacks) {
@@ -83,7 +77,7 @@ function adjustNodeTimings(adjustedNodeTimings, node, Stacks) {
83
77
  * Any stack specific timing overrides should go in this function.
84
78
  * @see https://github.com/GoogleChrome/lighthouse/issues/2832#issuecomment-591066081
85
79
  *
86
- * @param {Node} node
80
+ * @param {LH.Gatherer.Simulation.GraphNode} node
87
81
  * @param {LH.Gatherer.Simulation.NodeTiming} nodeTiming
88
82
  * @param {LH.Artifacts.DetectedStack[]} Stacks
89
83
  */
@@ -93,7 +87,7 @@ function computeStackSpecificTiming(node, nodeTiming, Stacks) {
93
87
  // AMP will load a linked stylesheet asynchronously if it has not been loaded after 2.1 seconds:
94
88
  // https://github.com/ampproject/amphtml/blob/8e03ac2f315774070651584a7e046ff24212c9b1/src/font-stylesheet-timeout.js#L54-L59
95
89
  // Any potential savings must only include time spent on AMP stylesheet nodes before 2.1 seconds.
96
- if (node.type === BaseNode.TYPES.NETWORK &&
90
+ if (node.type === Lantern.Graph.BaseNode.types.NETWORK &&
97
91
  node.request.resourceType === NetworkRequest.TYPES.Stylesheet &&
98
92
  nodeTiming.endTime > 2100) {
99
93
  stackSpecificTiming.endTime = Math.max(nodeTiming.startTime, 2100);
@@ -208,8 +202,8 @@ class RenderBlockingResources extends Audit {
208
202
  * devs that they should be able to get to a reasonable first paint without JS, which is not a bad
209
203
  * thing.
210
204
  *
211
- * @param {Simulator} simulator
212
- * @param {Node} fcpGraph
205
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
206
+ * @param {LH.Gatherer.Simulation.GraphNode} fcpGraph
213
207
  * @param {Set<string>} deferredIds
214
208
  * @param {Map<string, number>} wastedCssBytesByUrl
215
209
  * @param {LH.Artifacts.DetectedStack[]} Stacks
@@ -225,7 +219,7 @@ class RenderBlockingResources extends Audit {
225
219
 
226
220
  // If a node can be deferred, exclude it from the new FCP graph
227
221
  const canDeferRequest = deferredIds.has(node.id);
228
- if (node.type !== BaseNode.TYPES.NETWORK) return !canDeferRequest;
222
+ if (node.type !== Lantern.Graph.BaseNode.types.NETWORK) return !canDeferRequest;
229
223
 
230
224
  const isStylesheet =
231
225
  node.request.resourceType === NetworkRequest.TYPES.Stylesheet;
@@ -1,19 +1,17 @@
1
1
  export default UsesHTTP2Audit;
2
- export type Simulator = import('../../lib/lantern/simulation/Simulator.js').Simulator;
3
- export type Node = import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>;
4
2
  declare class UsesHTTP2Audit extends Audit {
5
3
  /**
6
4
  * Computes the estimated effect of all results being converted to http/2 on the provided graph.
7
5
  *
8
6
  * @param {Array<{url: string}>} results
9
- * @param {Node} graph
10
- * @param {Simulator} simulator
7
+ * @param {LH.Gatherer.Simulation.GraphNode} graph
8
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
11
9
  * @param {{label?: string}=} options
12
10
  * @return {{savings: number, simulationBefore: LH.Gatherer.Simulation.Result, simulationAfter: LH.Gatherer.Simulation.Result}}
13
11
  */
14
12
  static computeWasteWithGraph(results: Array<{
15
13
  url: string;
16
- }>, graph: Node, simulator: Simulator, options?: {
14
+ }>, graph: LH.Gatherer.Simulation.GraphNode, simulator: LH.Gatherer.Simulation.Simulator, options?: {
17
15
  label?: string;
18
16
  } | undefined): {
19
17
  savings: number;
@@ -70,7 +68,7 @@ export namespace UIStrings {
70
68
  const displayValue: string;
71
69
  const columnProtocol: string;
72
70
  }
73
- import { NetworkRequest } from '../../lib/network-request.js';
74
71
  import { Audit } from '../audit.js';
72
+ import { NetworkRequest } from '../../lib/network-request.js';
75
73
  import { EntityClassification } from '../../computed/entity-classification.js';
76
74
  //# sourceMappingURL=uses-http2.d.ts.map
@@ -9,9 +9,6 @@
9
9
  * origin are over the http/2 protocol.
10
10
  */
11
11
 
12
- /** @typedef {import('../../lib/lantern/simulation/Simulator.js').Simulator} Simulator */
13
- /** @typedef {import('../../lib/lantern/BaseNode.js').Node<LH.Artifacts.NetworkRequest>} Node */
14
-
15
12
  import {Audit} from '../audit.js';
16
13
  import {EntityClassification} from '../../computed/entity-classification.js';
17
14
  import UrlUtils from '../../lib/url-utils.js';
@@ -69,8 +66,8 @@ class UsesHTTP2Audit extends Audit {
69
66
  * Computes the estimated effect of all results being converted to http/2 on the provided graph.
70
67
  *
71
68
  * @param {Array<{url: string}>} results
72
- * @param {Node} graph
73
- * @param {Simulator} simulator
69
+ * @param {LH.Gatherer.Simulation.GraphNode} graph
70
+ * @param {LH.Gatherer.Simulation.Simulator} simulator
74
71
  * @param {{label?: string}=} options
75
72
  * @return {{savings: number, simulationBefore: LH.Gatherer.Simulation.Result, simulationAfter: LH.Gatherer.Simulation.Result}}
76
73
  */
@@ -25,11 +25,11 @@ declare class LongTasks extends Audit {
25
25
  * most time will be attributed to 'other' (the category of the top-level
26
26
  * RunTask). See pruning in `PageDependencyGraph.linkCPUNodes`.
27
27
  * @param {LH.Artifacts.TaskNode} task
28
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
28
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
29
29
  * @param {Map<TaskGroupIds, number>} [timeByTaskGroup]
30
30
  * @return {{startTime: number, duration: number, timeByTaskGroup: Map<TaskGroupIds, number>}}
31
31
  */
32
- static getTimingBreakdown(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined, timeByTaskGroup?: Map<import("../lib/tracehouse/task-groups.js").TaskGroupIds, number> | undefined): {
32
+ static getTimingBreakdown(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined, timeByTaskGroup?: Map<import("../lib/tracehouse/task-groups.js").TaskGroupIds, number> | undefined): {
33
33
  startTime: number;
34
34
  duration: number;
35
35
  timeByTaskGroup: Map<TaskGroupIds, number>;
@@ -37,17 +37,17 @@ declare class LongTasks extends Audit {
37
37
  /**
38
38
  * @param {Array<LH.Artifacts.TaskNode>} longTasks
39
39
  * @param {Set<string>} jsUrls
40
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
40
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
41
41
  * @return {LH.Audit.Details.DebugData}
42
42
  */
43
- static makeDebugData(longTasks: Array<LH.Artifacts.TaskNode>, jsUrls: Set<string>, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): LH.Audit.Details.DebugData;
43
+ static makeDebugData(longTasks: Array<LH.Artifacts.TaskNode>, jsUrls: Set<string>, taskTimingsByEvent: Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): LH.Audit.Details.DebugData;
44
44
  /**
45
45
  * Get timing from task, overridden by taskTimingsByEvent if provided.
46
46
  * @param {LH.Artifacts.TaskNode} task
47
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
47
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
48
48
  * @return {Timing}
49
49
  */
50
- static getTiming(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): Timing;
50
+ static getTiming(task: LH.Artifacts.TaskNode, taskTimingsByEvent: Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming> | undefined): Timing;
51
51
  /**
52
52
  * @param {LH.Artifacts} artifacts
53
53
  * @param {LH.Audit.Context} context
@@ -86,7 +86,7 @@ class LongTasks extends Audit {
86
86
  * most time will be attributed to 'other' (the category of the top-level
87
87
  * RunTask). See pruning in `PageDependencyGraph.linkCPUNodes`.
88
88
  * @param {LH.Artifacts.TaskNode} task
89
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
89
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
90
90
  * @param {Map<TaskGroupIds, number>} [timeByTaskGroup]
91
91
  * @return {{startTime: number, duration: number, timeByTaskGroup: Map<TaskGroupIds, number>}}
92
92
  */
@@ -117,7 +117,7 @@ class LongTasks extends Audit {
117
117
  /**
118
118
  * @param {Array<LH.Artifacts.TaskNode>} longTasks
119
119
  * @param {Set<string>} jsUrls
120
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
120
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
121
121
  * @return {LH.Audit.Details.DebugData}
122
122
  */
123
123
  static makeDebugData(longTasks, jsUrls, taskTimingsByEvent) {
@@ -155,7 +155,7 @@ class LongTasks extends Audit {
155
155
  /**
156
156
  * Get timing from task, overridden by taskTimingsByEvent if provided.
157
157
  * @param {LH.Artifacts.TaskNode} task
158
- * @param {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
158
+ * @param {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} taskTimingsByEvent
159
159
  * @return {Timing}
160
160
  */
161
161
  static getTiming(task, taskTimingsByEvent) {
@@ -185,7 +185,7 @@ class LongTasks extends Audit {
185
185
  const metricComputationData = Audit.makeMetricComputationDataInput(artifacts, context);
186
186
  const tbtResult = await TotalBlockingTime.request(metricComputationData, context);
187
187
 
188
- /** @type {Map<Lantern.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} */
188
+ /** @type {Map<Lantern.Types.TraceEvent, LH.Gatherer.Simulation.NodeTiming>|undefined} */
189
189
  let taskTimingsByEvent;
190
190
 
191
191
  if (settings.throttlingMethod === 'simulate') {
@@ -39,7 +39,7 @@ declare class PrioritizeLcpImage extends Audit {
39
39
  * @return {{lcpNodeToPreload?: LH.Gatherer.Simulation.GraphNetworkNode, initiatorPath?: InitiatorPath}}
40
40
  */
41
41
  static getLCPNodeToPreload(mainResource: LH.Artifacts.NetworkRequest, graph: LH.Gatherer.Simulation.GraphNode, lcpRecord: NetworkRequest | undefined): {
42
- lcpNodeToPreload?: import("../lib/lantern/NetworkNode.js").NetworkNode<NetworkRequest> | undefined;
42
+ lcpNodeToPreload?: import("../../types/gatherer.js").default.Simulation.GraphNetworkNode | undefined;
43
43
  initiatorPath?: InitiatorPath | undefined;
44
44
  };
45
45
  /**
@@ -20,12 +20,12 @@ declare class UsesRelPreloadAudit extends Audit {
20
20
  * Critical requests deeper than depth 2 are more likely to be a case-by-case basis such that it
21
21
  * would be a little risky to recommend blindly.
22
22
  *
23
- * @param {LH.Artifacts.NetworkRequest} request
24
- * @param {LH.Artifacts.NetworkRequest} mainResource
23
+ * @param {Lantern.Types.NetworkRequest} request
24
+ * @param {Lantern.Types.NetworkRequest} mainResource
25
25
  * @param {Array<LH.Gatherer.Simulation.GraphNode>} initiatorPath
26
26
  * @return {boolean}
27
27
  */
28
- static shouldPreloadRequest(request: LH.Artifacts.NetworkRequest, mainResource: LH.Artifacts.NetworkRequest, initiatorPath: Array<LH.Gatherer.Simulation.GraphNode>): boolean;
28
+ static shouldPreloadRequest(request: Lantern.Types.NetworkRequest, mainResource: Lantern.Types.NetworkRequest, initiatorPath: Array<LH.Gatherer.Simulation.GraphNode>): boolean;
29
29
  /**
30
30
  * Computes the estimated effect of preloading all the resources.
31
31
  * @param {Set<string>} urls The array of byte savings results per resource
@@ -54,4 +54,5 @@ export namespace UIStrings {
54
54
  }
55
55
  import { Audit } from './audit.js';
56
56
  import { NetworkRequest } from '../lib/network-request.js';
57
+ import * as Lantern from '../lib/lantern/lantern.js';
57
58
  //# sourceMappingURL=uses-rel-preload.d.ts.map
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import * as Lantern from '../lib/lantern/lantern.js';
7
8
  import UrlUtils from '../lib/url-utils.js';
8
9
  import {NetworkRequest} from '../lib/network-request.js';
9
10
  import {Audit} from './audit.js';
@@ -61,8 +62,8 @@ class UsesRelPreloadAudit extends Audit {
61
62
  if (node.type !== 'network') return;
62
63
  // Don't include the node itself or any CPU nodes in the initiatorPath
63
64
  const path = traversalPath.slice(1).filter(initiator => initiator.type === 'network');
64
- if (!UsesRelPreloadAudit.shouldPreloadRequest(node.rawRequest, mainResource, path)) return;
65
- urls.add(node.rawRequest.url);
65
+ if (!UsesRelPreloadAudit.shouldPreloadRequest(node.request, mainResource, path)) return;
66
+ urls.add(node.request.url);
66
67
  });
67
68
 
68
69
  return urls;
@@ -75,6 +76,7 @@ class UsesRelPreloadAudit extends Audit {
75
76
  * @return {Set<string>}
76
77
  */
77
78
  static getURLsFailedToPreload(graph) {
79
+ // TODO: add `fromPrefetchCache` to Lantern.Types.NetworkRequest, then use node.request here instead of rawRequest.
78
80
  /** @type {Array<LH.Artifacts.NetworkRequest>} */
79
81
  const requests = [];
80
82
  graph.traverse(node => node.type === 'network' && requests.push(node.rawRequest));
@@ -109,8 +111,8 @@ class UsesRelPreloadAudit extends Audit {
109
111
  * Critical requests deeper than depth 2 are more likely to be a case-by-case basis such that it
110
112
  * would be a little risky to recommend blindly.
111
113
  *
112
- * @param {LH.Artifacts.NetworkRequest} request
113
- * @param {LH.Artifacts.NetworkRequest} mainResource
114
+ * @param {Lantern.Types.NetworkRequest} request
115
+ * @param {Lantern.Types.NetworkRequest} mainResource
114
116
  * @param {Array<LH.Gatherer.Simulation.GraphNode>} initiatorPath
115
117
  * @return {boolean}
116
118
  */
@@ -157,7 +159,7 @@ class UsesRelPreloadAudit extends Audit {
157
159
 
158
160
  if (node.isMainDocument()) {
159
161
  mainDocumentNode = node;
160
- } else if (node.rawRequest && urls.has(node.rawRequest.url)) {
162
+ } else if (node.request && urls.has(node.request.url)) {
161
163
  nodesToPreload.push(node);
162
164
  }
163
165
  });
@@ -189,7 +191,7 @@ class UsesRelPreloadAudit extends Audit {
189
191
 
190
192
  const wastedMs = Math.round(timingBefore.endTime - timingAfter.endTime);
191
193
  if (wastedMs < THRESHOLD_IN_MS) continue;
192
- results.push({url: node.rawRequest.url, wastedMs});
194
+ results.push({url: node.request.url, wastedMs});
193
195
  }
194
196
 
195
197
  if (!results.length) {
@@ -13,11 +13,11 @@ declare class CriticalRequestChains {
13
13
  * For now, we use network priorities as a proxy for "render-blocking"/critical-ness.
14
14
  * It's imperfect, but there is not a higher-fidelity signal available yet.
15
15
  * @see https://docs.google.com/document/d/1bCDuq9H1ih9iNjgzyAL0gpwNFiEP4TZS-YLRp_RuMlc
16
- * @param {LH.Artifacts.NetworkRequest} request
17
- * @param {LH.Artifacts.NetworkRequest} mainResource
16
+ * @param {Lantern.Types.NetworkRequest} request
17
+ * @param {Lantern.Types.NetworkRequest} mainResource
18
18
  * @return {boolean}
19
19
  */
20
- static isCritical(request: LH.Artifacts.NetworkRequest, mainResource: LH.Artifacts.NetworkRequest): boolean;
20
+ static isCritical(request: Lantern.Types.NetworkRequest, mainResource: Lantern.Types.NetworkRequest): boolean;
21
21
  /**
22
22
  * Create a tree of critical requests.
23
23
  * @param {LH.Artifacts.NetworkRequest} mainResource
@@ -36,5 +36,6 @@ declare class CriticalRequestChains {
36
36
  trace: LH.Trace;
37
37
  }, context: LH.Artifacts.ComputedContext): Promise<LH.Artifacts.CriticalRequestNode>;
38
38
  }
39
+ import * as Lantern from '../lib/lantern/lantern.js';
39
40
  import { NetworkRequest } from '../lib/network-request.js';
40
41
  //# sourceMappingURL=critical-request-chains.d.ts.map
@@ -4,6 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ import * as Lantern from '../lib/lantern/lantern.js';
7
8
  import {makeComputedArtifact} from './computed-artifact.js';
8
9
  import {NetworkRequest} from '../lib/network-request.js';
9
10
  import {MainResource} from './main-resource.js';
@@ -14,8 +15,8 @@ class CriticalRequestChains {
14
15
  * For now, we use network priorities as a proxy for "render-blocking"/critical-ness.
15
16
  * It's imperfect, but there is not a higher-fidelity signal available yet.
16
17
  * @see https://docs.google.com/document/d/1bCDuq9H1ih9iNjgzyAL0gpwNFiEP4TZS-YLRp_RuMlc
17
- * @param {LH.Artifacts.NetworkRequest} request
18
- * @param {LH.Artifacts.NetworkRequest} mainResource
18
+ * @param {Lantern.Types.NetworkRequest} request
19
+ * @param {Lantern.Types.NetworkRequest} mainResource
19
20
  * @return {boolean}
20
21
  */
21
22
  static isCritical(request, mainResource) {
@@ -105,7 +106,7 @@ class CriticalRequestChains {
105
106
  graph.traverse((node, traversalPath) => {
106
107
  seenNodes.add(node);
107
108
  if (node.type !== 'network') return;
108
- if (!CriticalRequestChains.isCritical(node.rawRequest, mainResource)) return;
109
+ if (!CriticalRequestChains.isCritical(node.request, mainResource)) return;
109
110
 
110
111
  const networkPath = traversalPath
111
112
  .filter(/** @return {n is LH.Gatherer.Simulation.GraphNetworkNode} */
@@ -117,7 +118,7 @@ class CriticalRequestChains {
117
118
  if (networkPath.some(r => !CriticalRequestChains.isCritical(r, mainResource))) return;
118
119
 
119
120
  // Ignore non-network things (like data urls).
120
- if (NetworkRequest.isNonNetworkRequest(node.rawRequest)) return;
121
+ if (NetworkRequest.isNonNetworkRequest(node.request)) return;
121
122
 
122
123
  addChain(networkPath);
123
124
  }, getNextNodes);
@@ -42,7 +42,7 @@ class DocumentUrls {
42
42
  if (!requestedUrl || !mainDocumentUrl) throw new Error('No main frame navigations found');
43
43
 
44
44
  const initialRequest =
45
- Lantern.Simulation.NetworkAnalyzer.findResourceForUrl(networkRecords, requestedUrl);
45
+ Lantern.Core.NetworkAnalyzer.findResourceForUrl(networkRecords, requestedUrl);
46
46
  if (initialRequest?.redirects?.length) requestedUrl = initialRequest.redirects[0].url;
47
47
 
48
48
  return {requestedUrl, mainDocumentUrl};
@@ -5,24 +5,23 @@ declare const LoadSimulatorComputed: typeof LoadSimulator & {
5
5
  settings: LH.Audit.Context['settings'];
6
6
  }, context: import("../../types/utility-types.js").default.ImmutableObject<{
7
7
  computedCache: Map<string, import("../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
8
- }>) => Promise<Lantern.Simulation.Simulator<any>>;
8
+ }>) => Promise<import("../../types/gatherer.js").default.Simulation.Simulator>;
9
9
  };
10
10
  declare class LoadSimulator {
11
11
  /**
12
12
  * @param {{devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings']}} data
13
13
  * @param {LH.Artifacts.ComputedContext} context
14
- * @return {Promise<Lantern.Simulation.Simulator>}
14
+ * @return {Promise<LH.Gatherer.Simulation.Simulator>}
15
15
  */
16
16
  static compute_(data: {
17
17
  devtoolsLog: import("../index.js").DevtoolsLog;
18
18
  settings: LH.Audit.Context['settings'];
19
- }, context: LH.Artifacts.ComputedContext): Promise<Lantern.Simulation.Simulator>;
19
+ }, context: LH.Artifacts.ComputedContext): Promise<LH.Gatherer.Simulation.Simulator>;
20
20
  /**
21
21
  * @param {LH.Artifacts.NetworkAnalysis} networkAnalysis
22
22
  * @return {LH.PrecomputedLanternData}
23
23
  */
24
24
  static convertAnalysisToSaveableLanternData(networkAnalysis: LH.Artifacts.NetworkAnalysis): LH.PrecomputedLanternData;
25
25
  }
26
- import * as Lantern from '../lib/lantern/lantern.js';
27
26
  import { NetworkAnalysis } from './network-analysis.js';
28
27
  //# sourceMappingURL=load-simulator.d.ts.map
@@ -12,7 +12,7 @@ class LoadSimulator {
12
12
  /**
13
13
  * @param {{devtoolsLog: LH.DevtoolsLog, settings: LH.Audit.Context['settings']}} data
14
14
  * @param {LH.Artifacts.ComputedContext} context
15
- * @return {Promise<Lantern.Simulation.Simulator>}
15
+ * @return {Promise<LH.Gatherer.Simulation.Simulator>}
16
16
  */
17
17
  static async compute_(data, context) {
18
18
  const networkAnalysis = await NetworkAnalysis.request(data.devtoolsLog, context);
@@ -29,7 +29,7 @@ class MainResource {
29
29
  // would have evicted the first request by the time `MainDocumentRequest` (a consumer
30
30
  // of this computed artifact) attempts to fetch the contents, resulting in a protocol error.
31
31
  const mainResource =
32
- Lantern.Simulation.NetworkAnalyzer.findLastDocumentForUrl(records, mainDocumentUrl);
32
+ Lantern.Core.NetworkAnalyzer.findLastDocumentForUrl(records, mainDocumentUrl);
33
33
  if (!mainResource) {
34
34
  throw new Error('Unable to identify the main resource');
35
35
  }
@@ -1,19 +1,17 @@
1
1
  export { LanternFirstContentfulPaintComputed as LanternFirstContentfulPaint };
2
- export type Extras = import('../../lib/lantern/Metric.js').Extras;
3
2
  declare const LanternFirstContentfulPaintComputed: typeof LanternFirstContentfulPaint & {
4
3
  request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
5
4
  computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
6
5
  }>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
7
6
  };
8
- /** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
9
7
  declare class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
10
8
  /**
11
9
  * @param {LH.Artifacts.MetricComputationDataInput} data
12
10
  * @param {LH.Artifacts.ComputedContext} context
13
- * @param {Omit<Extras, 'optimistic'>=} extras
11
+ * @param {Omit<Lantern.Metrics.Extras, 'optimistic'>=} extras
14
12
  * @return {Promise<LH.Artifacts.LanternMetric>}
15
13
  */
16
- static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
14
+ static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Lantern.Metrics.Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
17
15
  /**
18
16
  * @param {LH.Artifacts.MetricComputationDataInput} data
19
17
  * @param {LH.Artifacts.ComputedContext} context
@@ -8,13 +8,11 @@ import * as Lantern from '../../lib/lantern/lantern.js';
8
8
  import {makeComputedArtifact} from '../computed-artifact.js';
9
9
  import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
10
10
 
11
- /** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
12
-
13
11
  class LanternFirstContentfulPaint extends Lantern.Metrics.FirstContentfulPaint {
14
12
  /**
15
13
  * @param {LH.Artifacts.MetricComputationDataInput} data
16
14
  * @param {LH.Artifacts.ComputedContext} context
17
- * @param {Omit<Extras, 'optimistic'>=} extras
15
+ * @param {Omit<Lantern.Metrics.Extras, 'optimistic'>=} extras
18
16
  * @return {Promise<LH.Artifacts.LanternMetric>}
19
17
  */
20
18
  static async computeMetricWithGraphs(data, context, extras) {
@@ -1,19 +1,17 @@
1
1
  export { LanternInteractiveComputed as LanternInteractive };
2
- export type Extras = import('../../lib/lantern/Metric.js').Extras;
3
2
  declare const LanternInteractiveComputed: typeof LanternInteractive & {
4
3
  request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
5
4
  computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
6
5
  }>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
7
6
  };
8
- /** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
9
7
  declare class LanternInteractive extends Lantern.Metrics.Interactive {
10
8
  /**
11
9
  * @param {LH.Artifacts.MetricComputationDataInput} data
12
10
  * @param {LH.Artifacts.ComputedContext} context
13
- * @param {Omit<Extras, 'optimistic'>=} extras
11
+ * @param {Omit<Lantern.Metrics.Extras, 'optimistic'>=} extras
14
12
  * @return {Promise<LH.Artifacts.LanternMetric>}
15
13
  */
16
- static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
14
+ static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Lantern.Metrics.Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
17
15
  /**
18
16
  * @param {LH.Artifacts.MetricComputationDataInput} data
19
17
  * @param {LH.Artifacts.ComputedContext} context
@@ -9,13 +9,11 @@ import {makeComputedArtifact} from '../computed-artifact.js';
9
9
  import {LanternLargestContentfulPaint} from './lantern-largest-contentful-paint.js';
10
10
  import {getComputationDataParams, lanternErrorAdapter} from './lantern-metric.js';
11
11
 
12
- /** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
13
-
14
12
  class LanternInteractive extends Lantern.Metrics.Interactive {
15
13
  /**
16
14
  * @param {LH.Artifacts.MetricComputationDataInput} data
17
15
  * @param {LH.Artifacts.ComputedContext} context
18
- * @param {Omit<Extras, 'optimistic'>=} extras
16
+ * @param {Omit<Lantern.Metrics.Extras, 'optimistic'>=} extras
19
17
  * @return {Promise<LH.Artifacts.LanternMetric>}
20
18
  */
21
19
  static async computeMetricWithGraphs(data, context, extras) {
@@ -1,19 +1,17 @@
1
1
  export { LanternLargestContentfulPaintComputed as LanternLargestContentfulPaint };
2
- export type Extras = import('../../lib/lantern/Metric.js').Extras;
3
2
  declare const LanternLargestContentfulPaintComputed: typeof LanternLargestContentfulPaint & {
4
3
  request: (dependencies: import("../../index.js").Artifacts.MetricComputationDataInput, context: import("../../../types/utility-types.js").default.ImmutableObject<{
5
4
  computedCache: Map<string, import("../../lib/arbitrary-equality-map.js").ArbitraryEqualityMap>;
6
5
  }>) => Promise<import("../../index.js").Artifacts.LanternMetric>;
7
6
  };
8
- /** @typedef {import('../../lib/lantern/Metric.js').Extras} Extras */
9
7
  declare class LanternLargestContentfulPaint extends Lantern.Metrics.LargestContentfulPaint {
10
8
  /**
11
9
  * @param {LH.Artifacts.MetricComputationDataInput} data
12
10
  * @param {LH.Artifacts.ComputedContext} context
13
- * @param {Omit<Extras, 'optimistic'>=} extras
11
+ * @param {Omit<Lantern.Metrics.Extras, 'optimistic'>=} extras
14
12
  * @return {Promise<LH.Artifacts.LanternMetric>}
15
13
  */
16
- static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
14
+ static computeMetricWithGraphs(data: LH.Artifacts.MetricComputationDataInput, context: LH.Artifacts.ComputedContext, extras?: Omit<Lantern.Metrics.Extras, 'optimistic'> | undefined): Promise<LH.Artifacts.LanternMetric>;
17
15
  /**
18
16
  * @param {LH.Artifacts.MetricComputationDataInput} data
19
17
  * @param {LH.Artifacts.ComputedContext} context