You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the return type of each of the magic key ref becomes ComputedRef<boolean> | undefined, and then make it impossible to use in any watch, watchEffect, or whenever for example.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Check that this is a concrete bug. For Q&A open a GitHub Discussion.
Ericlm
changed the title
Using useMagicKeys with the TS option "noUncheckedIndexedAccess" makes it impossible to use
useMagicKeys with the TS option "noUncheckedIndexedAccess" makes it impossible to use
Apr 8, 2024
Describe the bug
When using useMagicKeys, the issue arises as soon as we activate the
noUncheckedIndexedAccess
inside of tsconfig.This option allows Typescript to make all index-based accesses undefinable : https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess
The issue is that the return type of each of the magic key ref becomes
ComputedRef<boolean> | undefined
, and then make it impossible to use in anywatch
,watchEffect
, orwhenever
for example.Reproduction
https://github.com/Ericlm/vueuse-magic-issue
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: