Skip to content

Commit

Permalink
Merge pull request #73 from marbemac/mbm/fix-persist-type
Browse files Browse the repository at this point in the history
fix: allow partial persist states
  • Loading branch information
zbeyens authored Apr 18, 2024
2 parents 22dab88 + bb2be72 commit c86c8e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eighty-deers-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'zustand-x': patch
---

Support partial state objects in the persist typings
2 changes: 1 addition & 1 deletion packages/zustand-x/src/types/CreateStoreOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ export interface CreateStoreOptions<T extends State> {
/**
* Persist middleware options.
*/
persist?: PersistOptions<T>;
persist?: PersistOptions<Partial<T>>;
}

0 comments on commit c86c8e8

Please sign in to comment.