]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types(ref): fix dts test for ref (#965)
authorCarlos Rodrigues <carlos@hypermob.co.uk>
Wed, 15 Apr 2020 16:15:13 +0000 (17:15 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Apr 2020 16:15:13 +0000 (12:15 -0400)
test-dts/ref.test-d.ts

index f9b72312bdc3c5375a5edcd8f8e065303ea39e10..5d73a38df17e0b980161e5d2071f9aa6ecf50e6d 100644 (file)
@@ -1,5 +1,5 @@
 import { expectType } from 'tsd'
-import { Ref, ref, isRef, unref, UnwrapRef } from './index'
+import { Ref, ref, isRef, unref } from './index'
 
 function plainType(arg: number | Ref<number>) {
   // ref coercing
@@ -29,7 +29,9 @@ function plainType(arg: number | Ref<number>) {
   }
 
   // with symbol
-  expectType<IteratorFoo | null>(unref(ref<IteratorFoo | null>(null)))
+  expectType<Ref<IteratorFoo | null | undefined>>(
+    ref<IteratorFoo | null | undefined>()
+  )
 }
 
 plainType(1)