UNPKG

impair

Version:

impair is a React framework bringing several programming concepts together in order to provide a foundation for a layered, scalable, performant and enterprise level react application.

17 lines (16 loc) 981 B
import { ReactiveEffectRunner, effect as coreEffect } from '@vue/reactivity'; export declare const effect: typeof coreEffect; export declare function asyncEffect(fn: () => void): ReactiveEffectRunner<void>; /** * Trailing-only debounce: collapses a burst of dependency changes into a single run * `ms` milliseconds after the last change. The initial run (when the effect is created) * is immediate; only re-runs from subsequent dependency changes are debounced. */ export declare function debouncedEffect(fn: () => void, ms: number): ReactiveEffectRunner<void>; /** * Leading + trailing throttle: at most one run per `ms` milliseconds. Fires immediately * on the first dependency change of a window; if further changes happen during the * window, schedules one trailing run at window close. As above, the initial run is * immediate (it happens before any scheduler call). */ export declare function throttledEffect(fn: () => void, ms: number): ReactiveEffectRunner<void>;