UNPKG

@aviarytech/didcomm-messaging

Version:

DIDComm Messaging library for sending and receiving DIDComm messages

22 lines (21 loc) 565 B
export interface Registry { unregister: () => void; } export interface Callable { [key: string]: any; } export interface Subscriber { [key: string]: Callable; } export interface IEventBus { dispatch<T>(event: string, arg?: T): void; register(event: string, callbackClass: any): Registry; } export declare class EventBus implements IEventBus { private subscribers; private static nextId; constructor(); dispatch<T>(event: string, arg?: T): void; register(event: string, callbackClass: any): Registry; private getNextId; }