gameplate - v2.2.0
    Preparing search index...

    Interface ReplayOptions<S>

    Options for replay.

    interface ReplayOptions<S> {
        until?: number;
        onTick?: (
            state: DeepReadonly<S>,
            event: RecordedEvent,
            index: number,
        ) => void;
        dev?: boolean;
    }

    Type Parameters

    • S
    Index

    Properties

    Properties

    until?: number

    Apply at most this many events from the recording (clamped to [0, events.length]). Use to scrub to a specific point.

    onTick?: (state: DeepReadonly<S>, event: RecordedEvent, index: number) => void

    Called after each applied event with the resulting state.

    dev?: boolean

    When true, every intermediate state is deep-frozen — surfaces accidental action mutations as TypeErrors. Slower; use in tests, not production.

    The recording's initialState is structured-cloned before freezing, so the caller's reference is never mutated.