import Delegate from '../base/Delegate'; /** * EventBus delegate contract. * Provides a generic interface for event emission, * subscription, and optional cleanup. */ export interface EventBusDelegate> extends Delegate { /** Emit an event with its payload */ emit(type: K, payload: EventMap[K]): void; /** Subscribe to a specific event type */ on(type: K, handler: (payload: EventMap[K]) => void): { unsubscribe: () => void; }; /** Optional cleanup method */ clear?(): void; getValue?(): { type: string | undefined; payload: unknown; } | null; } export default EventBusDelegate;