gameplate - v2.2.0
    Preparing search index...

    Interface Recording<S>

    A complete recording — the initial state plus every action dispatched while the recorder was active. Re-derive any state moment with replay.

    The shape is plain data and JSON-safe (assuming S and the action args are JSON-safe), so you can JSON.stringify it and persist it anywhere.

    interface Recording<S> {
        initialState: S;
        events: readonly RecordedEvent[];
        meta: { startedAt: number; endedAt: number; version: number };
    }

    Type Parameters

    • S
    Index

    Properties

    initialState: S

    State at the moment recorder.start() was called.

    events: readonly RecordedEvent[]

    Every action dispatched between start() and stop(), in order.

    meta: { startedAt: number; endedAt: number; version: number }

    Diagnostic metadata. Ignored by replay — safe to omit on re-import.

    Type Declaration

    • ReadonlystartedAt: number

      Value of the recorder's clock when start() was called.

    • ReadonlyendedAt: number

      Value of the recorder's clock when stop() was called.

    • Readonlyversion: number

      Recording format version. Bumped on any breaking shape change.