|
|
@@ -1,8 +1,9 @@
|
|
|
+/* eslint-disable no-restricted-globals */
|
|
|
import { ComponentInternalInstance, formatComponentName } from './component'
|
|
|
import { devtoolsPerfEnd, devtoolsPerfStart } from './devtools'
|
|
|
|
|
|
let supported: boolean
|
|
|
-let perf: any
|
|
|
+let perf: Performance
|
|
|
|
|
|
export function startMeasure(
|
|
|
instance: ComponentInternalInstance,
|
|
|
@@ -40,13 +41,11 @@ function isSupported() {
|
|
|
if (supported !== undefined) {
|
|
|
return supported
|
|
|
}
|
|
|
- /* eslint-disable no-restricted-globals */
|
|
|
if (typeof window !== 'undefined' && window.performance) {
|
|
|
supported = true
|
|
|
perf = window.performance
|
|
|
} else {
|
|
|
supported = false
|
|
|
}
|
|
|
- /* eslint-enable no-restricted-globals */
|
|
|
return supported
|
|
|
}
|