test: add type test for nested refs in ref.value

This commit is contained in:
Evan You 2020-02-25 20:38:02 -05:00
parent d4c6957e2d
commit 9aaeeede62

View File

@ -19,6 +19,7 @@ function foo(arg: number | Ref<number>) {
foo: ref(1) foo: ref(1)
}) })
expectType<Ref<{ foo: number }>>(nestedRef) expectType<Ref<{ foo: number }>>(nestedRef)
expectType<{ foo: number }>(nestedRef.value)
} }
foo(1) foo(1)