import * as Graph from '../graph/graph.js'; import type * as Types from '../types/types.js'; import { Metric, type MetricCoefficients } from './Metric.js'; interface FirstPaintBasedGraphOpts { /** * The timestamp used to filter out tasks that occurred after our paint of interest. * Typically this is First Contentful Paint or First Meaningful Paint. */ cutoffTimestamp: number; /** * The function that determines which resources should be considered *possibly* * render-blocking. */ treatNodeAsRenderBlocking: (node: Graph.NetworkNode) => boolean; /** * The function that determines which CPU nodes should also be included in our * blocking node IDs set, beyond what getRenderBlockingNodeData() already includes. */ additionalCpuNodesToTreatAsRenderBlocking?: (node: Graph.CPUNode) => boolean; } declare class FirstContentfulPaint extends Metric { static get coefficients(): MetricCoefficients; /** * Computes the set of URLs that *appeared* to be render-blocking based on our filter, * *but definitely were not* render-blocking based on the timing of their EvaluateScript task. * It also computes the set of corresponding CPU node ids that were needed for the paint at the * given timestamp. */ static getRenderBlockingNodeData(graph: Graph.Node, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }: FirstPaintBasedGraphOpts): { definitelyNotRenderBlockingScriptUrls: Set; renderBlockingCpuNodeIds: Set; }; /** * Computes the graph required for the first paint of interest. */ static getFirstPaintBasedGraph(dependencyGraph: Graph.Node, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }: FirstPaintBasedGraphOpts): Graph.Node; static getOptimisticGraph(dependencyGraph: Graph.Node, processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node; static getPessimisticGraph(dependencyGraph: Graph.Node, processedNavigation: Types.Simulation.ProcessedNavigation): Graph.Node; } export { FirstContentfulPaint };