Skip to content

product

product<E, A, B>(first, second): TaskValidation<E, readonly [A, B]>

Defined in: Core/TaskValidation.ts:205

Runs two Task.Validations concurrently and combines their results into a tuple. If both are Passed, returns Passed with both values. If either fails, accumulates errors from both sides.

E

A

B

TaskValidation<E, A>

TaskValidation<E, B>

TaskValidation<E, readonly [A, B]>

await Task.Validation.product(
  validateName(form.name),
  validateAge(form.age),
)(); // Passed(["Alice", 30]) or Failed([...errors])