Skip to content

Commit a53ce56

Browse files
authored
fix(persist): introduce in-house synchronous Storage interface
1 parent ce53f11 commit a53ce56

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/createWebStoragePersister/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ import {
55
PersistRetryer,
66
} from '../persistQueryClient'
77

8+
interface Storage {
9+
getItem: (key: string) => string | null
10+
setItem: (key: string, value: string) => void
11+
removeItem: (key: string) => void
12+
}
13+
814
interface CreateWebStoragePersisterOptions {
915
/** The storage client used for setting and retrieving items from cache.
1016
* For SSR pass in `undefined`.

0 commit comments

Comments
 (0)