import * as tsplus_module_1 from "@tsplus/stdlib/data/Either/definition";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/scheduleWith";
/**
 * Schedules the output of the stream using the provided `schedule` and emits
 * its output at the end (if `schedule` is finite).
 *
 * @tsplus fluent ets/Stream scheduleEither
 */

export function scheduleEither_(self, schedule, __tsplusTrace) {
  return tsplus_module_2.scheduleWith_(self, schedule, a => tsplus_module_1.rightW(a), b => tsplus_module_1.leftW(b), __tsplusTrace);
}
/**
 * Schedules the output of the stream using the provided `schedule` and emits
 * its output at the end (if `schedule` is finite).
 *
 * @tsplus static ets/Stream/Aspects scheduleEither
 */

export const scheduleEither = (schedule, __tsplusTrace) => self => scheduleEither_(self, schedule, __tsplusTrace);
//# sourceMappingURL=scheduleEither.mjs.map