Explorar el Código

types: simplify ref type

Evan You hace 6 años
padre
commit
6a22ad2fb2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)