effect-io-ai

Package: effect
Module: SynchronizedRef

SynchronizedRef.update

Updates the value of the SynchronizedRef with a function, serialized by the ref’s semaphore.

When to use

Use to apply a pure state transition to a SynchronizedRef as a serialized Effect.

See

Signature

declare const update: { <A>(f: (a: A) => A): (self: SynchronizedRef<A>) => Effect.Effect<void>; <A>(self: SynchronizedRef<A>, f: (a: A) => A): Effect.Effect<void>; }

Source

Since v2.0.0