Aller au contenu principal

fromTask()

fromTask<A, E>(fa): TaskEither<E, A>

Creates a TaskEither from a Task.


Type Parameters​

A: A​

The success type.

E: E extends ErrorType = Error​

The error type.


Parameters​

fa: () => Promise<A>​

The Task to convert.


Returns: TaskEither<E, A>​

A TaskEither containing the result.


Since​

2.0.0