import { Router } from '@angular/router'; /** * Rc Event Bus service * manage custom events * Each route change, unsubscribe all events listeners unless the listener was defined as global */ export declare class RcEventBusService { protected router: Router; events: any[]; globalEvents: any[]; subscriptions: any[]; globalSubscriptions: any[]; constructor(router: Router); /** * emit an event with optional params * @param eventName * @param params * @param byPrefix */ emit(eventName: string, params?: any, byPrefix?: boolean): void; /** * start listen to an event, if global set to true, the event listener will no unsubscribe on route change * @param eventName * @param callback * @param isGlobal * @returns any */ on(eventName: any, callback: any, isGlobal?: boolean): any; /** * unsubscribe all subscriber from a specific event * @param eventName * @param isGlobal */ off(eventName: any, isGlobal?: boolean): void; /** * clear all events and subscriptions */ clearEvents(): void; }