/** * Provides the effect with the single service it requires. If the effect * requires more than one service use `provideEnvironment` instead. * * @tsplus static effect/core/io/Effect.Aspects provideServiceEffect * @tsplus pipeable effect/core/io/Effect provideServiceEffect */ export function provideServiceEffect(tag: Tag, effect: Effect) { return (self: Effect): Effect, E | E1, A> => Effect.environmentWithEffect((env: Env>) => effect.flatMap((service) => self.provideEnvironment(env.add(tag, service) as Env)) ) }