import { FeatureFlyEvent, EventHandler, EventPayloadMap } from './types'; /** * Typed event emitter for FeatureFly SDK. * Allows consumers to subscribe to internal SDK events like flag changes, * cache hits/misses, circuit breaker state changes, etc. */ export declare class EventEmitter { private readonly listeners; /** * Subscribe to an event. Returns an unsubscribe function. */ on(event: E, handler: EventHandler): () => void; /** * Subscribe to an event once (auto-unsubscribes after first invocation). */ once(event: E, handler: EventHandler): () => void; /** * Emit an event to all registered listeners. */ emit(event: E, payload: EventPayloadMap[E]): void; /** * Remove all listeners for a specific event, or all events if no event is specified. */ removeAllListeners(event?: FeatureFlyEvent): void; /** * Get the count of listeners for a given event. */ listenerCount(event: FeatureFlyEvent): number; }