import * as tsplus_module_1 from "@effect/core/stream/Stream/operations/aggregateWithinEither";
import * as tsplus_module_2 from "@effect/core/stream/Stream/operations/collectRight";
/**
 * Like `aggregateWithinEither`, but only returns the `Right` results.
 *
 * @param sink Used for the aggregation
 * @param schedule Used for signalling for when to stop the aggregation
 *
 * @tsplus fluent ets/Stream aggregateWithin
 */

export function aggregateWithin_(self, sink, schedule, __tsplusTrace) {
  return tsplus_module_2.collectRight(tsplus_module_1.aggregateWithinEither_(self, sink, schedule, __tsplusTrace), __tsplusTrace);
}
/**
 * Like `aggregateWithinEither`, but only returns the `Right` results.
 *
 * @param sink Used for the aggregation
 * @param schedule Used for signalling for when to stop the aggregation
 *
 * @tsplus static ets/Stream/Aspects aggregateWithin
 */

export const aggregateWithin = (sink, schedule, __tsplusTrace) => self => aggregateWithin_(self, sink, schedule, __tsplusTrace);
//# sourceMappingURL=aggregateWithin.mjs.map