UNPKG

@augment-vir/common

Version:

A collection of augments, helpers types, functions, and classes for any JavaScript environment.

13 lines (12 loc) 503 B
import { type Values } from '@augment-vir/core'; /** * Race all the given values and return the one that finished first. * * @category Promise * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function racePromiseObject<const PromiseObject extends Readonly<Record<string, Promise<any>>>>(promises: PromiseObject): Promise<{ value: Awaited<Values<PromiseObject>>; key: keyof PromiseObject; }>;