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

Generic type 'ThunkAction' requires 4 type argument(s). #88

Open
jguipi opened this issue Aug 30, 2018 · 4 comments
Open

Generic type 'ThunkAction' requires 4 type argument(s). #88

jguipi opened this issue Aug 30, 2018 · 4 comments

Comments

@jguipi
Copy link

jguipi commented Aug 30, 2018

I'm using typescript and when I added your library to my projet I got this error and it wont compile.
Even if I modify the code to add an argument It wont compile. Here's the error :

C:/Users/xxxxx/dev/react_project/node_modules/redux-i18n/index.d.ts
(53,116): Generic type 'ThunkAction' requires 4 type argument(s).

Here's my dependencies :

"dependencies": {
"react": "^16.4.2",
"react-dom": "^16.4.2",
"react-redux": "^5.0.7",
"react-router-dom": "^4.3.1",
"react-scripts-ts": "2.17.0",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.5",
"redux-i18n": "^1.5.13",
"redux-saga": "^0.16.0",
"redux-thunk": "^2.3.0",
"save-dev": "^2.0.0"
}
@veldman
Copy link

veldman commented Sep 3, 2018

Workaround is to install [email protected] which will install version 2.1.2 of redux-thunk:

npm install --save [email protected]

@jguipi
Copy link
Author

jguipi commented Sep 13, 2018

with version 2.1.2 im still getting :Generic type 'Dispatch<A, S>' requires 2 type argument(s).

@veldman
Copy link

veldman commented Sep 13, 2018

This is probably unrelated to that change though. Do you have a full trace ? @jguipi

@jguipi
Copy link
Author

jguipi commented Sep 13, 2018

For some reason i modify the code to add an extra argument again and it worked. I dont know why it worked this time but i'm good now.
To make it work I edited : C:\Users\userxxxxx\dev\project-namet\node_modules\redux-i18n\index.d.ts

I made the line 53 look like this: export function setTranslations(translations: ITranslations, languageOrOptions?: IlanguageOrOptions | string): ThunkAction<any, any, any, any>

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

No branches or pull requests

2 participants