UNPKG

293 BTypeScriptView Raw
1export interface MessageBus {
2 subscribe(topic: string, callback: Function): () => void;
3 publish(topic: string, ...args: unknown[]): void;
4}
5export declare function createMessageBus(): MessageBus;
6/**
7 * @ignore - internal hook.
8 */
9export default function useMessageBus(): MessageBus;