Wraps a single value, notifying listeners when the value changes.

Constructor

View source

new (value :A, ?listener :Listener2<A, A>)

Properties

_ :A

The wrapped value, setting this to a different value will fire the changed signal.

read only changed :Signal2<A, A>

Emitted when the value has changed. The first listener parameter is the new current value, the second parameter is the old previous value.

Methods

View source

watch (listener :Listener2<A, A>) :Disposable

Immediately calls a listener with the current value, and again whenever the value changes.

Returns:

A handle that can be disposed to stop watching for changes.