mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Update templates to support TypeScript 'strict' mode
This commit is contained in:
committed by
Steve Sanderson
parent
8b37dc8561
commit
b8c006a3e9
@@ -1,4 +1,4 @@
|
||||
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer, Store } from 'redux';
|
||||
import { createStore, applyMiddleware, compose, combineReducers, GenericStoreEnhancer, Store, StoreEnhancerStoreCreator, ReducersMapObject } from 'redux';
|
||||
import thunk from 'redux-thunk';
|
||||
import { routerReducer, routerMiddleware } from 'react-router-redux';
|
||||
import * as StoreModule from './store';
|
||||
@@ -12,7 +12,7 @@ export default function configureStore(history: History, initialState?: Applicat
|
||||
const devToolsExtension = windowIfDefined && windowIfDefined.devToolsExtension as () => GenericStoreEnhancer;
|
||||
const createStoreWithMiddleware = compose(
|
||||
applyMiddleware(thunk, routerMiddleware(history)),
|
||||
devToolsExtension ? devToolsExtension() : f => f
|
||||
devToolsExtension ? devToolsExtension() : <S>(next: StoreEnhancerStoreCreator<S>) => next
|
||||
)(createStore);
|
||||
|
||||
// Combine all reducers and instantiate the app-wide store instance
|
||||
@@ -30,6 +30,6 @@ export default function configureStore(history: History, initialState?: Applicat
|
||||
return store;
|
||||
}
|
||||
|
||||
function buildRootReducer(allReducers) {
|
||||
function buildRootReducer(allReducers: ReducersMapObject) {
|
||||
return combineReducers<ApplicationState>(Object.assign({}, allReducers, { routing: routerReducer }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user