import { makeWithState } from "@effect/core/io/Schedule/operations/_internal/makeWithState" /** * Returns a new schedule with the single service it requires provided to it. * If the schedule requires multiple services use `provideEnvironment` * instead. * * @tsplus static effect/core/io/Schedule.Aspects provideService * @tsplus pipeable effect/core/io/Schedule provideService */ export function provideService(tag: Tag, service: T1) { return ( self: Schedule ): Schedule, In, Out> => makeWithState( self.initial, (now, input, state) => Effect.environmentWithEffect((env: Env>) => self .step(now, input, state) .provideEnvironment(env.add(tag, service)) ) ) }