import { Action , combineReducers , Reducer , ReducersMapObject } from 'redux' ; import globalDataReducer from './globalDataReducer' ; export type GenericAction = Action ; export default function setupReducers < S , A extends Action > ( reducers ? ) { if ( reducers && ( reducers as any ) . global ) { throw new Error ( `Reducer clashes with FLAGSHIP reducer on key [global]` ) ; } return combineReducers < S , A > ( { ... reducers as any , global : globalDataReducer } ) ; }