-
Notifications
You must be signed in to change notification settings - Fork 8
value
richardszalay edited this page May 20, 2011
·
2 revisions
Creates a sequence of type that returns value and immediately completes. Passing a value to the global [toObservable] function is a shorthand way of calling this method.
static function value(value : Object,
scheduler : IScheduler = null) : IObservable.<TValue>
The returned sequence completes after emitting value
The returned sequence does not error
─o/
value
Unless specified, this operator uses Scheduler.defaultScheduler
.
IObservable.<TValue>
Observable.value(5)
.subscribe(
function(value:int) : void { trace(value); },
function():void { trace("Completed!"); }
);
// Trace output is:
// 5
// Completed!