promiseForObject.d.ts 389 B

1234567891011
  1. import type { ObjMap } from './ObjMap';
  2. /**
  3. * This function transforms a JS object `ObjMap<Promise<T>>` into
  4. * a `Promise<ObjMap<T>>`
  5. *
  6. * This is akin to bluebird's `Promise.props`, but implemented only using
  7. * `Promise.all` so it will work with any implementation of ES6 promises.
  8. */
  9. export declare function promiseForObject<T>(
  10. object: ObjMap<Promise<T>>,
  11. ): Promise<ObjMap<T>>;