(r: Reducer<S, A>)
| 1013 | initialState?: PreloadedState<S> |
| 1014 | ) => { |
| 1015 | function liftReducer(r: Reducer<S, A>) { |
| 1016 | if (typeof r !== 'function') { |
| 1017 | if (r && typeof (r as { default: unknown }).default === 'function') { |
| 1018 | throw new Error( |
| 1019 | 'Expected the reducer to be a function. ' + |
| 1020 | 'Instead got an object with a "default" field. ' + |
| 1021 | 'Did you pass a module instead of the default export? ' + |
| 1022 | 'Try passing require(...).default instead.' |
| 1023 | ); |
| 1024 | } |
| 1025 | throw new Error('Expected the reducer to be a function.'); |
| 1026 | } |
| 1027 | return liftReducerWith<S, A, MonitorState, MonitorAction>( |
| 1028 | r, |
| 1029 | initialState, |
| 1030 | monitorReducer, |
| 1031 | options as unknown as Options<S, A, MonitorState, MonitorAction> |
| 1032 | ); |
| 1033 | } |
| 1034 | |
| 1035 | const liftedStore = createStore(liftReducer(reducer)); |
| 1036 | if ( |
no test coverage detected