UNPKG

micro-message

Version:

global data store of micro front-end / multi app

18 lines (17 loc) 788 B
export type EventBusCallback = (value?: any) => any; export declare const SubBaseForEventBus: { get: (key: string) => EventBusCallback[]; add: (key: string, callback: EventBusCallback) => void; addToAll: (callback: EventBusCallback) => void; destory: (key: string) => void; delete: (key: string, callback: EventBusCallback) => boolean; dispatch: (key: string, ...args: any[]) => void; dispatchAll: (...args: any[]) => void; }; export declare const dispatchEvents: (key: string, value?: any) => void; export declare const StoreBus: { $on: (key: string, callback: EventBusCallback) => void; $off: (key: string) => void; $emit: (key: string, value?: any) => void; $delete: (key: string, callback: EventBusCallback) => boolean; };