/** * Updates the service with the required service entry. * * @tsplus static effect/core/stm/STM.Aspects updateService * @tsplus pipeable effect/core/stm/STM updateService */ export function updateService(tag: Tag, f: (service: T) => T1) { return (self: STM): STM => self.provideSomeEnvironment((env) => env.merge(Env(tag, f(env.unsafeGet(tag))))) }