-
Notifications
You must be signed in to change notification settings - Fork 71
/
index.d.ts
36 lines (29 loc) · 896 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
declare module 'redux-persist-filesystem-storage' {
interface Options {
storagePath: string
encoding: string
toFileName: (name: string) => string
fromFileName: (name: string) => string
}
const FilesystemStorage: {
config: (customOptions: Partial<Options>) => Options
setItem: (
key: string,
value: string,
callback?: (error?: Error) => void,
) => Promise<void>
getItem: (
key: string,
callback?: (error?: Error, result?: string) => void,
) => Promise<string | undefined>
removeItem: (
key: string,
callback?: (error?: Error) => void,
) => Promise<undefined>
getAllKeys: (
callback?: (error?: Error, keys?: Array<string>) => void,
) => Promise<string[]> | Promise<undefined>
clear: (callback?: (error?: Error) => void) => Promise<boolean>
}
export default FilesystemStorage
}