We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unref
ShallowRef
ShallowRef | ComputedRef | MaybeRef
3.4.31
https://play.vuejs.org/#eNqtU9tq4zAQ/ZVBL91CcMlmn7LewO7Sh13ohTb0SVBcZ+K4lSUhjdKU1P/ekVynpjdaKMZCmhnpnDOXrfhtbbYOKKYi96WrLYFHChZUoatfUpCXYiZ13VjjCOjOImzhfFUoZW7PcDmCv6axgXCRDkfF3RWmHS/QwtKZBvb4+b2fuze2ELR75pU6fsugS6qN7gLm6Gn8jXBD0wFg7snVuprB/RB5YO0p9Kb9KXQ72EoN4Fice0RIj+8zs/Z19O/voX8hzuSTKj8IlR90BeXy8YGwsaog5BNAvhrPuioQ4/v8gM/xwiBIjLj2pdHLusquvdHcIAlNipIZ1QrdiY0yuD+mHY/oSwL+Jxu5gKPeXq6wvHnFfu030SbFqUOPbo1S7HxUuAqpcx+eH7OwgbMxi6A4+h3nGXqjQuTYhf0JesG0B3GJ7b/UlpzNuT/cEGrfi4pEY2Sb4qXgRo3FeEv6E91J9iPd4ypwFpWpMvKcvk/O0LPxcYMBInNRqIAvI+K/6y8GnnNevnaEGGDXcY80+p5jVxsX1ny5RhfzyKo5GdlkLNoHV8KK9A==
unref and toValue resolve the type incorrectly if the passed type is ShallowRef | ComputedRef | MaybeRef.
toValue
The return type of the text function should be string.
text
string
function test(text: ShallowRef<string> | ComputedRef<string> | MaybeRef<string>) { return unref(text); }
But it is string | ShallowRef<string> instead.
string | ShallowRef<string>
Typescript 5.5.3
function test(text: ShallowRef<string> | MaybeRef<string>) { return unref(text); }
and
function test(text: ShallowRef<string> | ComputedRef<string>) { return unref(text); }
have the only string as return type as expected.
The text was updated successfully, but these errors were encountered:
useVuePdfEmbed
a509e30
Successfully merging a pull request may close this issue.
Vue version
3.4.31
Link to minimal reproduction
https://play.vuejs.org/#eNqtU9tq4zAQ/ZVBL91CcMlmn7LewO7Sh13ohTb0SVBcZ+K4lSUhjdKU1P/ekVynpjdaKMZCmhnpnDOXrfhtbbYOKKYi96WrLYFHChZUoatfUpCXYiZ13VjjCOjOImzhfFUoZW7PcDmCv6axgXCRDkfF3RWmHS/QwtKZBvb4+b2fuze2ELR75pU6fsugS6qN7gLm6Gn8jXBD0wFg7snVuprB/RB5YO0p9Kb9KXQ72EoN4Fice0RIj+8zs/Z19O/voX8hzuSTKj8IlR90BeXy8YGwsaog5BNAvhrPuioQ4/v8gM/xwiBIjLj2pdHLusquvdHcIAlNipIZ1QrdiY0yuD+mHY/oSwL+Jxu5gKPeXq6wvHnFfu030SbFqUOPbo1S7HxUuAqpcx+eH7OwgbMxi6A4+h3nGXqjQuTYhf0JesG0B3GJ7b/UlpzNuT/cEGrfi4pEY2Sb4qXgRo3FeEv6E91J9iPd4ypwFpWpMvKcvk/O0LPxcYMBInNRqIAvI+K/6y8GnnNevnaEGGDXcY80+p5jVxsX1ny5RhfzyKo5GdlkLNoHV8KK9A==
Steps to reproduce
unref
andtoValue
resolve the type incorrectly if the passed type isShallowRef | ComputedRef | MaybeRef
.What is expected?
The return type of the
text
function should bestring
.What is actually happening?
But it is
string | ShallowRef<string>
instead.System Info
Any additional comments?
and
have the only
string
as return type as expected.The text was updated successfully, but these errors were encountered: