export async function resolveProps>>( promises: T ): Promise<{ [K in keyof T]: Awaited }> { const keys = Object.keys(promises) const values = await Promise.all(Object.values(promises)) return keys.reduce( (acc, key, index) => { acc[key as keyof T] = values[index] return acc }, {} as { [K in keyof T]: Awaited } ) }