e84537f88e
Fixes: #13512 Defined and exported type for `metric` used in [reportWebVitals](https://nextjs.org/docs/advanced-features/measuring-performance) ``` export function reportWebVitals(metric) { if (metric.label === 'custom') { console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console } } ``` One can now do ``` import { NextWebVitalsMetric } from 'next/app' export function reportWebVitals(metric: NextWebVitalsMetric ) { if (metric.label === 'custom') { console.log(metric) // The metric object ({ id, name, startTime, value, label }) is logged to the console } } ``` |
||
---|---|---|
.. | ||
lib | ||
server |