// ets_tracing: off import type { Has, Tag } from "../../Has/index.js" import { provideSome_ } from "../core.js" import type { Managed } from "../managed.js" /** * Updates a service in the environment of this effect. */ export function updateService_( self: Managed, tag: Tag, f: (_: T) => T, __trace?: string ): Managed, E, A> { return provideSome_( self, (r: R & Has) => ({ ...r, ...tag.has(f(tag.read(r))) }), __trace ) } /** * Updates a service in the environment of this effect. * * @ets_data_first updateService_ */ export function updateService( tag: Tag, f: (_: T) => T, __trace?: string ): (self: Managed) => Managed, E, A> { return (self) => updateService_(self, tag, f, __trace) }