]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: type improvements (#5264)
authorYugang Cao <34439652+Talljack@users.noreply.github.com>
Fri, 21 Jan 2022 06:56:20 +0000 (14:56 +0800)
committerGitHub <noreply@github.com>
Fri, 21 Jan 2022 06:56:20 +0000 (01:56 -0500)
packages/runtime-core/src/profiling.ts
packages/runtime-test/src/nodeOps.ts

index 8125c2f69939278d50783eb9f45e259e893dd883..b2616947821221749e651990e4b87b473dc6b611 100644 (file)
@@ -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
 }
index d844176a59f091b4edf434785c1452a1d324c537..94a793cc483a1d939589c3ecf0187cb6051e243b 100644 (file)
@@ -224,7 +224,7 @@ function nextSibling(node: TestNode): TestNode | null {
   return parent.children[i + 1] || null
 }
 
-function querySelector(): any {
+function querySelector(): never {
   throw new Error('querySelector not supported in test renderer.')
 }