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) • 1.16 kB
TypeScript
import { type IItemStoreState } from "./item";
import type { CollectionState, CollectionStoreMethods, ExtendedState } from "../types/store";
import type { List } from "../models/liste";
export type ListStoreState = IItemStoreState & ExtendedState & CollectionState<List>;
/**
export const useListStore = (id: string | number) => defineStore(`list-${id}`, {
state: (): ListStoreState => ({
...extendedState(
[useItemStore(`list-item-${id}`), useCollectionStore(`list-${id}-items`)]
),
guest: [],
owner: undefined,
type: undefined
}),
})
*/
export declare const useListStore: (id: string | number) => Partial<CollectionStoreMethods> & Partial<ListStoreState> & Partial<import("../types/store").PersistedState> & Partial<import("../types/store").PersistedStore> & import("pinia")._StoreWithState<string, {}, {}, {}> & {} & {} & import("pinia").PiniaCustomProperties<string, {}, {}, {}> & import("pinia").PiniaCustomStateProperties<{}> & import("pinia").PiniaCustomProperties<string, import("pinia").StateTree, import("pinia")._GettersTree<import("pinia").StateTree>, import("pinia")._ActionsTree>;