import type { IDecodedMessage, IDecoder } from "./message.js"; import type { IAsyncIterator, PubSubTopic, Unsubscribe } from "./misc.js"; import type { Callback } from "./protocols.js"; type ContentTopic = string; export type ActiveSubscriptions = Map; export interface IReceiver { toSubscriptionIterator: ( decoders: IDecoder | IDecoder[] ) => Promise>; subscribe: ( decoders: IDecoder | IDecoder[], callback: Callback ) => Unsubscribe | Promise; }