// import { TimeFunction } from "../performance/timing.server"; export type PromiseHash = Record>; export type AwaitedPromiseHash = { [Key in keyof Hash]: Awaited; }; export async function promiseHash(hash: Hash): Promise> { return Object.fromEntries(await Promise.all(Object.entries(hash).map(async ([key, promise]) => [key, await promise]))); } // export async function promiseHashTimed(hash: Hash, logger: { name: string; time: TimeFunction }): Promise> { // return Object.fromEntries(await Promise.all(Object.entries(hash).map(async ([key, promise]) => [key, await logger.time(`[${logger.name}]`, promise)]))); // }