Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
771 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
| 3 | var Observable_1 = require("../Observable");
|
---|
| 4 | var Subscription_1 = require("../Subscription");
|
---|
| 5 | function scheduleArray(input, scheduler) {
|
---|
| 6 | return new Observable_1.Observable(function (subscriber) {
|
---|
| 7 | var sub = new Subscription_1.Subscription();
|
---|
| 8 | var i = 0;
|
---|
| 9 | sub.add(scheduler.schedule(function () {
|
---|
| 10 | if (i === input.length) {
|
---|
| 11 | subscriber.complete();
|
---|
| 12 | return;
|
---|
| 13 | }
|
---|
| 14 | subscriber.next(input[i++]);
|
---|
| 15 | if (!subscriber.closed) {
|
---|
| 16 | sub.add(this.schedule());
|
---|
| 17 | }
|
---|
| 18 | }));
|
---|
| 19 | return sub;
|
---|
| 20 | });
|
---|
| 21 | }
|
---|
| 22 | exports.scheduleArray = scheduleArray;
|
---|
| 23 | //# sourceMappingURL=scheduleArray.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.