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 } } ``` |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-plugin-next | ||
next | ||
next-bundle-analyzer | ||
next-mdx | ||
next-plugin-google-analytics | ||
next-plugin-sentry | ||
next-plugin-storybook | ||
next-polyfill-nomodule | ||
react-dev-overlay | ||
react-refresh-utils |