@yoltra/core

41 exports

Classes

  • EventBusMinimal, synchronous pub/sub event bus keyed by **channel** and **type**.
  • LooseEventBusFlexible, synchronous pub/sub bus that supports **exact** and **pattern** event subscriptions.
  • 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

  • ChangeGeneric "old → new" wrapper for fine-grained change notifications.
  • EffectSpecEffect specification (stateless async event consumer).
  • EmitOptionsPer-emit options.
  • EventA single event object: `{ channel, type, payload, id }`.
  • EventConsumerMetaMetadata for event consumers (reducers, effects, middleware).
  • InstrumentedEventA single observed event delivered to an InstrumentationObserver.
  • MiddlewareSpecMiddleware specification with optional event targeting and metadata.
  • ReducerSpecOne reducer's definition blob (stateful event consumer).
  • StoreInstancePublic Store surface.

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
  • 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.
  • 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.
  • PathCompute dotted paths of T, including nested objects and arrays.
  • PathValueResolves the value type at a dotted path `P` inside object/array `T`.
  • PrimitivePrimitive types (terminal leaves in deep traversal).
  • ReducerFunctionPure reducer function (stateful event consumer).
  • 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.