license import { Action } from "./Action" ; import { CompoundAction } from "./CompoundAction" ; import { Reducer } from "./Reducer" ; see compoundActionsEnhancer see CompoundAction export function reduceCompoundActions < S > ( delegate ) { const compoundReducer = ( state , action ) : S => { if ( CompoundAction . is ( action ) ) { return action . payload . reduce ( compoundReducer , state ) ; } else { return delegate ( state , action ) ; } } ; return compoundReducer ; }