UNPKG

@empathyco/x-components

Version:
27 lines 1.48 kB
import type { XModuleName } from '../x-modules/x-modules.types'; import type { NamespacedTimeWireOperator } from './namespaced-wiring.types'; /** * Type safe debounce operator which creates a function which can only access the Module of * the {@link https://vuex.vuejs.org/ | Vuex} Store passed as parameter. * * @param moduleName - The {@link XModuleName} to create the operator wire. * @returns A function which creates a wire that uses the {@link debounce} wire operator to * execute the `wire` after the time has passed without invoking it. This debounce time * is given by the execution of the `timeRetrieving` function. * * @public */ export declare function namespacedDebounce<ModuleName extends XModuleName>(moduleName: ModuleName): NamespacedTimeWireOperator<ModuleName>; /** * Type safe throttle operator which creates a function which can only access the Module of * the {@link https://vuex.vuejs.org/ | Vuex} Store passed as parameter. * * @param moduleName - The {@link XModuleName} to create the operator wire. * @returns A function which creates a wire that uses the {@link throttle} wire operator to * execute the `wire` once every couple of milliseconds. This throttle time is given by * the execution of the `timeRetrieving` function. * * @public */ export declare function namespacedThrottle<ModuleName extends XModuleName>(moduleName: ModuleName): NamespacedTimeWireOperator<ModuleName>; //# sourceMappingURL=namespaced-wires.operators.d.ts.map