fix(workflows-sdk): name for when/then step (#10459)

This commit is contained in:
Carlos R. L. Rodrigues
2024-12-05 15:47:42 -03:00
committed by GitHub
parent 7ff3f15d6d
commit 90ae187e09
14 changed files with 234 additions and 50 deletions

View File

@@ -20,6 +20,10 @@ export async function promiseAll<T extends readonly unknown[] | []>(
promises: T,
{ aggregateErrors } = { aggregateErrors: false }
): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }> {
if (!promises.length) {
return [] as unknown as Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>
}
const states = await Promise.allSettled(promises)
const rejected = (states as PromiseSettledResult<unknown>[]).filter(