@lumino/algorithm
Version:
Lumino Algorithms and Iterators
24 lines (23 loc) • 549 B
TypeScript
/**
* Chain together several iterables.
*
* @deprecated
*
* @param objects - The iterable objects of interest.
*
* @returns An iterator which yields the values of the iterables
* in the order in which they are supplied.
*
* #### Example
* ```typescript
* import { chain } from '@lumino/algorithm';
*
* let data1 = [1, 2, 3];
* let data2 = [4, 5, 6];
*
* let stream = chain(data1, data2);
*
* Array.from(stream); // [1, 2, 3, 4, 5, 6]
* ```
*/
export declare function chain<T>(...objects: Iterable<T>[]): IterableIterator<T>;