observePropertyAsync
Starts observing one or more properties, asynchronously.
protected
protected observePropertyAsync(...properties: Array<keyof T>): this
Notes
- Property changes are triggered when the property is assigned a different value, or when a referenced managed object emits a ManagedChangeEvent.
- Changes are handled by Observer.handlePropertyChange() asynchronously, which may be overridden. The base implementation of that method looks for a method called
on...Change
(e.g.onFooChange
for thefoo
property) and calls it with the the latest property value and possibly a change event as arguments. Returned promises are awaited to handle errors, if needed.
Related
- class ObserverThe base class for an observer that watches a particular ManagedObject.
- observeProperty(…properties) protectedStarts observing one or more properties.
- handlePropertyChange(property, value, event?) protectedA method that’s called when an observed property has been changed on the observed object, may be overridden.