-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
example of state merging in reducer not compliant with TS v2.4 #4
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
Comments
Hi @khell, Have you checked the playground link to play with it yourself (the goodReducer example)? It will probably break in next release v2.4 because they changed how spread is typed, but I'm working on that and will update the guide accordingly. |
Ah, I was using Typescript 2.4 somehow and ran into microsoft/TypeScript#16509. Thanks for the assistance. |
@khell no problem, it's good that you have pointed out an issue as this is something that need to be revised and handled for v2.4 |
the related issue is fixed microsoft/TypeScript#16509 |
also the guide was updated to reflect the changes and the problem does not exist anymore :) |
Hi,
Thank you for the guide.
How would you recommend the example on "Spread operation with Exact Types check to guard against excess or mismatched props" be used with strictNullChecks? As a
Partial
makes all properties nullable, it is required to define all State in this form:This is the same as effectively switching strictNullChecks off. Is there any other way?
Cheers.
The text was updated successfully, but these errors were encountered: