1 | import { ActionReducer, Action } from '@ngrx/store';
|
2 | import { InjectionToken } from '@angular/core';
|
3 | export declare type ActionSanitizer = (action: Action, id: number) => Action;
|
4 | export declare type StateSanitizer = (state: any, index: number) => any;
|
5 | export declare type SerializationOptions = {
|
6 | options?: boolean | any;
|
7 | replacer?: (key: any, value: any) => {};
|
8 | reviver?: (key: any, value: any) => {};
|
9 | immutable?: any;
|
10 | refs?: Array<any>;
|
11 | };
|
12 | export declare type Predicate = (state: any, action: Action) => boolean;
|
13 | /**
|
14 | * Chrome extension documentation
|
15 | * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md#features
|
16 | * Firefox extension documentation
|
17 | * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md#features
|
18 | */
|
19 | export interface DevToolsFeatureOptions {
|
20 | /**
|
21 | * Start/pause recording of dispatched actions
|
22 | */
|
23 | pause?: boolean;
|
24 | /**
|
25 | * Lock/unlock dispatching actions and side effects
|
26 | */
|
27 | lock?: boolean;
|
28 | /**
|
29 | * Persist states on page reloading
|
30 | */
|
31 | persist?: boolean;
|
32 | /**
|
33 | * Export history of actions in a file
|
34 | */
|
35 | export?: boolean;
|
36 | /**
|
37 | * Import history of actions from a file
|
38 | */
|
39 | import?: 'custom' | boolean;
|
40 | /**
|
41 | * Jump back and forth (time travelling)
|
42 | */
|
43 | jump?: boolean;
|
44 | /**
|
45 | * Skip (cancel) actions
|
46 | */
|
47 | skip?: boolean;
|
48 | /**
|
49 | * Drag and drop actions in the history list
|
50 | */
|
51 | reorder?: boolean;
|
52 | /**
|
53 | * Dispatch custom actions or action creators
|
54 | */
|
55 | dispatch?: boolean;
|
56 | /**
|
57 | * Generate tests for the selected actions
|
58 | */
|
59 | test?: boolean;
|
60 | }
|
61 | /**
|
62 | * Chrome extension documentation
|
63 | * @see https://github.com/reduxjs/redux-devtools/blob/main/extension/docs/API/Arguments.md
|
64 | * Firefox extension documentation
|
65 | * @see https://github.com/zalmoxisus/redux-devtools-extension/blob/master/docs/API/Arguments.md
|
66 | */
|
67 | export declare class StoreDevtoolsConfig {
|
68 | /**
|
69 | * Maximum allowed actions to be stored in the history tree (default: `false`)
|
70 | */
|
71 | maxAge: number | false;
|
72 | monitor?: ActionReducer<any, any>;
|
73 | /**
|
74 | * Function which takes `action` object and id number as arguments, and should return `action` object back.
|
75 | */
|
76 | actionSanitizer?: ActionSanitizer;
|
77 | /**
|
78 | * Function which takes `state` object and index as arguments, and should return `state` object back.
|
79 | */
|
80 | stateSanitizer?: StateSanitizer;
|
81 | /**
|
82 | * The instance name to be shown on the monitor page (default: `document.title`)
|
83 | */
|
84 | name?: string;
|
85 | serialize?: boolean | SerializationOptions;
|
86 | logOnly?: boolean;
|
87 | features?: DevToolsFeatureOptions;
|
88 | /**
|
89 | * Action types to be hidden in the monitors. If `actionsSafelist` specified, `actionsBlocklist` is ignored.
|
90 | */
|
91 | actionsBlocklist?: string[];
|
92 | /**
|
93 | * Action types to be shown in the monitors
|
94 | */
|
95 | actionsSafelist?: string[];
|
96 | /**
|
97 | * Called for every action before sending, takes state and action object, and returns true in case it allows sending the current data to the monitor.
|
98 | */
|
99 | predicate?: Predicate;
|
100 | /**
|
101 | * Auto pauses when the extension’s window is not opened, and so has zero impact on your app when not in use.
|
102 | */
|
103 | autoPause?: boolean;
|
104 | }
|
105 | export declare const STORE_DEVTOOLS_CONFIG: InjectionToken<StoreDevtoolsConfig>;
|
106 | /**
|
107 | * Used to provide a `StoreDevtoolsConfig` for the store-devtools.
|
108 | */
|
109 | export declare const INITIAL_OPTIONS: InjectionToken<StoreDevtoolsConfig>;
|
110 | export declare type StoreDevtoolsOptions = Partial<StoreDevtoolsConfig> | (() => Partial<StoreDevtoolsConfig>);
|
111 | export declare function noMonitor(): null;
|
112 | export declare const DEFAULT_NAME = "NgRx Store DevTools";
|
113 | export declare function createConfig(optionsInput: StoreDevtoolsOptions): StoreDevtoolsConfig;
|
114 |
|
\ | No newline at end of file |