export interface WatcherFn { (newValue: T, oldValue: T): void; } export interface Catcher { (error: Error, details: ErrorDetails): void; } export interface ErrorDetails { oldValue?: any; newValue?: any; } export declare class HvDispatcher { private watcherSets; private lastErrorDetails; watch(hvId: number, fn: WatcherFn): number; unwatch(hvId: number, watcherId: number): void; catch(hvId: number, catcher: Catcher): void; handle(hvId: number, newValue: any, oldValue: any): void; fail(hvId: number, error: Error, details?: ErrorDetails): void; } export declare const globalDispatcher: HvDispatcher;