import { Observable, Subscription } from 'rxjs'; import { ActionConfig } from '../action/action-config.interface.js'; import { ActionPacket } from '../action/action-packet.interface.js'; import { Action, ActionTuple } from '../action/action.class.js'; import { RootSlice, RootSliceOptions } from './slice.class.js'; /** * Defines a state scope on which actions act upon. The state machine is * scheduled by the scopes action dispatcher as reducers and plugins only * tick when an action is fired. */ export declare class Scope { private readonly schedulingDispatcher; private readonly actionMap; readonly schedulingDispatcher$: Observable; private readonly effectSubscriptions; private readonly stores; readonly slices: Map; constructor(); createAction(type: string, config?: Partial): Action; createRootSlice(initialState: State, rootSliceOptions?: RootSliceOptions): RootSlice; /** * Using this ensures packets returned by effects are reduced on next tick. * Otherwise the normal reducer could overwrite whatever the effect * is producing. * Let's say you'd write a typical useless machine, if the effect notices * you set a boolean state to true, it sets it back to false immediately. * Without this scheduling, the effects result could happen before the * triggering actions reduce and the state would be left as true. */ createEffect(action: Observable): Subscription; /** * Only used for cleanup */ registerRootSlice(store: RootSlice): void; registerAction(action: Action, registerFromAction?: boolean): Subscription | undefined; listen$(...actions: [...ActionTuple]): Observable>; listenAll$(): Observable; isRegistered(action?: Action | string): boolean; get closed(): boolean; complete(): void; } //# sourceMappingURL=scope.class.d.ts.map