/** * Created by championswimmer on 18/07/17. */ import { Mutation, Payload, Plugin } from 'vuex'; import { AsyncStorage } from './AsyncStorage'; import { MockStorage } from './MockStorage'; import { PersistOptions } from './PersistOptions'; import { MergeOptionType } from './utils'; /** * A class that implements the vuex persistence. * @type S type of the 'state' inside the store (default: any) */ export declare class VuexPersistence implements PersistOptions { asyncStorage: boolean; storage: Storage | AsyncStorage | undefined; restoreState: (key: string, storage?: AsyncStorage | Storage) => Promise | S; saveState: (key: string, state: {}, storage?: AsyncStorage | Storage) => Promise | void; reducer: (state: S) => Partial; key: string; filter: (mutation: Payload) => boolean; modules: string[]; strictMode: boolean; supportCircular: boolean; mergeOption: MergeOptionType; /** * The plugin function that can be used inside a vuex store. */ plugin: Plugin; /** * A mutation that can be used to restore state * Helpful if we are running in strict mode */ RESTORE_MUTATION: Mutation; subscribed: boolean; private _mutex; /** * Create a {@link VuexPersistence} object. * Use the plugin function of this class as a * Vuex plugin. * @param {PersistOptions} options */ constructor(options?: PersistOptions); /** * Creates a subscriber on the store. automatically is used * when this is used a vuex plugin. Not for manual usage. * @param store */ private subscriber; } export { MockStorage, AsyncStorage, PersistOptions }; export default VuexPersistence;