Browse Source

types: simplify ref type

Evan You 6 năm trước cách đây
mục cha
commit
6a22ad2fb2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/reactivity/src/ref.ts

+ 1 - 1
packages/reactivity/src/ref.ts

@@ -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)