Skip to content

Commit

Permalink
fix(persist): introduce in-house synchronous Storage interface (#3673)
Browse files Browse the repository at this point in the history
  • Loading branch information
todorone committed Jun 6, 2022
1 parent ce53f11 commit ad82ee8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/createWebStoragePersister/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import {
PersistRetryer,
} from '../persistQueryClient'

interface Storage {
getItem: (key: string) => string | null
setItem: (key: string, value: string) => void
removeItem: (key: string) => void
}

interface CreateWebStoragePersisterOptions {
/** The storage client used for setting and retrieving items from cache.
* For SSR pass in `undefined`.
Expand Down

0 comments on commit ad82ee8

Please sign in to comment.