toTaskEither<L> method

TaskEither<L, R> toTaskEither<L>(
  1. L onNone()
)

Convert this TaskOption to TaskEither.

If the value inside TaskOption is None, then use onNone to convert it to a value of type L.

Implementation

TaskEither<L, R> toTaskEither<L>(L Function() onNone) =>
    TaskEither(() async => Either.fromOption(await run(), onNone));