@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
20 lines (19 loc) • 577 B
TypeScript
import type { MaybeThunk } from "./MaybeThunk";
import type { Thunk } from "./Thunk";
/**
* Warning! Using `unthunk` on a value which can
* only ever be a thunk is not advised.
* Instead use `thunk()`.
* @since 0.0.1
* @category Utility
* @deprecated
*/
export declare function unthunk<T>(thunk: Thunk<T>): T;
/**
* Return the inner value if the argument is a ref,
* otherwise return the argument itself.
* Additionally allows this function to work with computeds.
* @since 0.0.1
* @category Utility
*/
export declare function unthunk<T>(thunk: MaybeThunk<T>): T;