import EventEmitter from "event-emitter"; import { Service } from "../../index"; declare class ActionChannelSource { private readonly emitter; private readonly getSourcesCount; private readonly getDestinationsCount; private readonly options; private lastTimeoutRef; private last; private throttledDelayMs; private throttledDropCount; private initOptions; private createSourceMeta; constructor(config: { actionName: A; inject: { emitter: EventEmitter.Emitter; getSourcesCount: () => number; getDestinationsCount: () => number; }; options?: Service.ActionChannel.SourceOptions; }); readonly actionName: A; send(...args: P): void; } declare class ActionChannelDestination { private readonly emitter; private readonly listenersSet; private readonly options; private initOptions; constructor(config: { actionName: A; inject: { emitter: EventEmitter.Emitter; }; options?: Service.ActionChannel.DestinationOptions; }); readonly actionName: A; get listenersCount(): number; addListener(listener: Service.ActionChannel.Listener

): void; removeListener(listener: Service.ActionChannel.Listener

): void; removeAllListeners(): void; } export declare class ActionsChannelsService { private readonly channelsSources; private readonly channelsDestinations; private readonly emitter; private getChannelsCount; getSourceChannelsCount(actionName: string): number; getDestinationChannelsCount(actionName: string): number; createSource(actionName: A, options?: Service.ActionChannel.SourceOptions): ActionChannelSource; createDestination(actionName: A, options?: Service.ActionChannel.DestinationOptions): ActionChannelDestination; } declare module "../../index" { namespace Service.ActionChannel { type SourceMeta = { argsCount: number; sourcesCount: number; destinationsCount: number; sourceTag?: string; throttledDelayMs?: number; throttledDropCount?: number; }; type ListenerPayload

= { args: P; meta: SourceMeta; }; type Listener

= P extends Parameters ? (p: ListenerPayload

) => void : never; type SourceOptions = { rps?: number; tag?: string; }; type DestinationOptions = { tag?: string; }; } } export {}; //# sourceMappingURL=actions-channels-service.d.ts.map