UNPKG

1.64 kBTypeScriptView Raw
1import { ErrorHandler } from '@angular/core';
2import { Action, ActionReducer, UPDATE, INIT } from '@ngrx/store';
3import * as DevtoolsActions from './actions';
4import { StoreDevtoolsConfig } from './config';
5export type InitAction = {
6 readonly type: typeof INIT;
7};
8export type UpdateReducerAction = {
9 readonly type: typeof UPDATE;
10};
11export type CoreActions = InitAction | UpdateReducerAction;
12export type Actions = DevtoolsActions.All | CoreActions;
13export declare const INIT_ACTION: {
14 type: "@ngrx/store/init";
15};
16export declare const RECOMPUTE: "@ngrx/store-devtools/recompute";
17export declare const RECOMPUTE_ACTION: {
18 type: "@ngrx/store-devtools/recompute";
19};
20export interface ComputedState {
21 state: any;
22 error: any;
23}
24export interface LiftedAction {
25 type: string;
26 action: Action;
27}
28export interface LiftedActions {
29 [id: number]: LiftedAction;
30}
31export interface LiftedState {
32 monitorState: any;
33 nextActionId: number;
34 actionsById: LiftedActions;
35 stagedActionIds: number[];
36 skippedActionIds: number[];
37 committedState: any;
38 currentStateIndex: number;
39 computedStates: ComputedState[];
40 isLocked: boolean;
41 isPaused: boolean;
42}
43export declare function liftInitialState(initialCommittedState?: any, monitorReducer?: any): LiftedState;
44/**
45 * Creates a history state reducer from an app's reducer.
46 */
47export declare function liftReducerWith(initialCommittedState: any, initialLiftedState: LiftedState, errorHandler: ErrorHandler, monitorReducer?: any, options?: Partial<StoreDevtoolsConfig>): (reducer: ActionReducer<any, any>) => ActionReducer<LiftedState, Actions>;