You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the src/index.d.ts file there is a patch for redux module
/** * Redux behaviour changed by middleware, so overloads here */declare module 'redux'{/** * Overload for bindActionCreators redux function, returns expects responses * from thunk actions */functionbindActionCreators<TActionCreatorsextendsActionCreatorsMapObject<any>>(actionCreators: TActionCreators,dispatch: Dispatch,): {[TActionCreatorNameinkeyofTActionCreators]: ReturnType<TActionCreators[TActionCreatorName]>extendsThunkAction<any,any,any,any>
? (
...args: Parameters<TActionCreators[TActionCreatorName]>)=>ReturnType<ReturnType<TActionCreators[TActionCreatorName]>>
: TActionCreators[TActionCreatorName];};/* * Overload to add thunk support to Redux's dispatch() function. * Useful for react-redux or any other library which could use this type. */exportinterfaceDispatch<AextendsAction=AnyAction>{<TReturnType=any,TState=any,TExtraThunkArg=any>(thunkAction: ThunkAction<TReturnType,TState,TExtraThunkArg,A>,): TReturnType;}}
but after installing package I don't see this code in types for package. Here is index.d.ts from node_modules/redux-thunk
Question
In the
src/index.d.ts
file there is a patch forredux
modulebut after installing package I don't see this code in types for package. Here is
index.d.ts
fromnode_modules/redux-thunk
it doesn't allow to dispatch thunk-action creators. Any reasons about this?
The text was updated successfully, but these errors were encountered: