|
|
@@ -9,7 +9,6 @@ import { Dep, getDepFromReactive } from './dep'
|
|
|
import {
|
|
|
type Builtin,
|
|
|
type ShallowReactiveMarker,
|
|
|
- isProxy,
|
|
|
isReactive,
|
|
|
isReadonly,
|
|
|
isShallow,
|
|
|
@@ -18,7 +17,6 @@ import {
|
|
|
} from './reactive'
|
|
|
import type { ComputedRef, WritableComputedRef } from './computed'
|
|
|
import { ReactiveFlags, TrackOpTypes, TriggerOpTypes } from './constants'
|
|
|
-import { warn } from './warning'
|
|
|
|
|
|
declare const RefSymbol: unique symbol
|
|
|
export declare const RawSymbol: unique symbol
|
|
|
@@ -337,9 +335,6 @@ export type ToRefs<T = any> = {
|
|
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
|
*/
|
|
|
export function toRefs<T extends object>(object: T): ToRefs<T> {
|
|
|
- if (__DEV__ && !isProxy(object)) {
|
|
|
- warn(`toRefs() expects a reactive object but received a plain one.`)
|
|
|
- }
|
|
|
const ret: any = isArray(object) ? new Array(object.length) : {}
|
|
|
for (const key in object) {
|
|
|
ret[key] = propertyToRef(object, key)
|