/** * Store plugins API. */ import type { Store, StoreDefinition, StorePlugin } from './types'; /** * Registers a plugin that extends all stores. * * @param plugin - The plugin function */ export declare const registerPlugin: (plugin: StorePlugin) => void; /** * Unregisters a previously registered plugin. * * Removes the first matching registration by reference identity. Subsequent * stores created via `defineStore()` will no longer receive the plugin's * extensions; already-created stores keep any previously applied extensions. * * @param plugin - The plugin function passed to {@link registerPlugin} * @returns `true` if the plugin was found and removed, `false` otherwise * * @example * ```ts * import { registerPlugin, unregisterPlugin } from '@bquery/bquery/store'; * * const logger = ({ store }) => { * store.$subscribe(console.log); * }; * * registerPlugin(logger); * // …later * unregisterPlugin(logger); // → true * ``` */ export declare const unregisterPlugin: (plugin: StorePlugin) => boolean; /** * Removes all registered store plugins. * * Useful in test teardown to ensure plugin state does not leak between * test cases or between independently authored test files. * * @example * ```ts * import { clearPlugins } from '@bquery/bquery/store'; * * afterEach(() => clearPlugins()); * ``` */ export declare const clearPlugins: () => void; /** @internal */ export declare const applyPlugins: (store: Store, options: StoreDefinition) => void; //# sourceMappingURL=plugins.d.ts.map