We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fcea65 commit 7284ad9Copy full SHA for 7284ad9
src/reactivity/ref.ts
@@ -1,4 +1,3 @@
1
-import { Data } from '../component'
2
import { RefKey } from '../utils/symbols'
3
import { proxy, isPlainObject, warn } from '../utils'
4
import { reactive, isReactive, shallowReactive } from './reactive'
@@ -119,7 +118,7 @@ export function unref<T>(ref: T): T extends Ref<infer V> ? V : T {
119
118
return isRef(ref) ? (ref.value as any) : ref
120
}
121
122
-export function toRefs<T extends Data = Data>(obj: T): ToRefs<T> {
+export function toRefs<T extends object>(obj: T): ToRefs<T> {
123
if (__DEV__ && !isReactive(obj)) {
124
warn(`toRefs() expects a reactive object but received a plain one.`)
125
0 commit comments