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.
40 lines (39 loc) • 1.67 kB
TypeScript
import { Epps } from "../plugins/epps";
import { DefineEppsStoreOtions } from "../utils/store";
import type { Store as PiniaStore, StateTree } from "pinia";
import type { AnyObject, EppsStore } from "../types";
import type { EppsStoreOptions, StatePropertyValue } from "../types/store";
export default class Store {
private _debug;
private _options?;
private _store;
protected _watchedStore?: string[];
get debug(): boolean;
set debug(debug: boolean);
get options(): EppsStoreOptions | Epps | undefined;
get parentsStores(): EppsStore<AnyObject, AnyObject>[] | undefined;
get state(): StateTree;
set state(state: StateTree);
get store(): AnyObject;
constructor(store: PiniaStore, options: DefineEppsStoreOtions, debug?: boolean);
/**
* Add properties to state
* @param {string[]} properties
* @param {AnyObject|undefined} values
*/
addPropertiesToState(properties: string[], values?: AnyObject): void;
/**
* Add property to state
* @param name
* @param value
*/
addToState(name: string, value?: StatePropertyValue): void;
debugLog(message: string, args: any): void;
getOption(optionName: keyof EppsStoreOptions | keyof EppsStoreOptions['persist']): string[] | import("../types/store").PersistedStoreOptions | ((childId?: string) => EppsStore<AnyObject, AnyObject>[]) | import("../plugins/parentStore").default[] | undefined;
getStatePropertyValue(propertyName: string): any;
getStoreName(): string;
getValue(value: AnyObject): any;
isOptionApi(): boolean;
stateHas(property: string): boolean;
storeHas(property: string): boolean;
}