Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typings don't work for redux@4.0.0 #11

Closed
septs opened this issue May 15, 2018 · 7 comments
Closed

Typings don't work for redux@4.0.0 #11

septs opened this issue May 15, 2018 · 7 comments

Comments

@septs
Copy link
Contributor

septs commented May 15, 2018

node_modules/typescript-fsa-redux-thunk/lib/index.d.ts:12:75 - error TS2314: Generic type 'Dispatch<A, S>' requires 2 type argument(s).

12 export declare type AsyncWorker<P, S, T, U = any> = (params: P, dispatch: Dispatch<T>, getState: () => T, extra: U) => MaybePromise<S>;
                                                                             ~~~~~~~~~~~

see reduxjs/redux#1342
see reduxjs/redux-thunk#169

@xdave
Copy link
Owner

xdave commented May 17, 2018

Hmm, I'm not currently requiring redux >=4 as a peer dependency, but perhaps I should.

@septs
Copy link
Contributor Author

septs commented May 21, 2018

I want to upgrade to redux@4.0.0

@xdave
Copy link
Owner

xdave commented May 22, 2018

@septs Working on it.

@xdave
Copy link
Owner

xdave commented May 24, 2018

@septs The typings for redux-thunk have not yet been updated to support redux@4.0.0. They're working on it, and I'm just waiting for the release. When it's updated, I'll fix.

@xdave
Copy link
Owner

xdave commented May 29, 2018

OK looks like redux-thunk 2.3.0 was released. I'll do some testing tonight.

@xdave
Copy link
Owner

xdave commented May 30, 2018

@septs I've published 2.0.0-beta.10, please try it out: npm i typescript-fsa-redux-thunk@beta.

FYI: See src/examples.ts for how to get store.dispatch() to work, as there were some breaking changes with redux-thunk@2.3.x.

@jussikinnula
Copy link

OK, I guess we could close the issue as "WON'T FIX". We are using workaround anyway at the moment, and we'll upgrade to v2 as soon as we can (in terms of "product development"). Thanks anyway! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants