footprintjs - v11.2.0
    Preparing search index...

    Class BoundaryStateStore<TState>

    Type Parameters

    • TState
    Index
    • Reset all transient state. Called by recorder composers from their own clear() method, which the executor invokes before each run.

      Dev mode warns if any boundaries are still active when called — likely indicates a missed stop upstream. Leaked keys are listed (truncated to 10) so the wiring bug is findable.

      Returns void

    • All currently-active boundaries.

      Type-only readonly: TypeScript prevents mutation through ReadonlyMap, but a runtime cast or non-TS consumer can mutate the underlying Map and corrupt state. Don't.

      Returns ReadonlyMap<string, TState>

    • Open a new boundary with initial transient state. If a boundary with the same key is already active, the prior state is overwritten (last-writer-wins). Dev mode warns — usually indicates a missed stop upstream.

      Parameters

      Returns void

    • Close the boundary identified by key and return its FINAL transient state (so the consumer can do any cleanup — e.g., emit a snapshot to a SequenceStore for durable storage). The dropped-update count for key restarts, as it does on start.

      Parameters

      • key: string

      Returns TState | undefined

    • Evolve the transient state of an active boundary using a pure updater function. Silent no-op if no boundary is active for key (defensive against out-of-order events). Dev mode logs a rate- limited warning. A boundary is active from start to stop whatever its state holds: one started with undefined is updated.

      Parameters

      Returns void