effect-io-ai

Package: effect
Module: SynchronizedRef

SynchronizedRef.setAndGet

Sets the value of the SynchronizedRef and returns the new value.

When to use

Use to replace the current SynchronizedRef value with a known value and return that new value.

See

Signature

declare const setAndGet: { <A>(value: A): (self: SynchronizedRef<A>) => Effect.Effect<A>; <A>(self: SynchronizedRef<A>, value: A): Effect.Effect<A>; }

Source

Since v2.0.0