import { Evt } from "./Evt"; import { NonPostable } from "./types/helper/NonPostable"; declare type ChangeDiff = { newValue: T; previousValue: T; }; /** * https://garronej.github.io/ts-evt/#observert-documentation * The interface that should be exposed to users that should * have read only access on the observable */ export interface IObservable { readonly value: T; /** when value changed post the new value and the value it previously replaced */ readonly evtChangeDiff: NonPostable>>; /** when value changed post the new value */ readonly evtChange: NonPostable>; } /** https://garronej.github.io/ts-evt/#observert-documentation */ export declare class Observable implements IObservable { private readonly areSame; private readonly evtChangeDiff_post; readonly evtChangeDiff: IObservable["evtChangeDiff"]; readonly evtChange: IObservable["evtChange"]; readonly value: T; constructor(initialValue: T, areSame?: (currentValue: T, newValue: T) => boolean); private overwriteReadonlyValue; /** Return true if the value have been changed */ onPotentialChange(newValue: T): boolean; } export {};