Skip to content

Commit

Permalink
fix(middleware/persist): Fix the storage type (#1540)
Browse files Browse the repository at this point in the history
* Fix the storage type

* Export StorageValue type
  • Loading branch information
MOZGIII authored Jan 13, 2023
1 parent 4c5cddc commit 35c6f6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/middleware/persist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface StateStorage {
removeItem: (name: string) => void | Promise<void>
}

type StorageValue<S> = {
export type StorageValue<S> = {
state: S
version?: number
}
Expand Down Expand Up @@ -89,7 +89,7 @@ export interface PersistOptions<S, PersistedState = S> {
*
* @default createJSONStorage(() => localStorage)
*/
storage?: PersistStorage<S> | undefined
storage?: PersistStorage<PersistedState> | undefined
/**
* Filter the persisted value.
*
Expand Down

0 comments on commit 35c6f6c

Please sign in to comment.