fix(types): ref value type unwrapping should happen at creation time
This commit is contained in:
@@ -52,3 +52,13 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
// should provide correct ref.value inner type to callbacks
|
||||
const nestedRefSource = ref({
|
||||
foo: ref(1)
|
||||
})
|
||||
|
||||
watch(nestedRefSource, (v, ov) => {
|
||||
expectType<{ foo: number }>(v)
|
||||
expectType<{ foo: number }>(ov)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user