@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**.
  • LooseEventBus
  • ReducerThin 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

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.
  • Emit
  • EntityIdWhat 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.