[6a3a178] | 1 | import { SchedulerAction, SchedulerLike } from '../types';
|
---|
| 2 | import { Observable } from '../Observable';
|
---|
| 3 | /**
|
---|
| 4 | * Creates an Observable that emits a sequence of numbers within a specified
|
---|
| 5 | * range.
|
---|
| 6 | *
|
---|
| 7 | * <span class="informal">Emits a sequence of numbers in a range.</span>
|
---|
| 8 | *
|
---|
| 9 | * ![](range.png)
|
---|
| 10 | *
|
---|
| 11 | * `range` operator emits a range of sequential integers, in order, where you
|
---|
| 12 | * select the `start` of the range and its `length`. By default, uses no
|
---|
| 13 | * {@link SchedulerLike} and just delivers the notifications synchronously, but may use
|
---|
| 14 | * an optional {@link SchedulerLike} to regulate those deliveries.
|
---|
| 15 | *
|
---|
| 16 | * ## Example
|
---|
| 17 | * Emits the numbers 1 to 10</caption>
|
---|
| 18 | * ```ts
|
---|
| 19 | * import { range } from 'rxjs';
|
---|
| 20 | *
|
---|
| 21 | * const numbers = range(1, 10);
|
---|
| 22 | * numbers.subscribe(x => console.log(x));
|
---|
| 23 | * ```
|
---|
| 24 | * @see {@link timer}
|
---|
| 25 | * @see {@link index/interval}
|
---|
| 26 | *
|
---|
| 27 | * @param {number} [start=0] The value of the first integer in the sequence.
|
---|
| 28 | * @param {number} count The number of sequential integers to generate.
|
---|
| 29 | * @param {SchedulerLike} [scheduler] A {@link SchedulerLike} to use for scheduling
|
---|
| 30 | * the emissions of the notifications.
|
---|
| 31 | * @return {Observable} An Observable of numbers that emits a finite range of
|
---|
| 32 | * sequential integers.
|
---|
| 33 | * @static true
|
---|
| 34 | * @name range
|
---|
| 35 | * @owner Observable
|
---|
| 36 | */
|
---|
| 37 | export declare function range(start?: number, count?: number, scheduler?: SchedulerLike): Observable<number>;
|
---|
| 38 | /** @internal */
|
---|
| 39 | export declare function dispatch(this: SchedulerAction<any>, state: any): void;
|
---|