@cran/lib.vue.ref
Version:
Vue Reactivity Extensions
30 lines (29 loc) • 865 B
TypeScript
import type { MaybeWrapped } from "./MaybeWrapped";
import type { RefLike } from "./RefLike";
import type { Thunk } from "./Thunk";
/**
* Warning! Using `unwrap` on a value which can
* only ever be a ref is not advised.
* Instead use `wrapped.value`.
* @since 0.0.1
* @category Utility
* @deprecated
*/
export declare function unwrap<T>(wrapped: RefLike<T>): T;
/**
* Warning! Using `unwrap` on a value which can
* only ever be a thunk is not advised.
* Instead use `wrapped()`.
* @since 0.0.1
* @category Utility
* @deprecated
*/
export declare function unwrap<T>(wrapped: 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 unwrap<T>(wrapped: MaybeWrapped<T>): T;