rsnext/packages
Darsh Patel e84537f88e
add NextWebVitalsMetric type for reportWebVitals (#14675)
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
  }
}
```
2020-07-03 03:36:13 +00:00
..
create-next-app v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
eslint-plugin-next v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next add NextWebVitalsMetric type for reportWebVitals (#14675) 2020-07-03 03:36:13 +00:00
next-bundle-analyzer v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next-mdx v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next-plugin-google-analytics v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next-plugin-sentry v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next-plugin-storybook v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
next-polyfill-nomodule v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
react-dev-overlay v9.4.5-canary.27 2020-07-01 20:49:52 +02:00
react-refresh-utils v9.4.5-canary.27 2020-07-01 20:49:52 +02:00