| 1 | import {Action, ActionCreator, StoreEnhancer, compose} from "redux"; |
| 2 | |
| 3 | export interface EnhancerOptions { |
| 4 | /** |
| 5 | * the instance name to be showed on the monitor page. Default value is `document.title`. |
| 6 | * If not specified and there's no document title, it will consist of `tabId` and `instanceId`. |
| 7 | */ |
| 8 | name?: string; |
| 9 | /** |
| 10 | * action creators functions to be available in the Dispatcher. |
| 11 | */ |
| 12 | actionCreators?: ActionCreator<any>[] | {[key: string]: ActionCreator<any>}; |
| 13 | /** |
| 14 | * if more than one action is dispatched in the indicated interval, all new actions will be collected and sent at once. |
| 15 | * It is the joint between performance and speed. When set to `0`, all actions will be sent instantly. |
| 16 | * Set it to a higher value when experiencing perf issues (also `maxAge` to a lower value). |
| 17 | * |
| 18 | * @default 500 ms. |
| 19 | */ |
| 20 | latency?: number; |
| 21 | /** |
| 22 | * (> 1) - maximum allowed actions to be stored in the history tree. The oldest actions are removed once maxAge is reached. It's critical for performance. |
| 23 | * |
| 24 | * @default 50 |
| 25 | */ |
| 26 | maxAge?: number; |
| 27 | /** |
| 28 | * - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode). |
| 29 | * - `false` - will handle also circular references. |
| 30 | * - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions. |
| 31 | * - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys. |
| 32 | * For each of them you can indicate if to include (by setting as `true`). |
| 33 | * For `function` key you can also specify a custom function which handles serialization. |
| 34 | * See [`jsan`](https://github.com/kolodny/jsan) for more details. |
| 35 | */ |
| 36 | serialize?: boolean | { |
| 37 | date?: boolean; |
| 38 | regex?: boolean; |
| 39 | undefined?: boolean; |
| 40 | error?: boolean; |
| 41 | symbol?: boolean; |
| 42 | map?: boolean; |
| 43 | set?: boolean; |
| 44 | function?: boolean | Function; |
| 45 | }; |
| 46 | /** |
| 47 | * function which takes `action` object and id number as arguments, and should return `action` object back. |
| 48 | */ |
| 49 | actionSanitizer?: <A extends Action>(action: A, id: number) => A; |
| 50 | /** |
| 51 | * function which takes `state` object and index as arguments, and should return `state` object back. |
| 52 | */ |
| 53 | stateSanitizer?: <S>(state: S, index: number) => S; |
| 54 | /** |
| 55 | * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers). |
| 56 | * If `actionsWhitelist` specified, `actionsBlacklist` is ignored. |
| 57 | */ |
| 58 | actionsBlacklist?: string | string[]; |
| 59 | /** |
| 60 | * *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers). |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…