import { createStore, compose } from 'redux'; import { rootReducer } from './reducers'; declare global { interface Window { __REDUX_DEVTOOLS_EXTENSION__?: Function; __REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: typeof compose; } } export interface StoreState { bill: number; percentage: number; split: number; } export const store = createStore( rootReducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__(), );