import { OpaqueToken, ClassProvider, ErrorHandler } from '@angular/core'; export interface IWatcher { action: IAction; event?: string; } export interface IAction { (...params: any[]): TReturnType; } export interface IUnregisterFunction { (): void; } export interface IObservableService { allowableEvents?: string[]; register(action: IAction, event?: string): IUnregisterFunction; register(action: IAction, event?: string): IUnregisterFunction; fire(event?: string, ...params: any[]): TReturnType[]; fire(event?: string, ...params: any[]): void; } export declare class ObservableService implements IObservableService { private errorHandler; private watchers; private nextKey; allowableEvents: string[]; constructor(errorHandler: ErrorHandler); register(action: IAction, event?: string): IUnregisterFunction; fire(event?: string, ...params: any[]): TReturnType[]; private unregister(key); } export declare const observableToken: OpaqueToken; export declare const OBSERVABLE_PROVIDER: ClassProvider;