Aller au contenu principal

mapError()

const mapError: <E, G>(f) => <A>(fa) => TaskEither<G, A> = mapLeft

Alias for mapLeft.

Maps a function over the Left value.


Type Parameters

E: E

The original error type.

G: G extends ErrorType

The new error type.


Parameters

f: (e) => G

The mapping function.


Returns: <A>(fa): TaskEither<G, A>

A function that transforms the TaskEither.


Since

2.0.0