/** * @since 3.10.0 */ import type * as Effect from "./Effect.js"; import type * as Option from "./Option.js"; import type * as Scope from "./Scope.js"; import type * as STM from "./STM.js"; import type * as Stream from "./Stream.js"; import type * as TQueue from "./TQueue.js"; import type * as TRef from "./TRef.js"; import type * as Types from "./Types.js"; /** * @since 3.10.0 * @category symbols */ export declare const TSubscriptionRefTypeId: unique symbol; /** * @since 3.10.0 * @category symbols */ export type TSubscriptionRefTypeId = typeof TSubscriptionRefTypeId; /** * A `TSubscriptionRef` is a `TRef` that can be subscribed to in order to * receive a `TDequeue` of the current value and all committed changes to the value. * * @since 3.10.0 * @category models */ export interface TSubscriptionRef extends TSubscriptionRef.Variance, TRef.TRef { /** * A TDequeue containing the current value of the `Ref` as well as all changes * to that value. */ readonly changes: STM.STM>; } /** * @since 3.10.0 */ export declare namespace TSubscriptionRef { /** * @since 3.10.0 * @category models */ interface Variance { readonly [TSubscriptionRefTypeId]: { readonly _A: Types.Invariant; }; } } /** * @since 3.10.0 * @category mutations */ export declare const get: (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ export declare const getAndSet: { /** * @since 3.10.0 * @category mutations */ (value: A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, value: A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const getAndUpdate: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const getAndUpdateSome: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => Option.Option): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => Option.Option): STM.STM; }; /** * @since 3.10.0 * @category constructors */ export declare const make: (value: A) => STM.STM>; /** * @since 3.10.0 * @category mutations */ export declare const modify: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => readonly [B, A]): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => readonly [B, A]): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const modifySome: { /** * @since 3.10.0 * @category mutations */ (fallback: B, f: (a: A) => Option.Option): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, fallback: B, f: (a: A) => Option.Option): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const set: { /** * @since 3.10.0 * @category mutations */ (value: A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, value: A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const setAndGet: { /** * @since 3.10.0 * @category mutations */ (value: A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, value: A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const update: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const updateAndGet: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => A): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => A): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const updateSome: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => Option.Option): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => Option.Option): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const updateSomeAndGet: { /** * @since 3.10.0 * @category mutations */ (f: (a: A) => Option.Option): (self: TSubscriptionRef) => STM.STM; /** * @since 3.10.0 * @category mutations */ (self: TSubscriptionRef, f: (a: A) => Option.Option): STM.STM; }; /** * @since 3.10.0 * @category mutations */ export declare const changesScoped: (self: TSubscriptionRef) => Effect.Effect, never, Scope.Scope>; /** * @since 3.10.0 * @category mutations */ export declare const changesStream: (self: TSubscriptionRef) => Stream.Stream; /** * @since 3.10.0 * @category mutations */ export declare const changes: (self: TSubscriptionRef) => STM.STM>; //# sourceMappingURL=TSubscriptionRef.d.ts.map