Skip to content

Commit

Permalink
chore: type improvements (#5264)
Browse files Browse the repository at this point in the history
  • Loading branch information
Talljack committed Jan 21, 2022
1 parent 9f55e6f commit 92e04a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/runtime-core/src/profiling.ts
@@ -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,
Expand Down Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion packages/runtime-test/src/nodeOps.ts
Expand Up @@ -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.')
}

Expand Down

0 comments on commit 92e04a6

Please sign in to comment.