We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a73eedd commit 1b3d4e6Copy full SHA for 1b3d4e6
packages/core/useDevicePixelRatio/index.ts
@@ -1,3 +1,4 @@
1
+import type { WatchStopHandle } from 'vue'
2
import type { ConfigurableWindow } from '../_configurable'
3
import { noop, watchImmediate } from '@vueuse/shared'
4
import { readonly, shallowRef } from 'vue'
@@ -18,7 +19,7 @@ export function useDevicePixelRatio(options: ConfigurableWindow = {}) {
18
19
20
const pixelRatio = shallowRef(1)
21
const query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options)
- let stop = noop
22
+ let stop: WatchStopHandle = noop
23
24
if (window) {
25
stop = watchImmediate(query, () => pixelRatio.value = window!.devicePixelRatio)
0 commit comments