Closed
Description
Following the fixes for #331 in #348, I upgraded to 3.3.2 to see if it fixed the issues I was facing, however I am still having problems. For example:
import { onCLS } from "web-vitals/attribution";
onCLS((metric) => {
// Expected type: `string | undefined`
// Actual type: `unknown`
metric.attribution.largestShiftTarget;
// ^?
});
Suggested fix:
-export interface CLSReportCallbackWithAttribution extends ReportCallbackWithAttribution {
+export interface CLSReportCallbackWithAttribution {
(metric: CLSMetricWithAttribution): void;
}
We would need to make a similar change for the other metrics as well.
Metadata
Metadata
Assignees
Labels
No labels