From 7284ad971317bc7520c7ea09c4e69b7baad45d06 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Mon, 29 Mar 2021 16:41:26 +0200 Subject: [PATCH] fix(types): allow any object in toRefs (#668) --- src/reactivity/ref.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/reactivity/ref.ts b/src/reactivity/ref.ts index fdcd636e..ccef2a8b 100644 --- a/src/reactivity/ref.ts +++ b/src/reactivity/ref.ts @@ -1,4 +1,3 @@ -import { Data } from '../component' import { RefKey } from '../utils/symbols' import { proxy, isPlainObject, warn } from '../utils' import { reactive, isReactive, shallowReactive } from './reactive' @@ -119,7 +118,7 @@ export function unref(ref: T): T extends Ref ? V : T { return isRef(ref) ? (ref.value as any) : ref } -export function toRefs(obj: T): ToRefs { +export function toRefs(obj: T): ToRefs { if (__DEV__ && !isReactive(obj)) { warn(`toRefs() expects a reactive object but received a plain one.`) }