async function test_parallel_variadic() { const [str, num] = await parallel_variadic([ Promise.resolve('something'), Promise.resolve(1), ]) str.toLowerCase() num.toExponential() } /** * TODO: replace body with `return Promise.allSettled(promises).then(rethrowAny)` */ function parallel_variadic(promises: readonly [...T]): Promise<{ readonly [P in keyof T]: Awaited }> { return Promise.all(promises) } export const a = {}