import * as tsplus_module_1 from "@effect/core/stream/Channel/operations/orElse";
import { concreteStream, StreamInternal } from "@effect/core/stream/Stream/operations/_internal/StreamInternal";
/**
 * Switches to the provided stream in case this one fails with a typed error.
 *
 * See also `Stream.catchAll`.
 *
 * @tsplus operator ets/Stream |
 * @tsplus fluent ets/Stream orElse
 */

export function orElse_(self, that, __tsplusTrace) {
  void 0;
  return new StreamInternal(tsplus_module_1.orElse_(self.channel, () => {
    const that0 = that();
    void 0;
    return that0.channel;
  }));
}
/**
 * Switches to the provided stream in case this one fails with a typed error.
 *
 * See also `Stream.catchAll`.
 *
 * @tsplus static ets/Stream/Aspects orElse
 */

export const orElse = (that, __tsplusTrace) => self => orElse_(self, that, __tsplusTrace);
//# sourceMappingURL=orElse.mjs.map