Creates a new ObservableNumber with the provided initial
numeric value.
方法
getData
getData():number
世界修改早期执行
返回 number
备注
Returns the current numeric value held by this observable.
setData
setData(data:number):void
世界修改早期执行
参数
data: number
The new numeric value to set.
返回 void
备注
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.
返回 (arg0:number)=>void
备注
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
世界修改早期执行
参数
callback: (arg0:number)=>void
The callback handle previously returned by subscribe.
返回 boolean
备注
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.