fix(middleware/persist): Fix the storage type (#1540)

* Fix the storage type

* Export StorageValue type
This commit is contained in:
MOZGIII 2023-01-14 03:41:35 +04:00 committed by GitHub
parent 4c5cddc9c6
commit 35c6f6c13a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
*