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.
35 lines (34 loc) • 1.18 kB
TypeScript
import type { Store as PiniaStore, StateTree } from "pinia";
import type { AnyObject, EppsStore } from "../types";
import type { StatePropertyValue } from "../types/store";
export default class Store {
private _debug;
private _store;
protected _watchedStore?: string[];
get debug(): boolean;
set debug(debug: boolean);
get parentsStores(): EppsStore<AnyObject, AnyObject>[] | undefined;
get state(): StateTree;
set state(state: StateTree);
get store(): AnyObject;
constructor(store: PiniaStore, 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;
getStatePropertyValue(propertyName: string): any;
getStoreName(): string;
getValue(value: AnyObject): any;
isOptionApi(): boolean;
stateHas(property: string): boolean;
storeHas(property: string): boolean;
}