import type { IDecodedMessage, IDecoder } from "./message.js"; import type { IAsyncIterator, Unsubscribe } from "./misc.js"; import type { Callback } from "./protocols.js"; /** * @deprecated will be replaced in next version */ export interface IReceiver { toSubscriptionIterator: ( decoders: IDecoder | IDecoder[] ) => Promise>; subscribeWithUnsubscribe: SubscribeWithUnsubscribe; } type SubscribeWithUnsubscribe = ( decoders: IDecoder | IDecoder[], callback: Callback ) => Unsubscribe | Promise;