Skip to content

match

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

Defined in: Core/These.ts:202

Pattern matches on a These, returning the result of the matching case.

E

A

B

(e, a) => B

(e) => B

(a) => B

(data): B

These<E, A>

B

pipe(
  these,
  These.match({
    err: e => `Error: ${e}`,
    ok: a => `Value: ${a}`,
    both: (e, a) => `Both: ${e} / ${a}`
  })
);