epps
Version:
Enhances Pinia stores with advanced features such as persistence, encryption, and store extension. Simplifies state management and ensures data security for Vue.js and Nuxt applications.
23 lines (22 loc) • 772 B
TypeScript
import Crypt from "../services/Crypt";
import Persister from "../services/Persister";
import type { AllowedKeyPath } from "../types/storage";
import type { PiniaPluginContext, StateTree } from "pinia";
export interface EppsConstructorProps {
dbName?: string;
dbKeyPath?: AllowedKeyPath;
cryptKey?: string;
debug?: boolean;
}
export declare class EppsPlugin {
private _db?;
private _debug;
private _crypt?;
private _watchedStore;
get db(): Persister | undefined;
get crypt(): Crypt | undefined;
constructor(db?: Persister, crypt?: Crypt, debug?: boolean);
private eppsStoreNotDefinedByOptions;
plugin(context: PiniaPluginContext): void;
rewriteResetStore({ store }: PiniaPluginContext, initState: StateTree): void;
}