/** * Store factory helpers. */ import type { Store, StoreDefinition } from './types'; /** * Creates a store factory that returns the store instance. * * The store is lazily created on first call and cached in the global store * registry. Subsequent calls return the same instance. After calling * `destroyStore(id)`, the next factory call will create a fresh store. * * @param id - Store identifier * @param definition - Store definition without id * @returns A function that returns the store instance * * @example * ```ts * const useCounter = defineStore('counter', { * state: () => ({ count: 0 }), * actions: { increment() { this.count++; } }, * }); * * const counter = useCounter(); * counter.increment(); * ``` */ export declare const defineStore: , G extends Record = Record, A extends Record any> = Record>(id: string, definition: Omit, "id">) => (() => Store); //# sourceMappingURL=define-store.d.ts.map