///
import { EventEmitter } from "events";
declare type listenFunctionType = (...args: unknown[]) => void;
export interface PubSubOptions {
eventEmitter?: EventEmitter;
}
export declare class PubSub {
private ee;
private subscriptions;
private subIdCounter;
constructor(options?: PubSubOptions);
publish(triggerName: string, payload: Record): Promise;
subscribe(triggerName: string, onMessage: listenFunctionType): Promise;
unsubscribe(subId: number): boolean;
asyncIterator(triggerNames: string | string[]): AsyncIterator;
}
export {};