@graphql-tools/utils
Version:
Common package containing utils and types for GraphQL tools
6 lines (5 loc) • 314 B
TypeScript
/**
* Given an AsyncIterable and a callback function, return an AsyncIterator
* which produces values mapped via calling the callback function.
*/
export declare function mapAsyncIterator<T, U>(iterator: AsyncIterator<T>, callback: (value: T) => Promise<U> | U, rejectCallback?: any): AsyncIterableIterator<U>;