浏览代码

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

Evan You 6 年之前
父节点
当前提交
9aaeeede62
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      test-dts/ref.test-d.ts

+ 1 - 0
test-dts/ref.test-d.ts

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