UNPKG

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.

41 lines (40 loc) 1.88 kB
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 _deniedFirstChar; private _options?; private _store; 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; hasDeniedFirstChar(property: string): boolean; getOption(optionName: keyof EppsStoreOptions | keyof EppsStoreOptions['persist']): boolean | string[] | import("../types/epps").ActionFlows | Record<string, string> | import("../types/epps").ParentStoreInterface[] | import("../types/store").PersistedStoreOptions | ((mutation: import("pinia").SubscriptionCallbackMutationPatchFunction | import("pinia").SubscriptionCallbackMutationPatchObject<StateTree>) => void) | undefined; getStatePropertyValue(propertyName: string): any; getStoreName(): string; getValue(value: AnyObject): any; isOptionApi(): boolean; stateHas(property: string): boolean; storeHas(property: string): boolean; }