@yoltra/core
81 exports
Classes
CallAbortedErrorRaised when a call is cancelled, or its CallOptions.signal aborts.CallTimeoutErrorRaised when a call goes CallOptions.timeoutMs without a correlated event.EventBusMinimal, synchronous pub/sub event bus keyed by **channel** and **type**.LooseEventBusReducerThin wrapper around a pure reducer function (stateful event consumer): given a state `S` and an event (from `EventUnion<EM>`), returns the next state `S`.StorePublic Store surface.
Functions
Interfaces
AliasWatchWatches the freeze walk for one specific reference.BoundedEncodeResultOutcome of encodeStateBounded.CallHandleThe result of StoreInstance.call: awaitable for the terminal reply, async-iterable for progress.CallOptionsOptions for StoreInstance.call.CascadeInfoWhat StoreSpec.onCascade receives when a ceiling is breached.ChangeGeneric "old → new" wrapper for fine-grained change notifications.ConnectOptionsOptions for StoreInstance.connect.EffectSpecEffect specification (stateless async event consumer).EmitOptionsPer-emit options.EmitResultWhat an `emit` resolves to once its effects have run.EncodeOptionsOptions for encodeState.EncodeReportReports what an encode had to compromise.EncodeResultResult of encodeState.EntityAdapterReducer helpers, selectors, and the subscription paths that make the shape worth having.EntityAdapterOptionsHow an adapter identifies and orders its entities.EntityStateA normalised collection.EntityUpdateA change to apply to one entity.EventA single event object: `{ channel, type, payload, id }`, plus optional `meta`.EventConsumerMetaMetadata for event consumers (reducers, effects, middleware).HydrationWhat hydrate recovered.InstrumentedEventA single observed event delivered to an InstrumentationObserver.MiddlewareSpecMiddleware specification with optional event targeting and metadata.PersistableStoreThe store surface persistence needs, which is two methods wide.PersistenceAdapterWhere persisted state lives.PersistOptionsShared configuration.ReducerSpecOne reducer's definition blob (stateful event consumer).RejectionA reducer's refusal to apply a write, carrying the reason.StoreInstancePublic Store surface.WebStorageLikeThe slice of the Web Storage API used here.
Type Aliases
DeepReadonlyDeep readonly type: recursively makes all properties readonly.DeepROAlias for DeepReadonly.DottedDotted keys of a slice: top-level keys or any nested path.EffectFunctionEffect handler: runs AFTER reducers, sees the final state.EmitEntityIdWhat an entity may be keyed by.EventConsumerTypeType discriminator for event consumers.EventKeyCanonical routing concept: a readonly tuple `[channel, type]` that uniquely identifies an event.EventMapBaseA minimal "record of record" constraint for EventMaps.EventMetaOpaque, optional envelope metadata carried alongside an Event.EventPhasePhase of event subscription notification.EventSubscriptionHandlerHandler function for event subscriptions (receives full event union).EventUnionEvery legal `{ channel, type, payload, id }` as a *distinct* object type.InstrumentationObserverObserver for StoreInstance.instrument.MiddlewareFunctionMiddleware function: log, guard, or veto an event **synchronously**.MiddlewareInputMiddleware input: accepts either a function (legacy) or a spec object (recommended).NarrowedEventHandlerNarrowed event subscription handler for specific `(channel, type)` pairs.NotifiedPhaseThe phases a handler is actually *told about*.PathCompute dotted paths of T, including nested objects and arrays.PathValueResolves the value type at a dotted path `P` inside object/array `T`.PersistencePhaseWhere a failure happened, so a handler can tell a bad write from a bad payload.PrimitivePrimitive types (terminal leaves in deep traversal).ReducerFunctionPure reducer function (stateful event consumer).ReplySpecWhich reply events end a call, and therefore what it resolves to.RootValueA value with **no addressable interior**: its changes are reported at the slice root rather than at a path beneath it.StoreSpecStore configuration object passed to the Store constructor or createStore.UnsubscribeBasic unsubscribe handle.WhenMatcher for event targeting across reducers, effects, middleware, and subscriptions.WithGlobAllow wildcard patterns like "*" and "**" anywhere in the string.