import { Action , Reducer } from 'redux' ; import getInitialState from './getInitialState' ; param reducer param actions export default function reduceActions < S , A extends Action , AS extends A [ ] > ( reducer , ... actions ) { const initialState = getInitialState ( reducer ) ; return actions . reduce ( reducer , initialState ) ; }