UNPKG

@cran/lib.vue.ref

Version:

Vue Reactivity Extensions

15 lines (9 loc) 245 B
import { type EffectScope, getCurrentScope } from "vue"; export function withScope ( callback: ( scope: EffectScope ) => void ) { const scope = getCurrentScope(); if (scope) { callback(scope); return true; } return false; }