2018-11-22 16:41:46 +01:00
|
|
|
import { Observable } from '../Observable';
|
|
|
|
import { subscribeToPromise } from '../util/subscribeToPromise';
|
2019-06-04 14:29:48 +02:00
|
|
|
import { schedulePromise } from '../scheduled/schedulePromise';
|
2018-11-22 16:41:46 +01:00
|
|
|
export function fromPromise(input, scheduler) {
|
|
|
|
if (!scheduler) {
|
|
|
|
return new Observable(subscribeToPromise(input));
|
|
|
|
}
|
|
|
|
else {
|
2019-06-04 14:29:48 +02:00
|
|
|
return schedulePromise(input, scheduler);
|
2018-11-22 16:41:46 +01:00
|
|
|
}
|
|
|
|
}
|
2019-06-04 14:29:48 +02:00
|
|
|
//# sourceMappingURL=fromPromise.js.map
|