/* eslint-disable @typescript-eslint/no-explicit-any */ export async function awaitAllKeysParallel(obj: { [K in keyof T]: Promise }): Promise { const keys = Object.keys(obj) const values = await Promise.all(Object.values(obj) as Promise[]) const result: Partial = {} keys.forEach((key, i) => { result[key as keyof T] = values[i] }) return result as T } // export async function awaitAllKeysSequential(obj: { [K in keyof T]: T[K] }): Promise { // return Object.entries(obj).reduce((result: Partial, entry) => { // // }, Promise.resolve({})) // }