toRef type error - says it unwraps refs but doesn't
Version
3.2.19
Reproduction link
Steps to reproduce
- Create a
shallowReactive
object with a deeply nestedref
. - Extract a property from it using
toRef
. - Try to access the nested ref value.
What is expected?
The toRef
type is a shallow unwrap, or it actually unwraps the nested ref.
What is actually happening?
The toRef
type states the nested ref has been unwraped, when it has not been.
I ran into this issue when I was passing a prop down to a component which mirrors this setup. The props object is equivalent to the shallow reactive object and I wanted to get a ref to my prop, but then typescript started yelling at me.