github-pages-deploy-action/node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js

12 lines
412 B
JavaScript
Raw Normal View History

2020-03-07 11:45:40 +08:00
import { hostReportError } from './hostReportError';
export const subscribeToPromise = (promise) => (subscriber) => {
promise.then((value) => {
if (!subscriber.closed) {
subscriber.next(value);
subscriber.complete();
}
}, (err) => subscriber.error(err))
.then(null, hostReportError);
return subscriber;
};
//# sourceMappingURL=subscribeToPromise.js.map