2 Object.defineProperty(exports, "__esModule", { value: true });
3 var Observable_1 = require("../Observable");
4 function range(start, count, scheduler) {
5 if (start === void 0) { start = 0; }
6 return new Observable_1.Observable(function (subscriber) {
7 if (count === undefined) {
14 return scheduler.schedule(dispatch, 0, {
15 index: index, count: count, start: start, subscriber: subscriber
20 if (index++ >= count) {
21 subscriber.complete();
24 subscriber.next(current++);
25 if (subscriber.closed) {
33 exports.range = range;
34 function dispatch(state) {
35 var start = state.start, index = state.index, count = state.count, subscriber = state.subscriber;
37 subscriber.complete();
40 subscriber.next(start);
41 if (subscriber.closed) {
44 state.index = index + 1;
45 state.start = start + 1;
48 exports.dispatch = dispatch;
49 //# sourceMappingURL=range.js.map