export declare type ValueCallback = (value: T) => void; export declare type ErrorCallback = (err: Error) => void; export declare type ValueSink = (err: Error | undefined, value?: T) => boolean; export declare type UpdateFunction = (sink: ValueSink) => void; export declare class Observer { static create(value: T): Observer; private _isActive; private _value; private _previous; private _listeners; private _errorListeners; constructor(updater: UpdateFunction, value?: T); destroy(): void; previous(): T | null; current(): T | null; onValue(cb: ValueCallback): this; onError(cb: ErrorCallback): this; private update; private updateErrors; }