/** * svelte-idb — Change Notifier * * Pub/sub system for mutation events with microtask batching. * When a store is mutated, subscribers are notified on the next microtask, * preventing excessive re-queries during batch operations. */ import type { ChangeEvent, ChangeSubscriber } from './types.js'; export declare class ChangeNotifier { private subscribers; private pendingStores; private scheduled; /** * Subscribe to change events for a specific store. * @returns An unsubscribe function. */ subscribe(storeName: string, callback: ChangeSubscriber): () => void; /** * Notify that a store was mutated. * Notifications are batched via microtask to coalesce rapid mutations. */ notify(storeName: string, _event: ChangeEvent): void; /** * Flush pending notifications — fires all subscribers once per affected store. */ private flush; /** Returns the number of active subscribers for a store (for testing). */ subscriberCount(storeName: string): number; }