doc/api/core/operators/startasync.md
Rx.Observable.startAsync(functionAsync)Invokes the asynchronous function, surfacing the result through an observable sequence.
functionAsync (Function): Asynchronous function which returns a Promise to run.(Observable): An observable sequence exposing the function's Promises's value or error.
var source = Rx.Observable.startAsync(function () {
return RSVP.Promise.resolve(42);
});
var subscription = source.subscribe(
function (x) {
console.log('Next: ' + x);
},
function (err) {
console.log('Error: ' + err);
},
function () {
console.log('Completed');
});
// => Next: 42
// => Completed
File:
Dist:
Prerequisites:
rx.async.js | rx.async.compat.js
NPM Packages:
NuGet Packages:
Unit Tests: