UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

14 lines (11 loc) 283 B
import type { WatchSource } from "vue"; import { watchOnce } from "./watchOnce"; /** * @since 0.0.1 * @category Watch */ export async function watchNext<T> ( source: WatchSource<T> ) { return new Promise<T>(function setup ( resolve ) { watchOnce(source, resolve); }); }