kubo-rpc-client-esm-cjs
Version:
A client library for the Kubo RPC API
22 lines • 879 B
TypeScript
/**
*
* @property {import('../types').MessageHandlerFn} handler
* @property {AbortController} controller
*/
export class SubscriptionTracker {
/** @type {Map<string, import('../types').PubsubSubscription[]>} */
_subs: Map<string, import('../types').PubsubSubscription[]>;
/**
* @param {string} topic
* @param {import('../types').MessageHandlerFn} handler
* @param {AbortSignal} [signal]
* @returns {AbortSignal}
*/
subscribe(topic: string, handler: import('../types').MessageHandlerFn, signal?: AbortSignal | undefined): AbortSignal;
/**
* @param {string} topic
* @param {import('../types').MessageHandlerFn} [handler]
*/
unsubscribe(topic: string, handler?: import("../types").MessageHandlerFn<import("@libp2p/interface-pubsub").Message> | undefined): void;
}
//# sourceMappingURL=subscription-tracker.d.ts.map