import * as Tp from "../Collections/Immutable/Tuple/index.js"; import * as E from "../Either/index.js"; import type * as M from "../Managed/managed.js"; import * as O from "../Option/index.js"; import * as Q from "../Queue/index.js"; import * as T from "./effect.js"; import type { RefM, XRefM } from "./XRefM.js"; /** * Creates a new `XRefM` with the specified value. */ export declare function makeRefM(a: A): T.UIO>; /** * Creates a new `XRefM` with the specified value. */ export declare function unsafeMakeRefM(a: A): RefM; /** * Creates a new `RefM` with the specified value in the context of a * `Managed.` */ export declare function makeManagedRefM(a: A): M.UIO>; /** * Creates a new `RefM` and a `Dequeue` that will emit every change to the * `RefM`. */ export declare function dequeueRef(a: A): T.UIO<[RefM, Q.Dequeue]>; /** * Atomically modifies the `RefM` with the specified function, which computes * a return value for the modification. This is a more powerful version of * `update`. */ export declare function modify_(self: XRefM, f: (a: A) => T.Effect>): T.Effect; /** * Atomically modifies the `RefM` with the specified function, which computes * a return value for the modification. This is a more powerful version of * `update`. */ export declare function modify(f: (a: A) => T.Effect>): (self: XRefM) => T.Effect; /** * Reads the value from the `XRefM`. */ export declare function get(self: XRefM): T.Effect; /** * Writes a new value to the `RefM`, returning the value immediately before * modification. */ export declare function getAndSet_(self: XRefM, a: A): T.Effect; /** * Writes a new value to the `RefM`, returning the value immediately before * modification. */ export declare function getAndSet(a: A): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function, returning the * value immediately before modification. */ export declare function getAndUpdate_(self: XRefM, f: (a: A) => T.Effect): T.Effect; /** * Atomically modifies the `RefM` with the specified function, returning the * value immediately before modification. */ export declare function getAndUpdate(f: (a: A) => T.Effect): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function, returning the * value immediately before modification. */ export declare function getAndUpdateSome_(self: XRefM, f: (a: A) => O.Option>): T.Effect; /** * Atomically modifies the `RefM` with the specified function, returning the * value immediately before modification. */ export declare function getAndUpdateSome(f: (a: A) => O.Option>): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function, which computes * a return value for the modification if the function is defined in the current value * otherwise it returns a default value. * This is a more powerful version of `updateSome`. */ export declare function modifySome_(self: XRefM, def: B, f: (a: A) => O.Option>>): T.Effect; /** * Atomically modifies the `RefM` with the specified function, which computes * a return value for the modification if the function is defined in the current value * otherwise it returns a default value. * This is a more powerful version of `updateSome`. */ export declare function modifySome(def: B): (f: (a: A) => O.Option>>) => (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function update_(self: XRefM, f: (a: A) => T.Effect): T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function update(f: (a: A) => T.Effect): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateAndGet_(self: XRefM, f: (a: A) => T.Effect): T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateAndGet(f: (a: A) => T.Effect): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateSome_(self: XRefM, f: (a: A) => O.Option>): T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateSome(f: (a: A) => O.Option>): (self: XRefM) => T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateSomeAndGet_(self: XRefM, f: (a: A) => O.Option>): T.Effect; /** * Atomically modifies the `RefM` with the specified function. */ export declare function updateSomeAndGet(f: (a: A) => O.Option>): (self: XRefM) => T.Effect; /** * Folds over the error and value types of the `XRefM`. */ export declare function fold_(self: XRefM, ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => E.Either, bd: (_: B) => E.Either): XRefM; /** * Folds over the error and value types of the `XRefM`. */ export declare function fold(ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => E.Either, bd: (_: B) => E.Either): (self: XRefM) => XRefM; /** * Folds over the error and value types of the `XRefM`. This is a highly * polymorphic method that is capable of arbitrarily transforming the error * and value types of the `XRefM`. For most use cases one of the more * specific combinators implemented in terms of `foldM` will be more * ergonomic but this method is extremely useful for implementing new * combinators. */ export declare function foldM_(self: XRefM, ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => T.Effect, bd: (_: B) => T.Effect): XRefM; /** * Folds over the error and value types of the `XRefM`. This is a highly * polymorphic method that is capable of arbitrarily transforming the error * and value types of the `XRefM`. For most use cases one of the more * specific combinators implemented in terms of `foldM` will be more * ergonomic but this method is extremely useful for implementing new * combinators. */ export declare function foldM(ea: (_: EA) => EC, eb: (_: EB) => ED, ca: (_: C) => T.Effect, bd: (_: B) => T.Effect): (self: XRefM) => XRefM; /** * Folds over the error and value types of the `XRefM`, allowing access to * the state in transforming the `set` value. This is a more powerful version * of `foldM` but requires unifying the environment and error types. */ export declare function foldAllM_(self: XRefM, ea: (_: EA) => EC, eb: (_: EB) => ED, ec: (_: EB) => EC, ca: (_: C) => (_: B) => T.Effect, bd: (_: B) => T.Effect): XRefM; /** * Folds over the error and value types of the `XRefM`, allowing access to * the state in transforming the `set` value. This is a more powerful version * of `foldM` but requires unifying the environment and error types. */ export declare function foldAllM(ea: (_: EA) => EC, eb: (_: EB) => ED, ec: (_: EB) => EC, ca: (_: C) => (_: B) => T.Effect, bd: (_: B) => T.Effect): (self: XRefM) => XRefM; /** * Maps and filters the `get` value of the `XRefM` with the specified * effectual partial function, returning a `XRefM` with a `get` value that * succeeds with the result of the partial function if it is defined or else * fails with `None`. */ export declare function collectM_(self: XRefM, f: (b: B) => O.Option>): XRefM, A, C>; /** * Maps and filters the `get` value of the `XRefM` with the specified * effectual partial function, returning a `XRefM` with a `get` value that * succeeds with the result of the partial function if it is defined or else * fails with `None`. */ export declare function collectM(f: (b: B) => O.Option>): (self: XRefM) => XRefM, A, C>; /** * Maps and filters the `get` value of the `XRefM` with the specified partial * function, returning a `XRefM` with a `get` value that succeeds with the * result of the partial function if it is defined or else fails with `None`. */ export declare function collect_(self: XRefM, f: (b: B) => O.Option): XRefM, A, C>; /** * Maps and filters the `get` value of the `XRefM` with the specified partial * function, returning a `XRefM` with a `get` value that succeeds with the * result of the partial function if it is defined or else fails with `None`. */ export declare function collect(f: (b: B) => O.Option): (self: XRefM) => XRefM, A, C>; /** * Transforms both the `set` and `get` values of the `XRefM` with the * specified effectual functions. */ export declare function dimapM_(self: XRefM, f: (c: C) => T.Effect, g: (b: B) => T.Effect): XRefM; /** * Transforms both the `set` and `get` values of the `XRefM` with the * specified effectual functions. */ export declare function dimapM(f: (c: C) => T.Effect, g: (b: B) => T.Effect): (self: XRefM) => XRefM; /** * Transforms both the `set` and `get` errors of the `XRefM` with the * specified functions. */ export declare function dimapError_(self: XRefM, f: (ea: EA) => EC, g: (eb: EB) => ED): XRefM; /** * Transforms both the `set` and `get` errors of the `XRefM` with the * specified functions. */ export declare function dimapError(f: (ea: EA) => EC, g: (eb: EB) => ED): (self: XRefM) => XRefM; /** * Filters the `set` value of the `XRefM` with the specified effectual * predicate, returning a `XRefM` with a `set` value that succeeds if the * predicate is satisfied or else fails with `None`. */ export declare function filterInputM_(self: XRefM, f: (a: A1) => T.Effect): XRefM, EB, A1, B>; /** * Filters the `set` value of the `XRefM` with the specified effectual * predicate, returning a `XRefM` with a `set` value that succeeds if the * predicate is satisfied or else fails with `None`. */ export declare function filterInputM(f: (a: A1) => T.Effect): (self: XRefM) => XRefM, EB, A1, B>; /** * Filters the `set` value of the `XRefM` with the specified effectual * predicate, returning a `XRefM` with a `set` value that succeeds if the * predicate is satisfied or else fails with `None`. */ export declare function filterInput_(self: XRefM, f: (a: A1) => boolean): XRefM, EB, A1, B>; /** * Filters the `set` value of the `XRefM` with the specified effectual * predicate, returning a `XRefM` with a `set` value that succeeds if the * predicate is satisfied or else fails with `None`. */ export declare function filterInput(f: (a: A1) => boolean): (self: XRefM) => XRefM, EB, A1, B>; /** * Filters the `get` value of the `XRefM` with the specified effectual predicate, * returning a `XRefM` with a `get` value that succeeds if the predicate is * satisfied or else fails with `None`. */ export declare function filterOutputM_(self: XRefM, f: (b: B) => T.Effect): XRefM, A, B>; /** * Filters the `get` value of the `XRefM` with the specified effectual predicate, * returning a `XRefM` with a `get` value that succeeds if the predicate is * satisfied or else fails with `None`. */ export declare function filterOutputM(f: (b: B) => T.Effect): (self: XRefM) => XRefM, A, B>; /** * Filters the `get` value of the `XRefM` with the specified predicate, * returning a `XRefM` with a `get` value that succeeds if the predicate is * satisfied or else fails with `None`. */ export declare function filterOutput_(self: XRefM, f: (b: B) => boolean): XRefM, A, B>; /** * Filters the `get` value of the `XRefM` with the specified predicate, * returning a `XRefM` with a `get` value that succeeds if the predicate is * satisfied or else fails with `None`. */ export declare function filterOutput(f: (b: B) => boolean): (self: XRefM) => XRefM, A, B>; /** * Transforms the `get` value of the `XRefM` with the specified effectual * function. */ export declare function mapM_(self: XRefM, f: (b: B) => T.Effect): XRefM; /** * Transforms the `get` value of the `XRefM` with the specified effectual * function. */ export declare function mapM(f: (b: B) => T.Effect): (self: XRefM) => XRefM; /** * Transforms the `set` value of the `XRefM` with the specified effectual * function. */ export declare function contramapM_(self: XRefM, f: (c: C) => T.Effect): XRefM; /** * Transforms the `set` value of the `XRefM` with the specified effectual * function. */ export declare function contramapM(f: (c: C) => T.Effect): (self: XRefM) => XRefM; /** * Transforms the `set` value of the `XRefM` with the specified function. */ export declare function contramap_(self: XRefM, f: (c: C) => A): XRefM; /** * Transforms the `set` value of the `XRefM` with the specified function. */ export declare function contramap(f: (c: C) => A): (self: XRefM) => XRefM; /** * Transforms the `get` value of the `XRefM` with the specified function. */ export declare function map_(self: XRefM, f: (b: B) => C): XRefM; /** * Transforms the `get` value of the `XRefM` with the specified function. */ export declare function map(f: (b: B) => C): (self: XRefM) => XRefM; /** * Returns a read only view of the `XRefM`. */ export declare function readOnly(self: XRefM): XRefM; /** * Returns a read only view of the `XRefM`. */ export declare function writeOnly(self: XRefM): XRefM; /** * Performs the specified effect every time a value is written to this * `XRefM`. */ export declare function tapInput_(self: XRefM, f: (a: A1) => T.Effect): XRefM; /** * Performs the specified effect every time a value is written to this * `XRefM`. */ export declare function tapInput(f: (a: A1) => T.Effect): (self: XRefM) => XRefM; /** * Performs the specified effect every time a value is read to this * `XRefM`. */ export declare function tapOutput_(self: XRefM, f: (b: B) => T.Effect): XRefM; /** * Performs the specified effect every time a value is read to this * `XRefM`. */ export declare function tapOutput(f: (b: B) => T.Effect): (self: XRefM) => XRefM; //# sourceMappingURL=api.d.ts.map