node/rxjs/dist/esm/internal/util/executeSchedule.js
raw| 1 | export function executeSchedule(parentSubscription, scheduler, work, delay = 0, repeat = false) { |
| 2 | const scheduleSubscription = scheduler.schedule(function () { |
| 3 | work(); |
| 4 | if (repeat) { |
| 5 | parentSubscription.add(this.schedule(null, delay)); |
| 6 | } |
| 7 | else { |
| 8 | this.unsubscribe(); |
| 9 | } |
| 10 | }, delay); |
| 11 | parentSubscription.add(scheduleSubscription); |
| 12 | if (!repeat) { |
| 13 | return scheduleSubscription; |
| 14 | } |
| 15 | } |
| 16 | //# sourceMappingURL=executeSchedule.js.map |