@empathyco/x-components
Version:
Empathy X Components
27 lines • 1.41 kB
TypeScript
import type { Store } from 'vuex';
import type { AnySimpleStateSelector, AnyStateSelector } from '../store/utils/store-emitters.utils';
import type { XEventsTypes } from '../wiring/events.types';
import type { WireMetadata } from '../wiring/wiring.types';
import type { XBus } from '../x-bus';
import type { AnyXModule } from '../x-modules/x-modules.types';
/**
* Registers the store emitters, making them emit the event when the part of the state selected
* changes.
*
* @param xModule - The {@link XModule} to register its Store Emitters.
* @param bus - The XBus to emit the events by the Emitters.
* @param store - The Vuex store to access to state and getters to watch them.
* @internal
*/
export declare function registerStoreEmitters({ name, storeEmitters, storeModule }: AnyXModule, bus: XBus<XEventsTypes, WireMetadata>, store: Store<any>): void;
/**
* Checks if the type of the store emitter selector is simple or complex. This selector can be
* a function if it is simple or an object with the selector and other options if it is complex.
*
* @param stateSelector - The store emitter selector.
* @returns A boolean which flags if the stateSelector is simple (function) or complex (object).
*
* @internal
*/
export declare function isSimpleSelector(stateSelector: AnySimpleStateSelector | AnyStateSelector): stateSelector is AnySimpleStateSelector;
//# sourceMappingURL=x-emitters.d.ts.map