UNPKG

763 BTypeScriptView Raw
1import { FIDMetric, MetricRatingThresholds, ReportOpts } from './types.js';
2/** Thresholds for FID. See https://web.dev/articles/fid#what_is_a_good_fid_score */
3export declare const FIDThresholds: MetricRatingThresholds;
4/**
5 * Calculates the [FID](https://web.dev/articles/fid) value for the current page and
6 * calls the `callback` function once the value is ready, along with the
7 * relevant `first-input` performance entry used to determine the value. The
8 * reported value is a `DOMHighResTimeStamp`.
9 *
10 * _**Important:** since FID is only reported after the user interacts with the
11 * page, it's possible that it will not be reported for some page loads._
12 */
13export declare const onFID: (onReport: (metric: FIDMetric) => void, opts?: ReportOpts) => void;