UNPKG

682 BTypeScriptView Raw
1import { IterableX } from './iterablex';
2/**
3 * Repeats the given source as long as the specified conditions holds, where
4 * the condition is evaluated before each repeated source is iterated.
5 *
6 * @export
7 * @template TSource
8 * @param {Iterable<TSource>} source Source to repeat as long as the condition function evaluates to true.
9 * @param {((signal?: AbortSignal) => boolean)} condition Condition that will be evaluated before the source sequence is iterated.
10 * @returns {IterableX<TSource>} An iterable which is repeated while the condition returns true.
11 */
12export declare function whileDo<TSource>(source: Iterable<TSource>, condition: () => boolean): IterableX<TSource>;