Creates a new ObservableNumber with the provided initial
numeric value.
Methods
getData
getData():number
World mutationEarly execution
Returns number
Remarks
Returns the current numeric value held by this observable.
setData
setData(data:number):void
World mutationEarly execution
Parameters
data: number
The new numeric value to set.
Returns void
Remarks
Updates the numeric value held by this observable. If the
new value differs from the current value, all subscribed
listeners are notified with the new value.
A function that receives the new numeric value each time the
observable changes.
Returns (arg0:number)=>void
Remarks
Registers a callback to be invoked whenever the observable's
value changes. Returns the callback, which can be passed to
unsubscribe to remove the listener.
unsubscribe
unsubscribe(callback:(arg0:number)=>void):boolean
World mutationEarly execution
Parameters
callback: (arg0:number)=>void
The callback handle previously returned by subscribe.
Returns boolean
Remarks
Removes a previously registered listener from this
observable. Returns true if the listener was found and
removed, false if it was not found.
An observable that holds a numeric value. Listeners are notified whenever the value changes.