/** * Updates a service in the environment of this stream. * * @tsplus static effect/core/stream/Stream.Aspects updateService * @tsplus pipeable effect/core/stream/Stream updateService */ export function updateService( tag: Tag, f: (service: T) => T1 ) { return (self: Stream): Stream => self.provideSomeEnvironment((env) => env.add(tag, f(env.unsafeGet(tag)))) }