1 import { Observable } from '../Observable';
2 import { SchedulerLike } from '../types';
4 * Creates an Observable that emits sequential numbers every specified
5 * interval of time, on a specified {@link SchedulerLike}.
7 * <span class="informal">Emits incremental numbers periodically in time.
12 * `interval` returns an Observable that emits an infinite sequence of
13 * ascending integers, with a constant interval of time of your choosing
14 * between those emissions. The first emission is not sent immediately, but
15 * only after the first period has passed. By default, this operator uses the
16 * `async` {@link SchedulerLike} to provide a notion of time, but you may pass any
17 * {@link SchedulerLike} to it.
20 * Emits ascending numbers, one every second (1000ms) up to the number 3
22 * import { interval } from 'rxjs';
23 * import { take } from 'rxjs/operators';
25 * const numbers = interval(1000);
27 * const takeFourNumbers = numbers.pipe(take(4));
29 * takeFourNumbers.subscribe(x => console.log('Next: ', x));
41 * @param {number} [period=0] The interval size in milliseconds (by default)
42 * or the time unit determined by the scheduler's clock.
43 * @param {SchedulerLike} [scheduler=async] The {@link SchedulerLike} to use for scheduling
44 * the emission of values, and providing a notion of "time".
45 * @return {Observable} An Observable that emits a sequential number each time
51 export declare function interval(period?: number, scheduler?: SchedulerLike): Observable<number>;