Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
412 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | import { hostReportError } from './hostReportError';
|
---|
| 2 | export const subscribeToPromise = (promise) => (subscriber) => {
|
---|
| 3 | promise.then((value) => {
|
---|
| 4 | if (!subscriber.closed) {
|
---|
| 5 | subscriber.next(value);
|
---|
| 6 | subscriber.complete();
|
---|
| 7 | }
|
---|
| 8 | }, (err) => subscriber.error(err))
|
---|
| 9 | .then(null, hostReportError);
|
---|
| 10 | return subscriber;
|
---|
| 11 | };
|
---|
| 12 | //# sourceMappingURL=subscribeToPromise.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.