Why Ref
taking two type arguments?
#4667
Replies: 3 comments
-
now trying to read vueuse codes. Ref<DeviceMotionEventAcceleration | null, DeviceMotionEventAcceleration | null> |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
I guess my understanding was wrong. vueuse |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
in type difinitions(project-root/node_modules/@vueuse/core/index.d.mts),
vue.Ref
is taking two type arguments.For example,
Because of this, the type returned from Ref is any. If someone know why this happens, let me know.
Thank you in advance.
Reproduction
https://stackblitz.com/edit/vitejs-vite-p3zpyejw?file=package.json,src%2Fcomponents%2FtextSelection.ts
Beta Was this translation helpful? Give feedback.
All reactions