import { FilterMemberNames, Func, mixin } from '@fuselab/ui-shared/lib/typeHelpers'; import { Action, Dispatch } from 'redux'; function dispatchActions(actionCreators: T, dispatch: Dispatch, ...methods: FilterMemberNames>[]): T { return mixin( actionCreators, (x: Action) => { dispatch(x); return x; }, ...methods); } export default dispatchActions;