@augment-vir/common
Version:
A collection of augments, helpers types, functions, and classes for any JavaScript environment.
13 lines (12 loc) • 587 B
TypeScript
import { type AnyObject } from '@augment-vir/core';
/**
* Awaits all Promise properties inside of the given object and wraps them all in a single promise.
* This is akin to `Promise.all` but for an object instead of an array.
*
* @category Promise
* @category Package : @augment-vir/common
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
*/
export declare function awaitAllPromisesInObject<const OriginalObject extends AnyObject>(originalObject: OriginalObject): Promise<{
[Key in keyof OriginalObject]: Awaited<OriginalObject[Key]>;
}>;