import type { Journal } from "@effect/core/stm/STM/definition/primitives" import { Entry } from "@effect/core/stm/STM/Entry" export function getOrMakeEntry(self: TRef, journal: Journal): Entry { if (journal.has(self)) { return journal.get(self)! } const entry = Entry(self, false) journal.set(self, entry) return entry }