reactifyObject
Apply
reactify
to an object
Usage
import { reactifyObject } from '@vueuse/core'
const console = reactifyObject(console)
const a = ref('42')
console.log(a) // no longer need `.value`
Type Declarations
export declare type ReactifyNested<T, Keys extends keyof T = keyof T> = {
[K in Keys]: T[K] extends (...args: any[]) => any ? Reactify<T[K]> : T[K]
}
export interface ReactifyObjectOptions {
/**
* Includes names from Object.getOwnPropertyNames
*
* @default true
*/
includeOwnProperties?: boolean
}
/**
* Apply [`reactify`](/shared/reactify/)to an object
*/
export declare function reactifyObject<T extends object, Keys extends keyof T>(
obj: T,
keys?: (keyof T)[]
): ReactifyNested<T, Keys>
export declare function reactifyObject<T extends object>(
obj: T,
options?: ReactifyObjectOptions
): ReactifyNested<T>