diff --git a/extend-redux.d.ts b/extend-redux.d.ts index 57cf263..3b5a540 100644 --- a/extend-redux.d.ts +++ b/extend-redux.d.ts @@ -1,4 +1,4 @@ -import { ThunkAction } from './src/index'; +import { ThunkAction } from './src/index' /** * Globally alter the Redux `bindActionCreators` and `Dispatch` types to assume @@ -16,27 +16,27 @@ declare module 'redux' { * from thunk actions */ function bindActionCreators< - TActionCreators extends ActionCreatorsMapObject + ActionCreators extends ActionCreatorsMapObject >( - actionCreators: TActionCreators, - dispatch: Dispatch, + actionCreators: ActionCreators, + dispatch: Dispatch ): { - [TActionCreatorName in keyof TActionCreators]: ReturnType< - TActionCreators[TActionCreatorName] + [ActionCreatorName in keyof ActionCreators]: ReturnType< + ActionCreators[ActionCreatorName] > extends ThunkAction ? ( - ...args: Parameters - ) => ReturnType> - : TActionCreators[TActionCreatorName]; - }; + ...args: Parameters + ) => ReturnType> + : ActionCreators[ActionCreatorName] + } /* * Overload to add thunk support to Redux's dispatch() function. * Useful for react-redux or any other library which could use this type. */ export interface Dispatch { - ( - thunkAction: ThunkAction, - ): TReturnType; + ( + thunkAction: ThunkAction + ): ReturnType } }