Represents a stateful value that can be observed by different objects.

Type Parameters

  • T

Hierarchy

  • IObservable

Properties

Methods

Properties

validator?: ObservableValidator<T>

Remarks

Optional validator that will pre-process the new value.

value: Readonly<T>

Remarks

Current value of the observable.

Methods

  • Parameters

    • newValue: T

      New value to be set (will be processed by the validator if it exists).

    Returns boolean

    Remarks

    Updates the value and notifies dependent objects.