-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(types): remove Partial
typo from persist
#1051
Conversation
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. Latest deployment of this branch, based on commit 8f66491:
|
Not sure why prettier in the CI has a non-zero exit. |
It says:
Can you run |
Ah so it's expected to exit non-zero because it's not formatted. I didn't catch that. I think it'd be nicer if the CI shows what exactly is ill-formatted (previously it used to do that). (Also |
Parital
typo from persist
Partial
typo from persist
I hope it to run this script. Line 71 in 1f1a422
Maybe it works differently with different yarn versions? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ah but the PR's package.json doesn't have that prettier script probably that's why it didn't work. |
Oh, then, please merge |
In #725 I fixed
persist
types by making the default persisted state same as the whole state (which reflects the default behavior), but looks like I forgot to removePartial
from one place.This is breaking change, it probably won't break for many people but a quickfix is to pass
partialize: s => s as Partial<typeof s>
in the options.Remember it's a "quickfix" that is "I don't want more strict types, give me the old types". So the correct fix might be something else depending on the code. And again "might" implies the quickfix could be correct fix, eg the fix I apply for a test in this PR is not a quickfix but a correct fix as the partialized state is truly
Partial<{ count: number }>
.