Skip to content

Commit fe3d1e8

Browse files
authored
Merge pull request #2480 from reduxjs/feature/devtools-30-options
2 parents ee86c42 + 55eed7a commit fe3d1e8

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

packages/toolkit/src/devtoolsExtension.ts

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,26 @@ export interface EnhancerOptions {
2929
*/
3030
maxAge?: number
3131
/**
32-
* See detailed documentation at https://github.com/reduxjs/redux-devtools/blob/%40redux-devtools/extension%403.2.1/extension/docs/API/Arguments.md#serialize
32+
* - `undefined` - will use regular `JSON.stringify` to send data (it's the fast mode).
33+
* - `false` - will handle also circular references.
34+
* - `true` - will handle also date, regex, undefined, error objects, symbols, maps, sets and functions.
35+
* - object, which contains `date`, `regex`, `undefined`, `error`, `symbol`, `map`, `set` and `function` keys.
36+
* For each of them you can indicate if to include (by setting as `true`).
37+
* For `function` key you can also specify a custom function which handles serialization.
38+
* See [`jsan`](https://github.com/kolodny/jsan) for more details.
3339
*/
3440
serialize?:
3541
| boolean
3642
| {
37-
options?:
38-
| boolean
39-
| {
40-
date?: boolean
41-
regex?: boolean
42-
undefined?: boolean
43-
error?: boolean
44-
symbol?: boolean
45-
map?: boolean
46-
set?: boolean
47-
function?: boolean | Function
48-
}
49-
replacer?: (key: string, value: unknown) => unknown
50-
reviver?: (key: string, value: unknown) => unknown
51-
immutable?: unknown
52-
refs?: unknown[]
43+
date?: boolean
44+
regex?: boolean
45+
undefined?: boolean
46+
error?: boolean
47+
symbol?: boolean
48+
map?: boolean
49+
set?: boolean
50+
// eslint-disable-next-line @typescript-eslint/ban-types
51+
function?: boolean | Function
5352
}
5453
/**
5554
* function which takes `action` object and id number as arguments, and should return `action` object back.
@@ -62,16 +61,28 @@ export interface EnhancerOptions {
6261
/**
6362
* *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).
6463
* If `actionsWhitelist` specified, `actionsBlacklist` is ignored.
64+
* @deprecated Use actionsDenylist instead.
6565
*/
6666
actionsBlacklist?: string | string[]
6767
/**
6868
* *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).
6969
* If `actionsWhitelist` specified, `actionsBlacklist` is ignored.
70+
* @deprecated Use actionsAllowlist instead.
7071
*/
7172
actionsWhitelist?: string | string[]
73+
/**
74+
* *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).
75+
* If `actionsAllowlist` specified, `actionsDenylist` is ignored.
76+
*/
77+
actionsDenylist?: string | string[]
78+
/**
79+
* *string or array of strings as regex* - actions types to be hidden / shown in the monitors (while passed to the reducers).
80+
* If `actionsAllowlist` specified, `actionsDenylist` is ignored.
81+
*/
82+
actionsAllowlist?: string | string[]
7283
/**
7384
* 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.
74-
* Use it as a more advanced version of `actionsBlacklist`/`actionsWhitelist` parameters.
85+
* Use it as a more advanced version of `actionsDenylist`/`actionsAllowlist` parameters.
7586
*/
7687
predicate?: <S, A extends Action>(state: S, action: A) => boolean
7788
/**

0 commit comments

Comments
 (0)