import { Subscription } from 'rxjs'; import * as i0 from "@angular/core"; /** * A custom Events service just like Ionic 3 Events https://ionicframework.com/docs/v3/api/util/Events/ which got removed in Ionic 5. * */ export declare class Events { private channels; /** * Subscribe to a topic and provide a single handler/observer. * @param topic The name of the topic to subscribe to. * @param observer The observer or callback function to listen when changes are published. * * @returns Subscription from which you can unsubscribe to release memory resources and to prevent memory leak. */ subscribe(topic: string, observer: (_: any) => void): Subscription; /** * Publish some data to the subscribers of the given topic. * @param topic The name of the topic to emit data to. * @param data data in any format to pass on. */ publish(topic: string, data?: any): void; /** * When you are sure that you are done with the topic and the subscribers no longer needs to listen to a particular topic, you can * destroy the observable of the topic using this method. * @param topic The name of the topic to destroy. */ destroy(topic: string): null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }