resolveUnref
Get the value of value/ref/getter.
Usage
import { resolveUnref } from '@vueuse/core'
const foo = ref('hi')
const a = resolveUnref(0) // 0
const b = resolveUnref(foo) // 'hi'
const c = resolveUnref(() => 'hi') // 'hi'
import { resolveUnref } from '@vueuse/core'
const foo = ref('hi')
const a = resolveUnref(0) // 0
const b = resolveUnref(foo) // 'hi'
const c = resolveUnref(() => 'hi') // 'hi'
Type Declarations
/**
* Normalize value/ref/getter to `ref` or `computed`.
*/
export declare function resolveUnref<T>(r: MaybeComputedRef<T>): T
/**
* Normalize value/ref/getter to `ref` or `computed`.
*/
export declare function resolveUnref<T>(r: MaybeComputedRef<T>): T