mirror of
https://github.com/pmndrs/zustand.git
synced 2025-12-08 19:45:52 +00:00
fix(middleware/persist): Fix the storage type (#1540)
* Fix the storage type * Export StorageValue type
This commit is contained in:
parent
4c5cddc9c6
commit
35c6f6c13a
@ -6,7 +6,7 @@ export interface StateStorage {
|
||||
removeItem: (name: string) => void | Promise<void>
|
||||
}
|
||||
|
||||
type StorageValue<S> = {
|
||||
export type StorageValue<S> = {
|
||||
state: S
|
||||
version?: number
|
||||
}
|
||||
@ -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.
|
||||
*
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user