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

Error with redux 4.0.0: Type 'S' does not satisfy the constraint 'Action<any>' #32

Open
greengiraffe opened this issue Jul 8, 2018 · 10 comments

Comments

@greengiraffe
Copy link
Contributor

Using Redux 4.0.0 some errors occur while bundling a typescript/preact/preact-redux project.

Versions I'm using:

The errors:

ERROR in [at-loader] ./node_modules/preact-redux/src/preact-redux.d.ts:19:23
    TS2344: Type 'S' does not satisfy the constraint 'Action<any>'.

ERROR in [at-loader] ./node_modules/preact-redux/src/preact-redux.d.ts:214:25
    TS2344: Type 'S' does not satisfy the constraint 'Action<any>'.

I found a similar issue here: redux-observable/redux-observable#449

@greengiraffe greengiraffe changed the title Error with redux 4.0.0: Type 'keyof T' does not satisfy the constraint 'string' Error with redux 4.0.0: Type 'S' does not satisfy the constraint 'Action<any>' Jul 8, 2018
greengiraffe added a commit to greengiraffe/preact-redux that referenced this issue Jul 8, 2018
@4lph4-Ph4un
Copy link

Is there a fix coming? :)

@greengiraffe
Copy link
Contributor Author

@4lph4-Ph4un you can checkout my PR/Fork that fixes the issue: greengiraffe@e8a6835

@4lph4-Ph4un
Copy link

Ah excellent, thank you! :) is there a plan to integrate this into the master? I can patch that for my project that way, but just curious about its ETA :)

@pmkroeker
Copy link

Any plans on merging this? Would be super helpful instead of having to manually enter the changes in whenever I install it.

@developit
Copy link
Owner

Apologies! I'm not a redux or TypeScript user so I haven't been bitten by these issues yet. I'll take a look at the PR.

@developit
Copy link
Owner

I've merged the various PR's for type changes. Would you be able to test against master and see if the issues are fixed @greengiraffe @4lph4-Ph4un or @pmkroeker? Cheers.

@pmkroeker
Copy link

pmkroeker commented Dec 7, 2018

Just tested and it looks like its cleared all of the conflicts that I was having. Thanks @developit!

@greengiraffe
Copy link
Contributor Author

@developit Thanks for merging. I switched from Preact to React for other reasons so I can't test against master right now. I assume that if it works for @pmkroeker it will be fine.

@sanpoChew
Copy link

@developit would there be any chance of popping this out in a release? 🙏

@developit
Copy link
Owner

Yup.

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