1 | /**
|
2 | * Create an iterator which repeats a value a number of times.
|
3 | *
|
4 | * @deprecated
|
5 | *
|
6 | * @param value - The value to repeat.
|
7 | *
|
8 | * @param count - The number of times to repeat the value.
|
9 | *
|
10 | * @returns A new iterator which repeats the specified value.
|
11 | *
|
12 | * #### Example
|
13 | * ```typescript
|
14 | * import { repeat } from '@lumino/algorithm';
|
15 | *
|
16 | * let stream = repeat(7, 3);
|
17 | *
|
18 | * Array.from(stream); // [7, 7, 7]
|
19 | * ```
|
20 | */
|
21 | export declare function repeat<T>(value: T, count: number): IterableIterator<T>;
|
22 | /**
|
23 | * Create an iterator which yields a value a single time.
|
24 | *
|
25 | * @deprecated
|
26 | *
|
27 | * @param value - The value to wrap in an iterator.
|
28 | *
|
29 | * @returns A new iterator which yields the value a single time.
|
30 | *
|
31 | * #### Example
|
32 | * ```typescript
|
33 | * import { once } from '@lumino/algorithm';
|
34 | *
|
35 | * let stream = once(7);
|
36 | *
|
37 | * Array.from(stream); // [7]
|
38 | * ```
|
39 | */
|
40 | export declare function once<T>(value: T): IterableIterator<T>;
|