mirror of
https://github.com/logos-messaging/logos-delivery-js.git
synced 2026-03-10 11:43:06 +00:00
* update typescript, define in root package.json * update typedoc and fix typedoc comments * update dev version of tsconfig * set module and resolution for tsconfig dev * bump ts plugins * set order of typedoc generation * turn off warnings as errors setting
21 lines
595 B
TypeScript
21 lines
595 B
TypeScript
import type { IDecodedMessage, IDecoder } from "./message.js";
|
|
import type {
|
|
ContentTopic,
|
|
IAsyncIterator,
|
|
PubSubTopic,
|
|
Unsubscribe
|
|
} from "./misc.js";
|
|
import type { Callback } from "./protocols.js";
|
|
|
|
export type ActiveSubscriptions = Map<PubSubTopic, ContentTopic[]>;
|
|
|
|
export interface IReceiver {
|
|
toSubscriptionIterator: <T extends IDecodedMessage>(
|
|
decoders: IDecoder<T> | IDecoder<T>[]
|
|
) => Promise<IAsyncIterator<T>>;
|
|
subscribe: <T extends IDecodedMessage>(
|
|
decoders: IDecoder<T> | IDecoder<T>[],
|
|
callback: Callback<T>
|
|
) => Unsubscribe | Promise<Unsubscribe>;
|
|
}
|