mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-10 17:53:09 +00:00
* chore: remove deprecated filter implementation * update tests * skip IReceiver test, remove unused utility * fix typo * address comments * unskip Filter e2e test * address more comments, remove duplication * skip CI test
19 lines
615 B
TypeScript
19 lines
615 B
TypeScript
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: <T extends IDecodedMessage>(
|
|
decoders: IDecoder<T> | IDecoder<T>[]
|
|
) => Promise<IAsyncIterator<T>>;
|
|
subscribeWithUnsubscribe: SubscribeWithUnsubscribe;
|
|
}
|
|
|
|
type SubscribeWithUnsubscribe = <T extends IDecodedMessage>(
|
|
decoders: IDecoder<T> | IDecoder<T>[],
|
|
callback: Callback<T>
|
|
) => Unsubscribe | Promise<Unsubscribe>;
|