/** * @file Keyed promise combinators: `pAllKeyed` and `pAllSettledKeyed` — the * tc39 proposal-await-dictionary (`Promise.allKeyed` / * `Promise.allSettledKeyed`, stage 3) as plain helpers, no global * patching. Spec-faithful where it counts: * * - Keys are the dictionary's OWN ENUMERABLE properties in * `[[OwnPropertyKeys]]` order, INCLUDING enumerable symbols (where * Bluebird.props / p-props stop at string keys). * - Each value goes through `Promise.resolve`, so plain values and thenables * both work. * - The result is a NULL-PROTOTYPE object * (CreateKeyedPromiseCombinatorResultObject does * OrdinaryObjectCreate(null)) carrying the same keys. * - `pAllKeyed` rejects on the first rejection with every promise already * subscribed — no unhandled-rejection stragglers. `pAllSettledKeyed` always * resolves, each key carrying a `{ status, value | reason }` settled * record. */ export type AwaitedDictionary = { [K in keyof D]: Awaited; }; export type SettledDictionary = { [K in keyof D]: PromiseSettledResult>; }; /** * The dictionary's own enumerable property keys (strings AND symbols) in * `[[OwnPropertyKeys]]` order, paired with their values resolved to * promises. Shared walk for both combinators so key semantics cannot * drift between them. */ export declare function enumerableEntries(promises: object): Array<{ key: PropertyKey; promise: Promise; }>; /** * Await a dictionary of promises by KEY instead of by position — the * `Promise.allKeyed` shape. Rejects on the first rejection (with every * value already subscribed, so no unhandled rejections); resolves to a * null-prototype object with the same keys and awaited values. * * @example * const { shape, color, mass } = await pAllKeyed({ * shape: getShape(), * color: getColor(), * mass: getMass(), * }) */ export declare function pAllKeyed(promises: D): Promise>; /** * The `Promise.allSettledKeyed` shape: always resolves, each key carrying * its `{ status: 'fulfilled', value }` or `{ status: 'rejected', reason }` * settled record, on a null-prototype object with the same keys. * * @example * const results = await pAllSettledKeyed({ shape: getShape() }) * if (results.shape.status === 'fulfilled') { * use(results.shape.value) * } */ export declare function pAllSettledKeyed(promises: D): Promise>; export declare function requireObject(promises: unknown): asserts promises is object;