import { z } from 'zod'; type SimpleMessageEvent = { type: string; data: { event: string; data: object; }; }; interface Transport { send(message: { event: K; data: z.infer; }): void; addMessageListener(listener: (event: SimpleMessageEvent | MessageEvent) => void): string; removeMessageListener(id: string): void; } type EventMap = Record; interface EventEmitterOptions { incomingEvents?: IncomingEvents; outgoingEvents?: OutgoingEvents; } interface SendActionOptions { timeoutMs?: number; intervalMs?: number; maxRetries?: number; condition?: (data: z.infer) => boolean; } type SendActionArgs = { event: K; data: z.infer; responseEvent: R; options?: SendActionOptions; }; interface OnActionOptions { timeoutMs?: number; condition?: (data: z.infer) => boolean; } type OnActionArgs = { event: K; responseEvent: R; callback: (data: z.infer) => z.infer; options?: OnActionOptions; } | { event: K; options?: OnActionOptions; }; declare class EventEmitter { protected transport: Transport; incomingEvents: IncomingEvents; outgoingEvents: OutgoingEvents; constructor(transport: Transport, incomingEvents: IncomingEvents, outgoingEvents: OutgoingEvents); send(event: K, data: z.infer): void; on(event: K, callback: (data: z.infer) => void): string; sendAction({ event, data, responseEvent, options, }: SendActionArgs): Promise>; onAction({ event, options, ...params }: OnActionArgs): Promise>; off(id: string): void; } export { type EventMap as E, type OnActionOptions as O, type SimpleMessageEvent as S, type Transport as T, type SendActionArgs as a, EventEmitter as b, type EventEmitterOptions as c, type SendActionOptions as d, type OnActionArgs as e };