import { AtomicInternal, UnsafeAPI } from "@effect/core/io/Ref/operations/_internal/AtomicInternal" import { SynchronizedInternal } from "@effect/core/io/Ref/operations/_internal/SynchronizedInternal" export interface Atomic extends Ref { unsafe: UnsafeAPI } /** * @tsplus static effect/core/io/Ref.Ops unsafeMake */ export function unsafeMake(value: A): Atomic { return new AtomicInternal(new UnsafeAPI(new AtomicReference(value))) } /** * @tsplus static effect/core/io/Ref/Synchronized.Ops unsafeMake */ export function unsafeMakeSynchronized(initial: A): Ref.Synchronized { return new SynchronizedInternal( Ref.unsafeMake(initial), TSemaphore.unsafeMake(1) ) }