使用 watch 监听 shadowRef 数组,但是 new value 的 ts 类型推断还是 shadowRef,没有解构 #13803
Unanswered
samuel-pp
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
尝试使用 watch 监听 vueuse 中 useMouse 返回的 x 和 y,这两个值 ts 定义为 Vue.ShadowRef


但是在 callback newValue 中被推导出来的 x 和 y 的类型还是 shadowRef 并不是 number,这是有意为之还是类型推断错误?
Beta Was this translation helpful? Give feedback.
All reactions