Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

subscribeToPromise.js 559B

123456789101112131415
  1. /** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */
  2. import { hostReportError } from './hostReportError';
  3. export var subscribeToPromise = function (promise) {
  4. return function (subscriber) {
  5. promise.then(function (value) {
  6. if (!subscriber.closed) {
  7. subscriber.next(value);
  8. subscriber.complete();
  9. }
  10. }, function (err) { return subscriber.error(err); })
  11. .then(null, hostReportError);
  12. return subscriber;
  13. };
  14. };
  15. //# sourceMappingURL=subscribeToPromise.js.map