import { Plugin } from 'vuex'; declare type ActionType = Mutation | { type: Mutation; serialize(v: any): string; deserialize(s: string): any; }; /** * 持久化 */ export declare class VuexPersistence { private namespace; private watchType; constructor(namespace?: string); watch(watchType: ActionType[]): Plugin; /** * 从持久化化中获取上次监听的一个值 * @param type 监听的action类型 */ get(type: Mutation): { /** * 给从被获取失败时增加一个默认值 * @param defaultVal 默认值 * @param mergeIfObject 为true时合并对象,在不同版本之间升级时类型改变,可以通过获取到旧的通通同时,让缺失的字段使用新的默认值 * @returns 处理的结果 */ or: (defaultVal: T, mergeIfObject?: boolean) => T; serializeVal: string | null; }; private set; private getStorageName; private getConf; } export {};