-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Result of combineReducers
is not exportable with latest typescript
#4030
Comments
Opened this Issue at request of #4026 (comment) |
My first question is, why are you exporting it with an empty generic and an empty object? Does this happen with "normal" usage, ie, something like Also, if something about TS 4.2 changed how it's interpreting the types... I'd like to know what about TS 4.2 changed so that we know why this is suddenly causing an error. |
Updated error branch to give examples of failure with actual map. I too would like to know what the Typescript change is, but cannot easily find a related commit. |
Prior Issues
Attempt to fix by directly exporting $CombinedState #4029
What is the current behavior?
When typescript is upgraded to the latest version 4.2.x the output of
combineReducers
throws an error.Steps to Reproduce
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://codesandbox.io or similar.
What is the expected behavior?
See minimal reproducible error here: #4029
Checkout branch https://github.com/JacobLey/redux/tree/combinedStateRepro, run
cd ./error && npm start
Typescript should run, and emit error
Default export of the module has or is using private name '$CombinedState'
What should Redux be doing?
Exporting the result of
combineReducers
should not be a typescript error.Environment Details
To my knowledge, all versions of Redux with Typescript declarations are impacted.
More importantly, this change happens on the latest 4.2.x versions of Typescript.
The text was updated successfully, but these errors were encountered: