UNPKG

ng-jhipster

Version:

A Jhipster util library for Angular 2

25 lines (24 loc) 677 B
import { Observable } from 'rxjs/Observable'; import { Observer } from 'rxjs/Observer'; import { Subscription } from 'rxjs/Subscription'; import 'rxjs/add/operator/filter'; /** * An utility class to manage RX events */ export declare class JhiEventManager { observable: Observable<any>; observer: Observer<any>; constructor(); /** * Method to broadcast the event to observer */ broadcast(event: any): void; /** * Method to subscribe to an event with callback */ subscribe(eventName: any, callback: any): Subscription; /** * Method to unsubscribe the subscription */ destroy(subscriber: Subscription): void; }