- Preparing search index...
- The search index is not available
sdk-v2
- from<R, L, Args>(fn: ((...args: Args) => Promise<R>)): TaskEither<L, R, Args>
-
Type Parameters
-
R
-
L = Error
-
Args extends readonly unknown[] = []
Parameters
-
fn: ((...args: Args) => Promise<R>)
-
- (...args: Args): Promise<R>
-
Returns Promise<R>
Create a TaskEither from an async function.
Generic
R - right value and return type of function
Generic
L - left value and the error type of the function if it throws
Returns
TaskEither<L, R, Args>