Import
import { RefSubject } from "@typed/fx";This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.
Signatures
export * as RefSubject from "./RefSubject.js";Members
RefSubject.ComputedA
Computedis a read-only view of a value that can change over time. It is anFxthat emits the current value and subsequent updates. It is also anEffectthat samples the current value.RefSubject.ComputedTypeIdRuntime symbol identifying read-only Computed values.
RefSubject.CurrentComputedBehaviorSelects whether a computed Fx observes only its current value or also follows later pushes.
RefSubject.ErrorDescribes the error type.
RefSubject.FilteredA
Filteredis aComputedthat may not always have a value. It is essentially aComputed<Option<A>>with helper methods.RefSubject.FilteredTypeIdRuntime symbol identifying conditionally available Filtered values.
RefSubject.GetSetDeleteInterface for basic RefSubject operations: get, set, delete.
RefSubject.HYDRATION_ATTRIBUTECanonical data attribute for the versioned envelope of unnamed hydrated refs.
RefSubject.HydrateOptionsDefines the hydrate options state contract.
RefSubject.HydratedRefSubjectDefines the hydrated ref subject state contract.
RefSubject.HydrationAttributeDefines the hydration attribute state contract.
RefSubject.HydrationElementDefines the hydration element state contract.
RefSubject.HydrationRefDefines the hydration ref state contract.
RefSubject.HydrationRefTypeIdRuntime symbol exposing hydration metadata on a hydrated RefSubject.
RefSubject.IdentifierDescribes the identifier type.
RefSubject.RefSubjectA
RefSubjectis a mutable reference that can be observed as an Fx. It combines the capabilities of aRef(get/set/update) with aSubject(subscribe).RefSubject.RefSubjectOptionsDefines the ref subject options state contract.
RefSubject.RefSubjectTypeIdRuntime symbol identifying writable RefSubject values.
RefSubject.ServiceCreates a Context-backed RefSubject service facade and Layer constructors.
RefSubject.ServicesDescribes the services type.
RefSubject.SuccessDescribes the success type.
RefSubject.compactConverts a
ComputedorFilteredofOption<A>into aFiltered<A>, filtering outNonevalues.RefSubject.computedFromServiceLifts an Effect-provided Computed into a Computed facade.
RefSubject.decrementDecrements a numeric
RefSubjectby 1.RefSubject.deleteResets a
RefSubjectto its initial value, returning the previous value if it existed.RefSubject.filterMapFilters and transforms a
RefSubject,Computed, orFilteredusing a pure function that returns anOption.RefSubject.filterMapEffectFilters and transforms a
RefSubject,Computed, orFilteredusing anEffectful function that returns anOption.RefSubject.filteredFromServiceDefers retrieval of a Filtered value from Effect Context while preserving Filtered behavior.
RefSubject.fromEffectCreates a
RefSubjectfrom anEffect.RefSubject.fromFxCreates a
RefSubjectfrom anFx, tracking the latest emitted value.RefSubject.fromNullableCreates Option-valued RefSubject state from a nullable input.
RefSubject.fromOptionCreates a
RefSubjectfrom anOptionvalue.RefSubject.fromStreamCreates a RefSubject that tracks the latest value emitted by an Effect Stream.
RefSubject.getOrElseReturns a
Computedthat yields the value inside theOption, or the fallback whenNone. Works withComputed<Option<A>>(e.g. fromfromOption/fromNullable) and withFiltered<A>.RefSubject.hydrateCreates a named hydrated RefSubject using a string-encoded Schema codec.
RefSubject.hydrateAllCombines hydrated refs into one serialization and restoration boundary.
RefSubject.incrementIncrements a numeric
RefSubjectby 1.RefSubject.isComputedTests whether a value carries the public Computed TypeId.
RefSubject.isHydrationRefTests whether a value carries callable hydration metadata.
RefSubject.isRefSubjectChecks if a value is a
RefSubject.RefSubject.makeCreates a new
RefSubjectfrom a value,Effect, orFx.RefSubject.makeComputedBuilds a read-only Computed projection from a Versioned source.
RefSubject.makeFilteredBuilds a Filtered view from the three channels of a Versioned source.
RefSubject.mapTransforms a
RefSubject,Computed, orFilteredusing a pure function.RefSubject.mapEffectTransforms a
RefSubject,Computed, orFilteredusing anEffectful function.RefSubject.modifyModifies a
RefSubjectusing a pure function that returns both a result and a new value.RefSubject.modifyEffectModifies a
RefSubjectusing anEffectful function that returns both a result and a new value.RefSubject.proxyExtract all values from an object using a Proxy. Allows accessing nested properties of a
ComputedorFilteredobject/array as individual computed values.RefSubject.resetResets a
RefSubjectto its initial value, returning the previous value if it existed.RefSubject.runUpdatesRuns an effect that can modify a
RefSubjecttransactionally, with optional interrupt handling.RefSubject.scanStateful scan over a
RefSubject/Computed, producing aComputedof the accumulated state.Fx subscriptions follow
Fx.scansemantics (emitinitial, then fold each source value). Effect sampling accumulates across source versions via a private state ref (do not mix heavy subscribe + sample on the same scan if you need a single shared accumulator).RefSubject.scanEffectEffectful stateful scan over a
RefSubject/Computed, producing aComputedof the accumulated state.RefSubject.setSets the value of a
RefSubject.RefSubject.sliceLimits which pushed versions a RefSubject view observes without changing its state.
RefSubject.structCombines multiple
RefSubject,Computed, orFilteredinstances into a single struct.RefSubject.transformTransforms a
RefSubjectinvariantly using bidirectional mapping functions.RefSubject.tupleCombines multiple
RefSubject,Computed, orFilteredinstances into a single tuple.RefSubject.updateUpdates a
RefSubjectusing a pure function.RefSubject.updateEffectUpdates a
RefSubjectusing anEffectful function.