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 declarations incompatible with Redux 4.0 #492

Closed
codeaid opened this issue Apr 24, 2018 · 3 comments
Closed

TypeScript declarations incompatible with Redux 4.0 #492

codeaid opened this issue Apr 24, 2018 · 3 comments

Comments

@codeaid
Copy link

codeaid commented Apr 24, 2018

Devtools seem to be broken after updating Redux to v4. I am now getting the following error:

/path/to/project/node_modules/redux-devtools-extension/index.d.ts
(1,32): Module '"/path/to/project/node_modules/redux/index"' has no exported member 'GenericStoreEnhancer'.

So far I haven't found a way to fix it so ended up uninstalling redux-devtools-extension to be able to use the latest version of Redux but, obviously, it would be nice to have the tools working again!

@mfellner
Copy link

I believe the answer is in this issue reduxjs/redux#2740. In the meantime you can "patch" the type declarations by adding your own redux.d.ts:

import * as redux from 'redux';

declare module 'redux' {
  export type GenericStoreEnhancer = any;
}

@codeaid
Copy link
Author

codeaid commented Apr 27, 2018

It looks like GenericStoreEnhancer was removed and reverted to be StoreEnhancer<N>.

Sounds to me like this library does need to be updated after all as I don't think they'll bring the deleted type back.

@codeaid
Copy link
Author

codeaid commented Apr 27, 2018

Pushed a pull request #493 to get this sorted quicker.

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

Successfully merging a pull request may close this issue.

3 participants