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.

18 lines (17 loc) 718 B
import type { EppsStore, ExtendedState } from "../types/store"; import type { Store } from "pinia"; import { type Ref } from "vue"; export interface ExtendedStateOptions { actionsToExtends?: string[]; isExtended?: boolean; isOptionApi?: boolean; persist?: PersistOptions; } export interface PersistOptions { excludedKeys?: string[] | Ref<string[]>; isEncrypted?: boolean | Ref<boolean>; persist?: boolean | Ref<boolean>; persistedPropertiesToEncrypt?: string[] | Ref<string[]>; watchMutation?: boolean | Ref<boolean>; } export declare const extendedState: <TStore, TState>(parentsStoresProps: Store[] | EppsStore<TStore, TState>[], options?: ExtendedStateOptions) => ExtendedState;