chrome-devtools-frontend 1.0.946351 → 1.0.948359

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 (217) hide show
  1. package/.eslintrc.js +1 -0
  2. package/config/gni/all_devtools_files.gni +1 -15
  3. package/config/gni/devtools_grd_files.gni +9 -15
  4. package/config/gni/devtools_image_files.gni +1 -0
  5. package/front_end/.eslintrc.js +6 -1
  6. package/front_end/Images/src/circled_backslash_icon.svg +3 -0
  7. package/front_end/core/host/InspectorFrontendHost.ts +0 -3
  8. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  9. package/front_end/core/host/UserMetrics.ts +1 -22
  10. package/front_end/core/i18n/locales/en-US.json +38 -29
  11. package/front_end/core/i18n/locales/en-XL.json +38 -29
  12. package/front_end/core/platform/platform.ts +0 -2
  13. package/front_end/core/platform/string-utilities.ts +14 -1
  14. package/front_end/core/platform/utilities.ts +0 -29
  15. package/front_end/core/root/Runtime.ts +4 -211
  16. package/front_end/core/sdk/AccessibilityModel.ts +0 -2
  17. package/front_end/core/sdk/CSSProperty.ts +0 -2
  18. package/front_end/core/sdk/CSSRule.ts +0 -2
  19. package/front_end/core/sdk/Cookie.ts +0 -25
  20. package/front_end/core/sdk/EmulationModel.ts +0 -2
  21. package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
  22. package/front_end/core/sdk/NetworkManager.ts +0 -3
  23. package/front_end/core/sdk/Resource.ts +0 -3
  24. package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
  25. package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
  26. package/front_end/core/sdk/sdk-legacy.ts +0 -3
  27. package/front_end/devtools_compatibility.js +1 -1
  28. package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -2
  29. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
  30. package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
  31. package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
  32. package/front_end/entrypoints/main/MainImpl.ts +0 -1
  33. package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +0 -2
  34. package/front_end/entrypoints/{node_main → node_app}/NodeConnectionsPanel.ts +1 -1
  35. package/front_end/entrypoints/{node_main → node_app}/NodeMain.ts +2 -4
  36. package/front_end/entrypoints/{node_main → node_app}/nodeConnectionsPanel.css +0 -0
  37. package/front_end/entrypoints/node_app/node_app.ts +79 -0
  38. package/front_end/entrypoints/shell/{shell.js → shell.ts} +0 -2
  39. package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +3 -2
  40. package/front_end/generated/InspectorBackendCommands.js +5 -1
  41. package/front_end/generated/protocol.d.ts +12 -0
  42. package/front_end/legacy/legacy-defs.d.ts +0 -4
  43. package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
  44. package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
  45. package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
  46. package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
  47. package/front_end/models/emulation/DeviceModeModel.ts +0 -2
  48. package/front_end/models/issues_manager/CorsIssue.ts +17 -9
  49. package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
  50. package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
  51. package/front_end/panels/animation/AnimationTimeline.ts +0 -2
  52. package/front_end/panels/animation/AnimationUI.ts +0 -2
  53. package/front_end/panels/application/BackForwardCacheStrings.ts +2 -5
  54. package/front_end/panels/application/BackForwardCacheView.ts +150 -58
  55. package/front_end/panels/application/ResourcesPanel.ts +0 -42
  56. package/front_end/panels/application/application-legacy.ts +0 -3
  57. package/front_end/panels/application/application-meta.ts +0 -13
  58. package/front_end/panels/application/backForwardCacheView.css +44 -6
  59. package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
  60. package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
  61. package/front_end/panels/application/components/StackTrace.ts +1 -1
  62. package/front_end/panels/coverage/CoverageView.ts +1 -1
  63. package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
  64. package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
  65. package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
  66. package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
  67. package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
  68. package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
  69. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -11
  70. package/front_end/panels/elements/ElementsPanel.ts +9 -1
  71. package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
  72. package/front_end/panels/elements/StylesSidebarPane.ts +0 -1
  73. package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
  74. package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -16
  75. package/front_end/panels/issues/CorsIssueDetailsView.ts +18 -2
  76. package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
  77. package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
  78. package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
  79. package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
  80. package/front_end/panels/search/SearchView.ts +24 -4
  81. package/front_end/panels/settings/components/SyncSection.ts +2 -2
  82. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +46 -46
  83. package/front_end/panels/sources/CSSPlugin.ts +3 -0
  84. package/front_end/panels/sources/CoveragePlugin.ts +2 -0
  85. package/front_end/panels/sources/DebuggerPlugin.ts +29 -5
  86. package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
  87. package/front_end/panels/sources/ProfilePlugin.ts +3 -0
  88. package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
  89. package/front_end/panels/timeline/TimelineTreeView.ts +3 -1
  90. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  91. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  92. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  93. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  94. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  95. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  96. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  97. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  98. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  99. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1486 -1423
  100. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  101. package/front_end/third_party/codemirror.next/package.json +10 -9
  102. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
  103. package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
  104. package/front_end/third_party/lighthouse/locales/ar.json +0 -3
  105. package/front_end/third_party/lighthouse/locales/bg.json +17 -20
  106. package/front_end/third_party/lighthouse/locales/ca.json +0 -3
  107. package/front_end/third_party/lighthouse/locales/cs.json +0 -3
  108. package/front_end/third_party/lighthouse/locales/da.json +16 -19
  109. package/front_end/third_party/lighthouse/locales/de.json +0 -3
  110. package/front_end/third_party/lighthouse/locales/el.json +0 -3
  111. package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
  112. package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
  113. package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
  114. package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
  115. package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
  116. package/front_end/third_party/lighthouse/locales/es.json +0 -3
  117. package/front_end/third_party/lighthouse/locales/fi.json +16 -19
  118. package/front_end/third_party/lighthouse/locales/fil.json +33 -36
  119. package/front_end/third_party/lighthouse/locales/fr.json +16 -19
  120. package/front_end/third_party/lighthouse/locales/he.json +16 -19
  121. package/front_end/third_party/lighthouse/locales/hi.json +0 -3
  122. package/front_end/third_party/lighthouse/locales/hr.json +16 -19
  123. package/front_end/third_party/lighthouse/locales/hu.json +16 -19
  124. package/front_end/third_party/lighthouse/locales/id.json +16 -19
  125. package/front_end/third_party/lighthouse/locales/it.json +37 -40
  126. package/front_end/third_party/lighthouse/locales/ja.json +16 -19
  127. package/front_end/third_party/lighthouse/locales/ko.json +16 -19
  128. package/front_end/third_party/lighthouse/locales/lt.json +17 -20
  129. package/front_end/third_party/lighthouse/locales/lv.json +0 -3
  130. package/front_end/third_party/lighthouse/locales/nl.json +16 -19
  131. package/front_end/third_party/lighthouse/locales/no.json +17 -20
  132. package/front_end/third_party/lighthouse/locales/pl.json +16 -19
  133. package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
  134. package/front_end/third_party/lighthouse/locales/pt.json +16 -19
  135. package/front_end/third_party/lighthouse/locales/ro.json +0 -3
  136. package/front_end/third_party/lighthouse/locales/ru.json +16 -19
  137. package/front_end/third_party/lighthouse/locales/sk.json +0 -3
  138. package/front_end/third_party/lighthouse/locales/sl.json +0 -3
  139. package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
  140. package/front_end/third_party/lighthouse/locales/sr.json +16 -19
  141. package/front_end/third_party/lighthouse/locales/sv.json +17 -20
  142. package/front_end/third_party/lighthouse/locales/ta.json +0 -3
  143. package/front_end/third_party/lighthouse/locales/te.json +0 -3
  144. package/front_end/third_party/lighthouse/locales/th.json +0 -3
  145. package/front_end/third_party/lighthouse/locales/tr.json +0 -3
  146. package/front_end/third_party/lighthouse/locales/uk.json +17 -20
  147. package/front_end/third_party/lighthouse/locales/vi.json +0 -3
  148. package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
  149. package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
  150. package/front_end/third_party/lighthouse/locales/zh.json +0 -3
  151. package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
  152. package/front_end/third_party/lighthouse/report/bundle.js +36 -7
  153. package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
  154. package/front_end/ui/components/diff_view/DiffView.ts +4 -4
  155. package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
  156. package/front_end/ui/components/helpers/helpers.ts +0 -2
  157. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  158. package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
  159. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
  160. package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
  161. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
  162. package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
  163. package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
  164. package/front_end/ui/components/report_view/ReportView.ts +22 -0
  165. package/front_end/ui/components/report_view/reportSection.css +20 -0
  166. package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
  167. package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
  168. package/front_end/ui/components/text_editor/config.ts +9 -7
  169. package/front_end/ui/components/text_editor/javascript.ts +15 -11
  170. package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
  171. package/front_end/ui/legacy/GlassPane.ts +1 -1
  172. package/front_end/ui/legacy/InspectorView.ts +10 -0
  173. package/front_end/ui/legacy/SearchableView.ts +2 -1
  174. package/front_end/ui/legacy/Treeoutline.ts +1 -1
  175. package/front_end/ui/legacy/Widget.ts +1 -1
  176. package/front_end/ui/legacy/XWidget.ts +0 -5
  177. package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
  178. package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
  179. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -32
  180. package/front_end/ui/legacy/themeColors.css +1 -1
  181. package/front_end/ui/legacy/utils/append-style.ts +2 -13
  182. package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
  183. package/inspector_overlay/main.ts +2 -12
  184. package/package.json +2 -4
  185. package/scripts/build/build_inspector_overlay.py +15 -1
  186. package/scripts/build/rjsmin.py +84 -115
  187. package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
  188. package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +101 -0
  189. package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
  190. package/scripts/eslint_rules/tests/.eslintrc.js +14 -0
  191. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
  192. package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
  193. package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
  194. package/front_end/entrypoints/devtools_app/devtools_app.js +0 -11
  195. package/front_end/entrypoints/devtools_app/devtools_app.json +0 -5
  196. package/front_end/entrypoints/inspector/inspector.json +0 -4
  197. package/front_end/entrypoints/js_app/js_app.js +0 -12
  198. package/front_end/entrypoints/js_app/js_app.json +0 -3
  199. package/front_end/entrypoints/ndb_app/ndb_app.json +0 -4
  200. package/front_end/entrypoints/node_app/node_app-meta.ts +0 -43
  201. package/front_end/entrypoints/node_app/node_app.js +0 -16
  202. package/front_end/entrypoints/node_app/node_app.json +0 -3
  203. package/front_end/entrypoints/node_main/node_main-meta.ts +0 -48
  204. package/front_end/entrypoints/node_main/node_main.ts +0 -11
  205. package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
  206. package/front_end/entrypoints/startup/startup.ts +0 -9
  207. package/front_end/entrypoints/worker_app/worker_app.json +0 -3
  208. package/front_end/panels/lighthouse/module.json +0 -6
  209. package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
  210. package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
  211. package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
  212. package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
  213. package/scripts/build/build_release_applications.py +0 -216
  214. package/scripts/build/modular_build.py +0 -184
  215. package/scripts/check_gn.js +0 -119
  216. package/scripts/json_validator/module.schema.json +0 -19
  217. package/scripts/json_validator/validate_module_json.js +0 -44
@@ -3,7 +3,7 @@ export type ComponentName = '3pFilter' | 'audit' | 'categoryHeader' | 'chevron'
3
3
  export type I18n<T> = any;
4
4
  export type DetailsRenderer = any;
5
5
  export type CRCSegment = {
6
- node: any;
6
+ node: LH.Audit.Details.SimpleCriticalRequestNode;
7
7
  isLastChild: boolean;
8
8
  hasChildren: boolean;
9
9
  startTime: number;
@@ -53,7 +53,7 @@ export class DOM {
53
53
  * @param {string=} className
54
54
  * @return {HTMLElementByTagName[T]}
55
55
  */
56
- createElement<T extends string>(name: T, className?: string | undefined): any;
56
+ createElement<T extends string>(name: T, className?: string | undefined): HTMLElementByTagName;
57
57
  /**
58
58
  * @param {string} namespaceURI
59
59
  * @param {string} name
@@ -77,7 +77,7 @@ export class DOM {
77
77
  * @param {string=} className
78
78
  * @return {HTMLElementByTagName[T]}
79
79
  */
80
- createChildOf<T_1 extends string>(parentElem: Element, elementName: T_1, className?: string | undefined): any;
80
+ createChildOf<T_1 extends string>(parentElem: Element, elementName: T_1, className?: string | undefined): HTMLElementByTagName;
81
81
  /**
82
82
  * @param {import('./components.js').ComponentName} componentName
83
83
  * @return {!DocumentFragment} A clone of the cached component.
@@ -131,14 +131,14 @@ export class DOM {
131
131
  * @param {ParentNode} context
132
132
  * @return {ParseSelector<T>}
133
133
  */
134
- find<T_2 extends string>(query: T_2, context: ParentNode): any;
134
+ find<T_2 extends string>(query: T_2, context: ParentNode): ParseSelector<T_3>;
135
135
  /**
136
136
  * Helper for context.querySelectorAll. Returns an Array instead of a NodeList.
137
137
  * @template {string} T
138
138
  * @param {T} query
139
139
  * @param {ParentNode} context
140
140
  */
141
- findAll<T_3 extends string>(query: T_3, context: ParentNode): Element[];
141
+ findAll<T_4 extends string>(query: T_4, context: ParentNode): Element[];
142
142
  /**
143
143
  * Fires a custom DOM event on target.
144
144
  * @param {string} name Name of the event.
@@ -180,19 +180,19 @@ export class ReportRenderer {
180
180
  /** @type {DOM} */
181
181
  _dom: DOM;
182
182
  /** @type {LH.Renderer.Options} */
183
- _opts: any;
183
+ _opts: LH.Renderer.Options;
184
184
  /**
185
185
  * @param {LH.Result} lhr
186
186
  * @param {HTMLElement?} rootEl Report root element containing the report
187
187
  * @param {LH.Renderer.Options=} opts
188
188
  * @return {!Element}
189
189
  */
190
- renderReport(lhr: any, rootEl: HTMLElement | null, opts?: any): Element;
190
+ renderReport(lhr: LH.Result, rootEl: HTMLElement | null, opts?: LH.Renderer.Options): Element;
191
191
  /**
192
192
  * @param {LH.ReportResult} report
193
193
  * @return {DocumentFragment}
194
194
  */
195
- _renderReportTopbar(report: any): DocumentFragment;
195
+ _renderReportTopbar(report: LH.ReportResult): DocumentFragment;
196
196
  /**
197
197
  * @return {DocumentFragment}
198
198
  */
@@ -201,42 +201,42 @@ export class ReportRenderer {
201
201
  * @param {LH.ReportResult} report
202
202
  * @return {DocumentFragment}
203
203
  */
204
- _renderReportFooter(report: any): DocumentFragment;
204
+ _renderReportFooter(report: LH.ReportResult): DocumentFragment;
205
205
  /**
206
206
  * @param {LH.ReportResult} report
207
207
  * @param {DocumentFragment} footer
208
208
  */
209
- _renderMetaBlock(report: any, footer: DocumentFragment): void;
209
+ _renderMetaBlock(report: LH.ReportResult, footer: DocumentFragment): void;
210
210
  /**
211
211
  * Returns a div with a list of top-level warnings, or an empty div if no warnings.
212
212
  * @param {LH.ReportResult} report
213
213
  * @return {Node}
214
214
  */
215
- _renderReportWarnings(report: any): Node;
215
+ _renderReportWarnings(report: LH.ReportResult): Node;
216
216
  /**
217
217
  * @param {LH.ReportResult} report
218
218
  * @param {CategoryRenderer} categoryRenderer
219
219
  * @param {Record<string, CategoryRenderer>} specificCategoryRenderers
220
220
  * @return {!DocumentFragment[]}
221
221
  */
222
- _renderScoreGauges(report: any, categoryRenderer: CategoryRenderer, specificCategoryRenderers: Record<string, CategoryRenderer>): DocumentFragment[];
222
+ _renderScoreGauges(report: LH.ReportResult, categoryRenderer: CategoryRenderer, specificCategoryRenderers: Record<string, CategoryRenderer>): DocumentFragment[];
223
223
  /**
224
224
  * @param {LH.ReportResult} report
225
225
  * @return {!DocumentFragment}
226
226
  */
227
- _renderReport(report: any): DocumentFragment;
227
+ _renderReport(report: LH.ReportResult): DocumentFragment;
228
228
  }
229
229
  export class ReportUIFeatures {
230
230
  /**
231
231
  * @param {DOM} dom
232
232
  * @param {LH.Renderer.Options} opts
233
233
  */
234
- constructor(dom: DOM, opts?: any);
234
+ constructor(dom: DOM, opts?: LH.Renderer.Options);
235
235
  /** @type {LH.Result} */
236
- json: any;
236
+ json: LH.Result;
237
237
  /** @type {DOM} */
238
238
  _dom: DOM;
239
- _opts: any;
239
+ _opts: LH.Renderer.Options;
240
240
  _topbar: TopbarFeatures;
241
241
  /**
242
242
  * Handle media query change events.
@@ -248,7 +248,7 @@ export class ReportUIFeatures {
248
248
  * should be called whenever the report needs to be re-rendered.
249
249
  * @param {LH.Result} lhr
250
250
  */
251
- initFeatures(lhr: any): void;
251
+ initFeatures(lhr: LH.Result): void;
252
252
  /**
253
253
  * @param {{text: string, icon?: string, onClick: () => void}} opts
254
254
  */
@@ -256,7 +256,7 @@ export class ReportUIFeatures {
256
256
  text: string;
257
257
  icon?: string;
258
258
  onClick: () => void;
259
- }): any;
259
+ }): HTMLElementByTagName;
260
260
  /**
261
261
  * Returns the html that recreates this report.
262
262
  * @return {string}
@@ -305,7 +305,7 @@ export class ReportUIFeatures {
305
305
  * @param {LH.Renderer.Options} opts
306
306
  * @return {HTMLElement}
307
307
  */
308
- export function renderReport(lhr: any, opts?: any): HTMLElement;
308
+ export function renderReport(lhr: LH.Result, opts?: LH.Renderer.Options): HTMLElement;
309
309
  type LineContentType = number;
310
310
  declare namespace LineContentType {
311
311
  const CONTENT_NORMAL: number;
@@ -358,21 +358,21 @@ declare class CategoryRenderer {
358
358
  * @param {LH.ReportResult.AuditRef} audit
359
359
  * @return {Element}
360
360
  */
361
- renderAudit(audit: any): Element;
361
+ renderAudit(audit: LH.ReportResult.AuditRef): Element;
362
362
  /**
363
363
  * Populate an DOM tree with audit details. Used by renderAudit and renderOpportunity
364
364
  * @param {LH.ReportResult.AuditRef} audit
365
365
  * @param {DocumentFragment} component
366
366
  * @return {!Element}
367
367
  */
368
- populateAuditValues(audit: any, component: DocumentFragment): Element;
368
+ populateAuditValues(audit: LH.ReportResult.AuditRef, component: DocumentFragment): Element;
369
369
  /**
370
370
  * Inject the final screenshot next to the score gauge of the first category (likely Performance)
371
371
  * @param {HTMLElement} categoriesEl
372
372
  * @param {LH.ReportResult['audits']} audits
373
373
  * @param {Element} scoreScaleEl
374
374
  */
375
- injectFinalScreenshot(categoriesEl: HTMLElement, audits: any, scoreScaleEl: Element): any;
375
+ injectFinalScreenshot(categoriesEl: HTMLElement, audits: LH.ReportResult, scoreScaleEl: Element): any;
376
376
  /**
377
377
  * @return {Element}
378
378
  */
@@ -390,8 +390,8 @@ declare class CategoryRenderer {
390
390
  * @param {{gatherMode: LH.Result.GatherMode}=} options
391
391
  * @return {DocumentFragment}
392
392
  */
393
- renderCategoryHeader(category: any, groupDefinitions: Record<string, any>, options?: {
394
- gatherMode: any;
393
+ renderCategoryHeader(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
394
+ gatherMode: LH.Result.GatherMode;
395
395
  } | undefined): DocumentFragment;
396
396
  /**
397
397
  * Renders the group container for a group of audits. Individual audit elements can be added
@@ -399,7 +399,7 @@ declare class CategoryRenderer {
399
399
  * @param {LH.Result.ReportGroup} group
400
400
  * @return {[Element, Element | null]}
401
401
  */
402
- renderAuditGroup(group: any): [Element, Element | null];
402
+ renderAuditGroup(group: LH.Result.ReportGroup): [Element, Element | null];
403
403
  /**
404
404
  * Takes an array of auditRefs, groups them if requested, then returns an
405
405
  * array of audit and audit-group elements.
@@ -407,8 +407,8 @@ declare class CategoryRenderer {
407
407
  * @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
408
408
  * @return {Array<Element>}
409
409
  */
410
- _renderGroupedAudits(auditRefs: Array<any>, groupDefinitions: {
411
- [x: string]: any;
410
+ _renderGroupedAudits(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
411
+ [x: string]: LH.Result.ReportGroup;
412
412
  }): Array<Element>;
413
413
  /**
414
414
  * Take a set of audits, group them if they have groups, then render in a top-level
@@ -417,8 +417,8 @@ declare class CategoryRenderer {
417
417
  * @param {Object<string, LH.Result.ReportGroup>} groupDefinitions
418
418
  * @return {Element}
419
419
  */
420
- renderUnexpandableClump(auditRefs: Array<any>, groupDefinitions: {
421
- [x: string]: any;
420
+ renderUnexpandableClump(auditRefs: Array<LH.ReportResult.AuditRef>, groupDefinitions: {
421
+ [x: string]: LH.Result.ReportGroup;
422
422
  }): Element;
423
423
  /**
424
424
  * Take a set of audits and render in a top-level, expandable clump that starts
@@ -427,36 +427,38 @@ declare class CategoryRenderer {
427
427
  * @param {{auditRefs: Array<LH.ReportResult.AuditRef>, description?: string}} clumpOpts
428
428
  * @return {!Element}
429
429
  */
430
- renderClump(clumpId: Exclude<any, 'failed'>, { auditRefs, description }: {
431
- auditRefs: Array<any>;
430
+ renderClump(clumpId: Exclude<TopLevelClumpId, 'failed'>, { auditRefs, description }: {
431
+ auditRefs: Array<LH.ReportResult.AuditRef>;
432
432
  description?: string;
433
433
  }): Element;
434
434
  /**
435
435
  * @param {LH.ReportResult.Category} category
436
436
  * @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
437
- * @param {{gatherMode: LH.Result.GatherMode}=} options
437
+ * @param {{gatherMode: LH.Result.GatherMode, omitLabel?: boolean, onPageAnchorRendered?: (link: HTMLAnchorElement) => void}=} options
438
438
  * @return {DocumentFragment}
439
439
  */
440
- renderCategoryScore(category: any, groupDefinitions: Record<string, any>, options?: {
441
- gatherMode: any;
442
- } | undefined): DocumentFragment;
440
+ renderCategoryScore(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>, options?: {
441
+ gatherMode: LH.Result.GatherMode;
442
+ omitLabel?: boolean;
443
+ onPageAnchorRendered?: (link: HTMLAnchorElement) => void;
444
+ }): DocumentFragment;
443
445
  /**
444
446
  * @param {LH.ReportResult.Category} category
445
447
  * @param {Record<string, LH.Result.ReportGroup>} groupDefinitions
446
448
  * @return {DocumentFragment}
447
449
  */
448
- renderScoreGauge(category: any, groupDefinitions: Record<string, any>): DocumentFragment;
450
+ renderScoreGauge(category: LH.ReportResult.Category, groupDefinitions: Record<string, LH.Result.ReportGroup>): DocumentFragment;
449
451
  /**
450
452
  * @param {LH.ReportResult.Category} category
451
453
  * @return {DocumentFragment}
452
454
  */
453
- renderCategoryFraction(category: any): DocumentFragment;
455
+ renderCategoryFraction(category: LH.ReportResult.Category): DocumentFragment;
454
456
  /**
455
457
  * Returns true if an LH category has any non-"notApplicable" audits.
456
458
  * @param {LH.ReportResult.Category} category
457
459
  * @return {boolean}
458
460
  */
459
- hasApplicableAudits(category: any): boolean;
461
+ hasApplicableAudits(category: LH.ReportResult.Category): boolean;
460
462
  /**
461
463
  * Define the score arc of the gauge
462
464
  * Credit to xgad for the original technique: https://codepen.io/xgad/post/svg-radial-progress-meters
@@ -468,13 +470,13 @@ declare class CategoryRenderer {
468
470
  * @param {LH.ReportResult.AuditRef} audit
469
471
  * @return {boolean}
470
472
  */
471
- _auditHasWarning(audit: any): boolean;
473
+ _auditHasWarning(audit: LH.ReportResult.AuditRef): boolean;
472
474
  /**
473
475
  * Returns the id of the top-level clump to put this audit in.
474
476
  * @param {LH.ReportResult.AuditRef} auditRef
475
477
  * @return {TopLevelClumpId}
476
478
  */
477
- _getClumpIdForAuditRef(auditRef: any): any;
479
+ _getClumpIdForAuditRef(auditRef: LH.ReportResult.AuditRef): TopLevelClumpId;
478
480
  /**
479
481
  * Renders a set of top level sections (clumps), under a status of failed, warning,
480
482
  * manual, passed, or notApplicable. The result ends up something like:
@@ -498,10 +500,10 @@ declare class CategoryRenderer {
498
500
  * @param {{gatherMode: LH.Result.GatherMode}=} options
499
501
  * @return {Element}
500
502
  */
501
- render(category: any, groupDefinitions?: {
502
- [x: string]: any;
503
+ render(category: LH.ReportResult.Category, groupDefinitions?: {
504
+ [x: string]: LH.Result.ReportGroup;
503
505
  } | undefined, options?: {
504
- gatherMode: any;
506
+ gatherMode: LH.Result.GatherMode;
505
507
  } | undefined): Element;
506
508
  }
507
509
  /**
@@ -516,7 +518,7 @@ declare class TopbarFeatures {
516
518
  */
517
519
  constructor(reportUIFeatures: ReportUIFeatures, dom: DOM);
518
520
  /** @type {LH.Result} */
519
- lhr: any;
521
+ lhr: LH.Result;
520
522
  _reportUIFeatures: ReportUIFeatures;
521
523
  _dom: DOM;
522
524
  _dropDownMenu: DropDownMenu;
@@ -552,7 +554,7 @@ declare class TopbarFeatures {
552
554
  /**
553
555
  * @param {LH.Result} lhr
554
556
  */
555
- enable(lhr: any): void;
557
+ enable(lhr: LH.Result): void;
556
558
  /**
557
559
  * Copies the report JSON to the clipboard (if supported by the browser).
558
560
  */
@@ -593,15 +595,15 @@ declare class DetailsRenderer {
593
595
  * @param {{fullPageScreenshot?: LH.Audit.Details.FullPageScreenshot}} [options]
594
596
  */
595
597
  constructor(dom: DOM, options?: {
596
- fullPageScreenshot?: any;
598
+ fullPageScreenshot?: LH.Audit.Details.FullPageScreenshot;
597
599
  });
598
600
  _dom: DOM;
599
- _fullPageScreenshot: any;
601
+ _fullPageScreenshot: LH.Audit.Details.FullPageScreenshot;
600
602
  /**
601
603
  * @param {AuditDetails} details
602
604
  * @return {Element|null}
603
605
  */
604
- render(details: any): Element | null;
606
+ render(details: AuditDetails): Element | null;
605
607
  /**
606
608
  * @param {{value: number, granularity?: number}} details
607
609
  * @return {Element}
@@ -655,7 +657,7 @@ declare class DetailsRenderer {
655
657
  * @param {string} type
656
658
  * @param {*} value
657
659
  */
658
- _renderUnknown(type: string, value: any): any;
660
+ _renderUnknown(type: string, value: any): HTMLElementByTagName;
659
661
  /**
660
662
  * Render a details item value for embedding in a table. Renders the value
661
663
  * based on the heading's valueType, unless the value itself has a `type`
@@ -664,7 +666,7 @@ declare class DetailsRenderer {
664
666
  * @param {LH.Audit.Details.OpportunityColumnHeading} heading
665
667
  * @return {Element|null}
666
668
  */
667
- _renderTableValue(value: any, heading: any): Element | null;
669
+ _renderTableValue(value: TableItemValue, heading: LH.Audit.Details.OpportunityColumnHeading): Element | null;
668
670
  /**
669
671
  * Get the headings of a table-like details object, converted into the
670
672
  * OpportunityColumnHeading type until we have all details use the same
@@ -672,7 +674,7 @@ declare class DetailsRenderer {
672
674
  * @param {Table|OpportunityTable} tableLike
673
675
  * @return {OpportunityTable['headings']}
674
676
  */
675
- _getCanonicalizedHeadingsFromTable(tableLike: any | any): any;
677
+ _getCanonicalizedHeadingsFromTable(tableLike: Table | OpportunityTable): OpportunityTable;
676
678
  /**
677
679
  * Get the headings of a table-like details object, converted into the
678
680
  * OpportunityColumnHeading type until we have all details use the same
@@ -680,13 +682,13 @@ declare class DetailsRenderer {
680
682
  * @param {Table['headings'][number]} heading
681
683
  * @return {OpportunityTable['headings'][number]}
682
684
  */
683
- _getCanonicalizedHeading(heading: any): any;
685
+ _getCanonicalizedHeading(heading: Table): OpportunityTable;
684
686
  /**
685
687
  * @param {Exclude<LH.Audit.Details.TableColumnHeading['subItemsHeading'], undefined>} subItemsHeading
686
688
  * @param {LH.Audit.Details.TableColumnHeading} parentHeading
687
689
  * @return {LH.Audit.Details.OpportunityColumnHeading['subItemsHeading']}
688
690
  */
689
- _getCanonicalizedsubItemsHeading(subItemsHeading: Exclude<any['subItemsHeading'], undefined>, parentHeading: any): any;
691
+ _getCanonicalizedsubItemsHeading(subItemsHeading: Exclude<LH.Audit.Details.TableColumnHeading['subItemsHeading'], undefined>, parentHeading: LH.Audit.Details.TableColumnHeading): LH.Audit.Details.OpportunityColumnHeading;
690
692
  /**
691
693
  * Returns a new heading where the values are defined first by `heading.subItemsHeading`,
692
694
  * and secondly by `heading`. If there is no subItemsHeading, returns null, which will
@@ -694,45 +696,45 @@ declare class DetailsRenderer {
694
696
  * @param {LH.Audit.Details.OpportunityColumnHeading} heading
695
697
  * @return {LH.Audit.Details.OpportunityColumnHeading | null}
696
698
  */
697
- _getDerivedsubItemsHeading(heading: any): any | null;
699
+ _getDerivedsubItemsHeading(heading: LH.Audit.Details.OpportunityColumnHeading): LH.Audit.Details.OpportunityColumnHeading | null;
698
700
  /**
699
701
  * @param {TableItem} item
700
702
  * @param {(LH.Audit.Details.OpportunityColumnHeading | null)[]} headings
701
703
  */
702
- _renderTableRow(item: any, headings: (any | null)[]): any;
704
+ _renderTableRow(item: TableItem, headings: (LH.Audit.Details.OpportunityColumnHeading | null)[]): HTMLElementByTagName;
703
705
  /**
704
706
  * Renders one or more rows from a details table item. A single table item can
705
707
  * expand into multiple rows, if there is a subItemsHeading.
706
708
  * @param {TableItem} item
707
709
  * @param {LH.Audit.Details.OpportunityColumnHeading[]} headings
708
710
  */
709
- _renderTableRowsFromItem(item: any, headings: any[]): DocumentFragment;
711
+ _renderTableRowsFromItem(item: TableItem, headings: LH.Audit.Details.OpportunityColumnHeading[]): DocumentFragment;
710
712
  /**
711
713
  * @param {OpportunityTable|Table} details
712
714
  * @return {Element}
713
715
  */
714
- _renderTable(details: any | any): Element;
716
+ _renderTable(details: OpportunityTable | Table): Element;
715
717
  /**
716
718
  * @param {LH.Audit.Details.List} details
717
719
  * @return {Element}
718
720
  */
719
- _renderList(details: any): Element;
721
+ _renderList(details: LH.Audit.Details.List): Element;
720
722
  /**
721
723
  * @param {LH.Audit.Details.NodeValue} item
722
724
  * @return {Element}
723
725
  */
724
- renderNode(item: any): Element;
726
+ renderNode(item: LH.Audit.Details.NodeValue): Element;
725
727
  /**
726
728
  * @param {LH.Audit.Details.SourceLocationValue} item
727
729
  * @return {Element|null}
728
730
  * @protected
729
731
  */
730
- protected renderSourceLocation(item: any): Element | null;
732
+ protected renderSourceLocation(item: LH.Audit.Details.SourceLocationValue): Element | null;
731
733
  /**
732
734
  * @param {LH.Audit.Details.Filmstrip} details
733
735
  * @return {Element}
734
736
  */
735
- _renderFilmstrip(details: any): Element;
737
+ _renderFilmstrip(details: LH.Audit.Details.Filmstrip): Element;
736
738
  /**
737
739
  * @param {string} text
738
740
  * @return {Element}