@sitesoft/ssp-support
Version:
Various tools, data-structures and utils
29 lines • 1.04 kB
TypeScript
import type { VueConstructor } from 'vue/types/vue';
export interface BusEventType {
$on(event: string | string[], callback: Function): void;
$once(event: string | string[], callback: Function): void;
$off(event?: string | string[], callback?: Function): void;
$emit(event: string, ...args: any[]): void;
}
export declare class BusEvent implements BusEventType {
private bus;
constructor(Vue: VueConstructor);
/**
* Register a listener on Alice's built-in event bus
*/
$on(event: string | string[], callback: Function): void;
/**
* Register a one-time listener on the event bus
*/
$once(event: string | string[], callback: Function): void;
/**
* Unregister an listener on the event bus
*/
$off(event?: string | string[], callback?: Function): void;
/**
* Emit an event on the event bus
*/
$emit(event: string, ...args: any[]): void;
}
export default function receiveBus(Vue: VueConstructor): BusEventType;
//# sourceMappingURL=BusEvent.d.ts.map