mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
31 lines
749 B
TypeScript
31 lines
749 B
TypeScript
import { applyMiddleware } from "redux";
|
|
import immutableStateInvariantMiddleware from "redux-immutable-state-invariant";
|
|
|
|
// without options
|
|
applyMiddleware(immutableStateInvariantMiddleware());
|
|
|
|
// with an empty options object
|
|
applyMiddleware(immutableStateInvariantMiddleware({}));
|
|
|
|
// with isImmutable option
|
|
applyMiddleware(immutableStateInvariantMiddleware({
|
|
isImmutable: (val) => val === 'something'
|
|
}));
|
|
|
|
// with ignore option
|
|
applyMiddleware(immutableStateInvariantMiddleware({
|
|
ignore: [
|
|
'foo',
|
|
'bar.thingsToIgnore'
|
|
]
|
|
}));
|
|
|
|
// with all options
|
|
applyMiddleware(immutableStateInvariantMiddleware({
|
|
isImmutable: (val) => val === 'something',
|
|
ignore: [
|
|
'foo',
|
|
'bar.thingsToIgnore'
|
|
]
|
|
}));
|