import { combineReducers } from 'redux' ; import * as lineup from './lineup' ; import * as menu from './menu' ; import * as tables from './tables' ; export interface IAppState { lineup ? : lineup . ILineup ; menu ? : menu . IMenu ; tables ? : tables . ITables ; } ; export const rootReducer = combineReducers < IAppState > ( { lineup : lineup . lineupReducer , menu : menu . menuReducer , tables : tables . tableReducer } ) ; export function deimmutify ( state ) { return { lineup : lineup . deimmutifyLineup ( state . lineup ) , menu : menu . deimmutifyMenu ( state . menu ) , tables : tables . deimmutifyTables ( state . tables ) , } ; } export function reimmutify ( plain ) { return plain ? { lineup : lineup . reimmutifyLineup ( plain . lineup ) , menu : menu . reimmutifyMenu ( plain . menu ) , tables : tables . reimmutifyTables ( plain . tables ) , } : { } ; }