1 |
|
2 |
|
3 |
|
4 | import { Mutation, Payload, Plugin } from 'vuex';
|
5 | import { AsyncStorage } from './AsyncStorage';
|
6 | import { MockStorage } from './MockStorage';
|
7 | import { PersistOptions } from './PersistOptions';
|
8 | import { MergeOptionType } from './utils';
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class VuexPersistence<S> implements PersistOptions<S> {
|
14 | asyncStorage: boolean;
|
15 | storage: Storage | AsyncStorage | undefined;
|
16 | restoreState: (key: string, storage?: AsyncStorage | Storage) => Promise<S> | S;
|
17 | saveState: (key: string, state: {}, storage?: AsyncStorage | Storage) => Promise<void> | void;
|
18 | reducer: (state: S) => Partial<S>;
|
19 | key: string;
|
20 | filter: (mutation: Payload) => boolean;
|
21 | modules: string[];
|
22 | strictMode: boolean;
|
23 | supportCircular: boolean;
|
24 | mergeOption: MergeOptionType;
|
25 | |
26 |
|
27 |
|
28 | plugin: Plugin<S>;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | RESTORE_MUTATION: Mutation<S>;
|
34 | subscribed: boolean;
|
35 | private _mutex;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | constructor(options?: PersistOptions<S>);
|
43 | /**
|
44 | * Creates a subscriber on the store. automatically is used
|
45 | * when this is used a vuex plugin. Not for manual usage.
|
46 | * @param store
|
47 | */
|
48 | private subscriber;
|
49 | }
|
50 | export { MockStorage, AsyncStorage, PersistOptions };
|
51 | export default VuexPersistence;
|