license import { StoreCreator } from "./StoreCreator" ; import { StoreEnhancer } from "./StoreEnhancer" ; import { reduceCompoundActions } from "./reduceCompoundActions" ; see CompoundAction see reduceCompoundActions export function compoundActionsEnhancer ( ) { return < S > ( next ) : StoreCreator < S > => { return ( reducer , initialState ) => { const store = next ( reduceCompoundActions ( reducer ) , initialState ) ; return { ... store , replaceReducer : ( newReducer ) => store . replaceReducer ( reduceCompoundActions ( newReducer ) ) , } ; } ; } ; }