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

TypeScript error for Reducer generic type #325

Closed
marclemagne opened this issue Jun 28, 2019 · 4 comments
Closed

TypeScript error for Reducer generic type #325

marclemagne opened this issue Jun 28, 2019 · 4 comments

Comments

@marclemagne
Copy link

Having trouble compiling TypeScript in my project because of this error:

ERROR in /Users/.../.../.../node_modules/connected-react-router/index.d.ts(96,7):
TS2314: Generic type 'Reducer' requires 1 type argument(s).

The type is described as:

export function connectRouter(history: History)
  : Reducer<RouterState, LocationChangeAction>

If I manually remove LocationChangeAction in the type file the application compiles and seemingly works fine.

Is there something I'm doing wrong here?

NOTE: Previously using "react-router-redux" but here because it recommends this library.

Here are some relevant dependencies from package.json:
"connected-react-router": "^6.4.0",
"react-redux": "^7.1.0",
"react-router-dom": "5.0.1",
"react": "16.8.6"

I appreciate any help/advice. Thanks!

@rodrigopavezi
Copy link

@marclemagne how did you solve this issue?

@JakeBar
Copy link

JakeBar commented Sep 11, 2019

@marclemagne I'm also interested to know how you solved this

@qburst-sibil
Copy link

image
@marclemagne the changes are not pushed in the code. it is still there

@gavinsharp
Copy link

This error occurred when using combineReducers; it was fixed in #431 (released in v6.9.0).

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

5 participants