import { ActionCreator , Action , Dispatch , bindActionCreators , ActionCreatorsMapObject } from '../..' ; interface AddTodoAction extends Action { text : string ; } const addTodo = text => ( { type : 'ADD_TODO' , text } ) ; const addTodoAction = addTodo ( 'test' ) ; type AddTodoThunk = ( dispatch : Dispatch ) => AddTodoAction ; const addTodoViaThunk = text => ( _ ) => ( { type : 'ADD_TODO' , text } ) ; declare const dispatch ; function bound ( ) { const boundAddTodo = bindActionCreators ( addTodo , dispatch ) ; const dispatchedAddTodoAction = boundAddTodo ( 'test' ) ; const boundAddTodoViaThunk = bindActionCreators < ActionCreator < AddTodoThunk , [ string ] > , ActionCreator < AddTodoAction , [ string ] > > ( addTodoViaThunk , dispatch ) ; const dispatchedAddTodoViaThunkAction = boundAddTodoViaThunk ( 'test' ) ; const boundActionCreators = bindActionCreators ( { addTodo } , dispatch ) ; const otherDispatchedAddTodoAction = boundActionCreators . addTodo ( 'test' ) ; interface M extends ActionCreatorsMapObject { addTodoViaThunk : ActionCreator < AddTodoThunk , [ string ] > ; } interface N extends ActionCreatorsMapObject { addTodoViaThunk : ActionCreator < AddTodoAction , [ string ] > ; } const boundActionCreators2 = bindActionCreators < M , N > ( { addTodoViaThunk } , dispatch ) ; const otherDispatchedAddTodoAction2 = boundActionCreators2 . addTodoViaThunk ( 'test' ) ; }