1 /** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
2 import { Observable } from '../Observable';
3 export function range(start, count, scheduler) {
4 if (start === void 0) {
7 return new Observable(function (subscriber) {
8 if (count === undefined) {
15 return scheduler.schedule(dispatch, 0, {
16 index: index, count: count, start: start, subscriber: subscriber
21 if (index++ >= count) {
22 subscriber.complete();
25 subscriber.next(current++);
26 if (subscriber.closed) {
34 export 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 //# sourceMappingURL=range.js.map