Package: effect
Module: SynchronizedRef
Applies a partial update atomically and returns the previous value. If the
function returns Option.some, the ref is updated; if it returns
Option.none, the ref is left unchanged.
When to use
Use to return the previous SynchronizedRef value while applying a pure
conditional update.
See
getAndUpdate for always applying a pure updateupdateSome for applying a pure conditional update without returning the previous valueSignature
declare const getAndUpdateSome: { <A>(pf: (a: A) => Option.Option<A>): (self: SynchronizedRef<A>) => Effect.Effect<A>; <A>(self: SynchronizedRef<A>, pf: (a: A) => Option.Option<A>): Effect.Effect<A>; }
Since v2.0.0