fix type NextWebVitalsMetric (#24780)

Co-authored-by: JJ Kasper <jj@jjsweb.site>
This commit is contained in:
Mikhail Tsyplakov 2021-07-20 04:39:24 +03:00 committed by GitHub
parent 5cd37d9b32
commit 2a282a4081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,11 +49,21 @@ export type AppTreeType = ComponentType<
*/
export type NextWebVitalsMetric = {
id: string
label: string
name: string
startTime: number
value: number
}
} & (
| {
label: 'web-vital'
name: 'FCP' | 'LCP' | 'CLS' | 'FID' | 'TTFB'
}
| {
label: 'custom'
name:
| 'Next.js-hydration'
| 'Next.js-route-change-to-render'
| 'Next.js-render'
}
)
export type Enhancer<C> = (Component: C) => C