types: simplify ref type
This commit is contained in:
parent
3facfa5a55
commit
6a22ad2fb2
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user