UNPKG

angular4-events

Version:

Events is a publish-subscribe style event system based on sqlProvider/angular2-pubsub

21 lines (20 loc) 1.18 kB
import { Observable, Subscription } from 'rxjs'; import * as i0 from "@angular/core"; export declare class EventsService implements IEventsService { private events; constructor(); subscribe(event: string): Observable<any>; subscribe(event: string, callback: (value: any) => void): Subscription; subscribe(event: string, callback: (value: any) => void, error: (error: any) => void): Subscription; subscribe(event: string, callback: (value: any) => void, error: (error: any) => void, complete: () => void): Subscription; publish(event: string, eventObject?: any): void; static ɵfac: i0.ɵɵFactoryDef<EventsService, never>; static ɵprov: i0.ɵɵInjectableDef<EventsService>; } export interface IEventsService { publish(event: string, eventObject?: any): void; subscribe(event: string): Observable<any>; subscribe(event: string, callback: (value: any) => void): Subscription; subscribe(event: string, callback: (value: any) => void, error: (error: any) => void): Subscription; subscribe(event: string, callback: (value: any) => void, error: (error: any) => void, complete: () => void): Subscription; }