effect-io-ai

Package: effect
Module: SynchronizedRef

SynchronizedRef.updateSome

Applies a partial update to the current value. Option.some stores the new value; Option.none leaves the ref unchanged.

When to use

Use to apply a pure conditional SynchronizedRef update without returning a value.

See

Signature

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

Source

Since v2.0.0