axax
Version:
A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).
8 lines (7 loc) • 338 B
TypeScript
/**
* Go through the elements of an iterable and return zero or more of them using
* an async iterable.
*
* @param mapper the mapper function to run over the async iterable
*/
export declare function flatMap<TFrom, TTo>(mapper: (t: TFrom) => AsyncIterable<TTo>): (source: AsyncIterable<TFrom>) => AsyncGenerator<TTo, void, unknown>;