/** * Notification Manager - Reusable subscription and notification logic * * Provides a centralized way to manage subscribers and notifications * with automatic batching, error handling, and version tracking. */ type Subscriber = () => void; export declare class NotificationManager { #private; /** * Subscribe to notifications * @param fn - Callback to execute on notification * @returns Unsubscribe function */ subscribe(fn: Subscriber): () => void; /** * Notify all subscribers synchronously. * * Subscribers are responsible for routing themselves to the correct * scheduler (effectScheduler for effects, globalScheduler for components). * This must be synchronous so that cascading state changes inside the * effectScheduler drain loop are captured immediately. */ notify(): void; /** * Get current version number */ getVersion(): number; /** * Get number of subscribers */ get subscriberCount(): number; /** * Clear all subscribers */ clear(): void; } /** * Synchronous Notification Manager - For events that need immediate execution * * Unlike NotificationManager, this executes handlers synchronously * without batching or version tracking. Ideal for event systems. */ export declare class SyncNotificationManager { #private; /** * Subscribe to notifications * @param handler - Callback to execute on notification * @returns Unsubscribe function */ subscribe(handler: (data: T) => void): () => void; /** * Trigger all handlers synchronously with data * @param data - Data to pass to handlers */ trigger(data: T): void; /** * Get number of handlers */ get handlerCount(): number; /** * Clear all handlers */ clear(): void; } export {}; //# sourceMappingURL=notificationManager.d.ts.map