Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix type #5264

Merged
merged 1 commit into from Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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