forked from pmndrs/zustand
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(types): improve types for setState (pmndrs#320)
* (types): improve types for setState instead of using Partial, which would allow setting every field to undefined, we infer the types of the values depending on the keys passed into the set function * (types): improve types for setState add code comment to clarify why we are using Pick<T, K> | T * (types): improve types for setState apply the same changes we did for SetState also to namedSet for the devtools middleware * (types): improve types for setState tests for the partial logic * empty commit Co-authored-by: daishi <[email protected]>
- Loading branch information
Showing
3 changed files
with
61 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters