]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
types: simplify ref type
authorEvan You <yyx990803@gmail.com>
Mon, 19 Aug 2019 02:48:46 +0000 (22:48 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 19 Aug 2019 02:48:46 +0000 (22:48 -0400)
packages/reactivity/src/ref.ts

index 6c2e134ea2f2854c92775714cdf9b57e31722e0d..d2f5a4e455df5e3a68d640fc5e481a360375223b 100644 (file)
@@ -9,7 +9,7 @@ export interface Ref<T> {
   value: UnwrapNestedRefs<T>
 }
 
-export type UnwrapNestedRefs<T> = T extends Ref<infer V> ? Ref<V> : UnwrapRef<T>
+export type UnwrapNestedRefs<T> = T extends Ref<any> ? T : UnwrapRef<T>
 
 const convert = (val: any): any => (isObject(val) ? reactive(val) : val)