import * as tsplus_module_1 from "@tsplus/stdlib/data/Either/definition";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/make";
import * as tsplus_module_3 from "@effect/core/stream/Stream/operations/map";
import * as tsplus_module_4 from "@effect/core/stream/Stream/operations/catchAll";
/**
 * Returns a stream whose failures and successes have been lifted into an
 * `Either`. The resulting stream cannot fail, because the failures have been
 * exposed as part of the `Either` success case.
 *
 * @note The stream will end as soon as the first error occurs.
 *
 * @tsplus fluent ets/Stream either
 */

export function either(self, __tsplusTrace) {
  return tsplus_module_4.catchAll_(tsplus_module_3.map_(self, tsplus_module_1.right, __tsplusTrace), e => tsplus_module_2.make(tsplus_module_1.left(e)), __tsplusTrace);
}
//# sourceMappingURL=either.mjs.map