NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/rxjs/_esm2015/internal/util/subscribeToPromise.js
2023-09-14 14:47:11 +08:00

12 lines
412 B
Java

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