UNPKG

@empathyco/x-components

Version:
28 lines 1.45 kB
import { XBus } from '@empathyco/x-bus'; import { Store } from 'vuex'; import { AnySimpleStateSelector, AnyStateSelector } from '../store/utils/store-emitters.utils'; import { XEventsTypes } from '../wiring/events.types'; import { WireMetadata } from '../wiring/wiring.types'; import { 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 {@link @empathyco/x-bus#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