import * as tsplus_module_1 from "@effect/core/stream/Stream/operations/repeatEffectMaybe";
import * as tsplus_module_2 from "@effect/core/io/Schedule/operations/driver";
import * as tsplus_module_3 from "@effect/core/io/Effect/operations/map";
import * as tsplus_module_4 from "@effect/core/stream/Stream/operations/unwrap";
/**
 * Creates a stream from a `Schedule` that does not require any further
 * input. The stream will emit an element for each value output from the
 * schedule, continuing for as long as the schedule continues.
 *
 * @tsplus static ets/Stream/Ops fromSchedule
 */

export function fromSchedule(schedule, __tsplusTrace) {
  return tsplus_module_4.unwrap(() => tsplus_module_3.map_(tsplus_module_2.driver(schedule()), driver => tsplus_module_1.repeatEffectMaybe(() => driver.next(undefined), __tsplusTrace), __tsplusTrace), __tsplusTrace);
}
//# sourceMappingURL=fromSchedule.mjs.map