import type { Option } from "../../Option"; import * as T from "../Task/_core"; import type { Ref, XRef } from "./model"; /** * Maps and filters the `get` value of the `XRef` with the specified partial * function, returning a `XRef` with a `get` value that succeeds with the * result of the partial function if it is defined or else fails with `None`. */ export declare const collect: ( pf: (_: B) => Option ) => (_: XRef) => XRef, A, C>; /** * Maps and filters the `get` value of the `XRef` with the specified partial * function, returning a `XRef` with a `get` value that succeeds with the * result of the partial function if it is defined or else fails with `None`. */ export declare const collect_: ( _: XRef, pf: (_: B) => Option ) => XRef, A, C>; /** * Returns a read only view of the `XRef`. */ export declare const readOnly: (_: XRef) => XRef; /** * Returns a write only view of the `XRef`. */ export declare const writeOnly: (_: XRef) => XRef; /** * Atomically modifies the `XRef` with the specified function, which * computes a return value for the modification. This is a more powerful * version of `update`. */ export declare const modify: ( f: (a: A) => readonly [B, A] ) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified function, which * computes a return value for the modification. This is a more powerful * version of `update`. */ export declare const modify_: (self: XRef, f: (a: A) => [B, A]) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function, * which computes a return value for the modification if the function is * defined on the current value otherwise it returns a default value. This * is a more powerful version of `updateSome`. */ export declare const modifySome: ( def: B ) => (f: (a: A) => Option<[B, A]>) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function, * which computes a return value for the modification if the function is * defined on the current value otherwise it returns a default value. This * is a more powerful version of `updateSome`. */ export declare const modifySome_: ( self: XRef, def: B, f: (a: A) => Option<[B, A]> ) => T.EIO; /** * Atomically writes the specified value to the `XRef`, returning the value * immediately before modification. */ export declare const getAndSet: (a: A) => (self: XRef) => T.IO | T.EIO; /** * Atomically writes the specified value to the `XRef`, returning the value * immediately before modification. */ export declare const getAndSet_: (self: XRef, a: A) => T.IO | T.EIO; /** * Atomically modifies the `XRef` with the specified function, returning * the value immediately before modification. */ export declare const getAndUpdate: ( f: (a: A) => A ) => (self: XRef) => T.IO | T.EIO; /** * Atomically modifies the `XRef` with the specified function, returning * the value immediately before modification. */ export declare const getAndUpdate_: ( self: XRef, f: (a: A) => A ) => T.IO | T.EIO; /** * Atomically modifies the `XRef` with the specified partial function, * returning the value immediately before modification. If the function is * undefined on the current value it doesn't change it. */ export declare const getAndUpdateSome: ( f: (a: A) => Option ) => (self: XRef) => T.IO | T.EIO; /** * Atomically modifies the `XRef` with the specified partial function, * returning the value immediately before modification. If the function is * undefined on the current value it doesn't change it. */ export declare const getAndUpdateSome_: ( self: XRef, f: (a: A) => Option ) => T.IO | T.EIO; /** * Atomically modifies the `XRef` with the specified function. */ export declare const update: (f: (a: A) => A) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified function. */ export declare const update_: (self: XRef, f: (a: A) => A) => T.EIO; /** * Atomically modifies the `XRef` with the specified function and returns * the updated value. */ export declare const updateAndGet: (f: (a: A) => A) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified function and returns * the updated value. */ export declare const updateAndGet_: (self: XRef, f: (a: A) => A) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function. If * the function is undefined on the current value it doesn't change it. */ export declare const updateSome: ( f: (a: A) => Option ) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function. If * the function is undefined on the current value it doesn't change it. */ export declare const updateSome_: (self: XRef, f: (a: A) => Option) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function. If * the function is undefined on the current value it returns the old value * without changing it. */ export declare const updateSomeAndGet: ( f: (a: A) => Option ) => (self: XRef) => T.EIO; /** * Atomically modifies the `XRef` with the specified partial function. If * the function is undefined on the current value it returns the old value * without changing it. */ export declare const updateSomeAndGet_: ( self: XRef, f: (a: A) => Option ) => T.EIO; /** * Unsafe update value in a Ref */ export declare const unsafeUpdate: (f: (a: A) => A) => (self: Ref) => void; /** * Unsafe update value in a Ref */ export declare const unsafeUpdate_: (self: Ref, f: (a: A) => A) => void; /** * Reads the value from the `XRef`. */ export declare const get: (self: XRef) => T.EIO; /** * Writes a new value to the `XRef`, with a guarantee of immediate * consistency (at some cost to performance). */ export declare const set: (a: A) => (self: XRef) => T.EIO; /** * Writes a new value to the `XRef`, with a guarantee of immediate * consistency (at some cost to performance). */ export declare const set_: (self: XRef, a: A) => T.EIO; //# sourceMappingURL=combinators.d.ts.map