Skip to content

match

match<E, A, B>(cases): (data) => Task<B>

Defined in: Core/TaskValidation.ts:141

Pattern matches on a TaskValidation, returning a Task of the result.

E

A

B

(errors) => B

(a) => B

(data) => Task<B>

pipe(
  validateForm(input),
  TaskValidation.match({
    passed: data => save(data),
    failed: errors => showErrors(errors)
  })
)();