Skip to content
On this page

resolveUnref

Get the value of value/ref/getter.

Usage

ts
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

typescript
/**
 * Get the value of value/ref/getter.
 */
export declare function resolveUnref<T>(r: MaybeComputedRef<T>): T
/**
 * Get the value of value/ref/getter.
 */
export declare function resolveUnref<T>(r: MaybeComputedRef<T>): T

Source

Category
Export Size
176 B
Last Changed
5 months ago
Related

SourceDocs

贡献者(Contributors)

日志(Changelog)

No recent changes

Released under the MIT License.