Skip to content

Commit add9f2f

Browse files
authored
Add missing parameters to docs for serializable middleware (#510)
1 parent 261ff26 commit add9f2f

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

docs/api/getDefaultMiddleware.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,22 @@ interface SerializableStateInvariantMiddlewareOptions {
132132
*/
133133
ignoredActions?: string[]
134134

135+
/**
136+
* An array of dot-separated path strings to ignore when checking for serializability, Defaults to ['meta.arg']
137+
* If you use this parameter, the default value 'meta.arg' will be removed, so we recommend re-adding it unless you
138+
* specifically do not want to ignore it. Example: ['meta.arg', 'your.path', 'other.path', ...etc]
139+
*/
140+
ignoredActionPaths?: string[]
141+
135142
/**
136143
* An array of dot-separated path strings to ignore when checking for serializability, Defaults to []
137144
*/
138145
ignoredPaths?: string[]
146+
147+
/**
148+
* Execution time warning threshold. If the middleware takes longer than `warnAfter` ms, a warning will be displayed in the console. Defaults to 32
149+
*/
150+
warnAfter?: number
139151
}
140152

141153
interface GetDefaultMiddlewareOptions {

docs/api/otherExports.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ function createSerializableStateInvariantMiddleware({
8080
// An array of action types to ignore when checking for serializability.
8181
// Defaults to []
8282
ignoredActions?: string[]
83-
// An array of dot-separated path strings to ignore when checking for serializability.
84-
// Defaults to []
83+
// An array of dot-separated path strings to ignore when
84+
// checking for serializability, Defaults to ['meta.arg']
85+
ignoredActionPaths?: string[]
86+
// An array of dot-separated path strings to ignore when
87+
// checking for serializability, Defaults to []
8588
ignoredPaths?: string[]
89+
// Execution time warning threshold. If the middleware takes longer
90+
// than `warnAfter` ms, a warning will be displayed in the console. Defaults to 32
91+
warnAfter?: number
8692
})
8793
```
8894

0 commit comments

Comments
 (0)