mapAsyncIterator.d.ts 454 B

1234567891011
  1. import { PromiseOrValue } from '../jsutils/PromiseOrValue';
  2. /**
  3. * Given an AsyncIterable and a callback function, return an AsyncIterator
  4. * which produces values mapped via calling the callback function.
  5. */
  6. export default function mapAsyncIterator<T, U>(
  7. iterable: AsyncIterable<T>,
  8. callback: (arg: T) => PromiseOrValue<U>,
  9. rejectCallback?: (arg: any) => PromiseOrValue<U>,
  10. ): any; // TS_SPECIFIC: es2018.asyncgenerator requires typescript@3.6