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

Fix issue with combineReducer returning incorrect type when given a custom action #4765

Merged
merged 3 commits into from
Jan 23, 2025

Conversation

OliverJAsh
Copy link
Contributor

Fixes #4764. See issue for details.

Note I had to enable exactOptionalPropertyTypes to reproduce the bug in the test.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -20,6 +20,7 @@
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"exactOptionalPropertyTypes": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion, but would it make sense to move this into tsconfig.test.json instead?

Copy link
Contributor Author

@OliverJAsh OliverJAsh Jan 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that but then I couldn't think of a reason for it not to live here. It's probably better here because it increases strictness for the whole repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause issues with the type tests at some point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't now, though 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's probably okay for now but it might cause a hiccup or 2 at some point.

Reference

@OliverJAsh OliverJAsh requested a review from timdorr January 21, 2025 18:44
@OliverJAsh
Copy link
Contributor Author

Thanks @timdorr. I don't think I can merge this. Can you?

@timdorr
Copy link
Member

timdorr commented Jan 23, 2025

Welp, no one else has yelled at me, so I'll merge it in then. Thanks!

@timdorr timdorr merged commit fa9dc9d into reduxjs:master Jan 23, 2025
27 checks passed
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 this pull request may close these issues.

combineReducer has incorrect return type when given a custom action
3 participants