softkave-js-utils
Version:
JavaScript & Typescript utility functions, types, and classes
13 lines (12 loc) • 483 B
TypeScript
import { PromiseWithId } from './types.js';
export declare const settlePromiseListWithId: <T extends PromiseWithId<unknown>>(promises: Record<string, T> | T[]) => Promise<(Awaited<{
resolved: false;
reason?: unknown;
} & {
id: string | number;
} & Pick<T, Exclude<keyof T, "id" | "resolved">>> | Awaited<{
resolved: true;
value: import("./types.js").InferPromiseWithIdData<T>;
} & {
id: string | number;
} & Pick<T, Exclude<keyof T, "id" | "resolved">>>)[]>;