gameplate - v2.2.0
    Preparing search index...

    Interface Recorder<S>

    Recorder handle returned by createRecorder. Pass tap to createGame({ tap }), then drive with start / stop.

    interface Recorder<S> {
        tap: ActionTap;
        start: (initialState: S) => void;
        stop: () => Recording<S>;
        clear: () => void;
        isRecording: () => boolean;
    }

    Type Parameters

    • S
    Index

    Properties

    Hand this to createGame({ tap }). No-op while not recording.

    start: (initialState: S) => void

    Begin a fresh recording, snapshotting initialState. Discards any in-progress recording — call stop() first to keep it.

    stop: () => Recording<S>

    Stop the in-progress recording and return it. Subsequent calls return the same value until start() is called again.

    If start() was never called.

    clear: () => void

    Discard any in-progress or completed recording.

    isRecording: () => boolean

    true between start() and stop().