1 import { MonoTypeOperatorFunction } from '../types';
3 * Returns an Observable that will resubscribe to the source stream when the source stream completes, at most count times.
5 * <span class="informal">Repeats all values emitted on the source. It's like {@link retry}, but for non error cases.</span>
9 * Similar to {@link retry}, this operator repeats the stream of items emitted by the source for non error cases.
10 * Repeat can be useful for creating observables that are meant to have some repeated pattern or rhythm.
12 * Note: `repeat(0)` returns an empty observable and `repeat()` will repeat forever
15 * Repeat a message stream
17 * import { of } from 'rxjs';
18 * import { repeat, delay } from 'rxjs/operators';
20 * const source = of('Repeat message');
21 * const example = source.pipe(repeat(3));
22 * example.subscribe(x => console.log(x));
30 * Repeat 3 values, 2 times
32 * import { interval } from 'rxjs';
33 * import { repeat, take } from 'rxjs/operators';
35 * const source = interval(1000);
36 * const example = source.pipe(take(3), repeat(2));
37 * example.subscribe(x => console.log(x));
39 * // Results every second
48 * @see {@link repeatWhen}
51 * @param {number} [count] The number of times the source Observable items are repeated, a count of 0 will yield
52 * an empty Observable.
53 * @return {Observable} An Observable that will resubscribe to the source stream when the source stream completes
54 * , at most count times.
58 export declare function repeat<T>(count?: number): MonoTypeOperatorFunction<T>;