import type { LazyService } from "./lazy-service"; export interface LazyRegistration { id: string; event: string; service: LazyService<{ handle(event: TEvent, context: TContext): void | Promise; }>; delivery: "await" | "buffer"; } export interface LazyRegistrationDispatcherOptions { maxBufferedPerRegistration?: number; /** Dropped buffered events resolve without delivery after this callback, when provided. */ onDropped?(info: { registrationId: string; event: string; droppedCount: number; }): void; } export declare function createLazyRegistrationDispatcher(opts?: LazyRegistrationDispatcherOptions): { register(reg: LazyRegistration): () => void; dispatch(event: string, payload: TEvent, context: TContext): Promise; dispose(): Promise; };