Skip to main content

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