API reference@evolu/commonTask › AnyAllFailed

type AnyAllFailed = "input" | "completion";

Defined in: packages/common/src/Task.ts:3521

Tie-breaker for any when all tasks fail.

Used only when no task succeeds.

  • "input" returns the error from the last task in the input array. This is stable under concurrency and generally produces deterministic tests.
  • "completion" returns the error from the Task that finished last. This reflects timing but can vary across runs when task timing varies.

Example

await using run = createRun();
const result = await run(
  concurrently(any([a, b, c], { allFailed: "completion" })),
);