1 import { Observable } from '../Observable';
2 export function range(start = 0, count, scheduler) {
3 return new Observable(subscriber => {
4 if (count === undefined) {
11 return scheduler.schedule(dispatch, 0, {
12 index, count, start, subscriber
17 if (index++ >= count) {
18 subscriber.complete();
21 subscriber.next(current++);
22 if (subscriber.closed) {
30 export function dispatch(state) {
31 const { start, index, count, subscriber } = state;
33 subscriber.complete();
36 subscriber.next(start);
37 if (subscriber.closed) {
40 state.index = index + 1;
41 state.start = start + 1;
44 //# sourceMappingURL=range.js.map