Fix redux-devtools build

This commit is contained in:
Nathan Bierema 2023-12-25 00:24:27 -05:00
parent 0813b61b60
commit 4d014de5aa

View File

@ -1,6 +1,6 @@
import mapValues from 'lodash/mapValues'; import mapValues from 'lodash/mapValues';
import identity from 'lodash/identity'; import identity from 'lodash/identity';
import { Action, PreloadedState, Reducer, StoreEnhancer } from 'redux'; import { Action, Reducer, StoreEnhancer } from 'redux';
import { LiftedState } from '@redux-devtools/instrument'; import { LiftedState } from '@redux-devtools/instrument';
export default function persistState<S, A extends Action<string>, MonitorState>( export default function persistState<S, A extends Action<string>, MonitorState>(
@ -32,9 +32,9 @@ export default function persistState<S, A extends Action<string>, MonitorState>(
} }
return (next) => return (next) =>
<S2, A2 extends Action<string>>( <S2, A2 extends Action<string>, PreloadedState>(
reducer: Reducer<S2, A2>, reducer: Reducer<S2, A2, PreloadedState>,
initialState?: PreloadedState<S2>, initialState?: PreloadedState | undefined,
) => { ) => {
const key = `redux-dev-session-${sessionId}`; const key = `redux-dev-session-${sessionId}`;
@ -58,7 +58,7 @@ export default function persistState<S, A extends Action<string>, MonitorState>(
const store = next( const store = next(
reducer, reducer,
finalInitialState as PreloadedState<S2> | undefined, finalInitialState as PreloadedState | undefined,
); );
return { return {