UNPKG

@dapplets/dapplet-overlay-bridge

Version:
18 lines (17 loc) 526 B
export declare class GeneralBridge { _subId: number; _callbacks: { [topic: string]: Function[]; }; constructor(); on(event: string, callback: Function): void; off(event: string): void; publish(topic: string, message: any): void; subscribe(topic: string, handler: Function): void; unsubscribe(topic: string): void; } export declare type Bridge<T> = GeneralBridge & T; export interface IBridge { new <T = {}>(): Bridge<T>; } export declare const Bridge: IBridge;