This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/_esm2015/internal/util/subscribeToPromise.js

12 lines
412 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00: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