import * as tsplus_module_1 from "@effect/core/stm/STM/operations/effect";
import { getOrMakeEntry } from "@effect/core/stm/TRef/operations/_internal/getOrMakeEntry";
/**
 * Sets the value of the `TRef`.
 *
 * @tsplus fluent ets/TRef set
 */

export function set_(self, a) {
  return tsplus_module_1.effect(journal => {
    const entry = getOrMakeEntry(self, journal);
    entry.use(_ => _.unsafeSet(a));
    return undefined;
  });
}
/**
 * Sets the value of the `TRef`.
 *
 * @tsplus static ets/TRef/Aspects set
 */

export const set = a => self => set_(self, a);
//# sourceMappingURL=set.mjs.map