signal-desktop/ts/state/reducer.ts
2019-03-12 17:44:14 -07:00

25 lines
634 B
TypeScript

import { combineReducers } from 'redux';
import { reducer as search, SearchStateType } from './ducks/search';
import {
ConversationsStateType,
reducer as conversations,
} from './ducks/conversations';
import { reducer as user, UserStateType } from './ducks/user';
export type StateType = {
search: SearchStateType;
conversations: ConversationsStateType;
user: UserStateType;
};
export const reducers = {
search,
conversations,
user,
};
// Making this work would require that our reducer signature supported AnyAction, not
// our restricted actions
// @ts-ignore
export const reducer = combineReducers(reducers);