Saltar al contenido principal

Firma

allOrThrow<T>(tasks, options?): Promise<T[]>

Opciones

  • Hereda todas las opciones de run
  • concurrency: límite simultáneo

Ejemplo

import { allOrThrow } from "tryo";

const data = await allOrThrow<string>(
  [
    () => fetch("/a").then((r) => r.text()),
    () => fetch("/b").then((r) => r.text()),
  ],
  { concurrency: 2 }
);
Si una tarea falla, se lanza el error normalizado.