toTaskEitherAsync<L> method

TaskEither<L, T> toTaskEitherAsync<L>(
  1. Task<L> onNull
)

Convert a nullable type T? to TaskEither using an async function:

  • Right if the value is not null
  • Left containing the result of onNull if the value is null

If you want to run an sync function onNull, use toTaskEither.

Implementation

TaskEither<L, T> toTaskEitherAsync<L>(Task<L> onNull) =>
    TaskEither.fromNullableAsync(this, onNull);