/// import { EventEmitter } from 'events'; import { PubSubEngine } from './pubsub-engine'; export interface PubSubOptions { eventEmitter?: EventEmitter; } export declare class PubSub> extends PubSubEngine { protected ee: EventEmitter; private subscriptions; private subIdCounter; constructor(options?: PubSubOptions); publish(triggerName: K & string, payload: Events[K] extends never ? any : Events[K]): Promise; subscribe(triggerName: K & string, onMessage: (...args: any[]) => void): Promise; unsubscribe(subId: number): void; }