mwg API
    Preparing search index...

    Class LastRun

    The newest recording, always kept, bounded: what "watch the previous run" reads. One recording deep by design (the newest replaces the older one), stored through the same SaveStorage a SaveSystem slot uses, so it survives a reload and lands in the in-memory fallback under file://.

    import { LastRun, Recorder } from '@datamoc/mwg/core';

    declare const recorder: Recorder;
    const last = new LastRun({ namespace: 'my-game' });
    last.keep(recorder.toJSON());
    const kept = last.load();
    console.log(kept ? kept.events.length : 'no run yet');
    Index
    • Keeps the newest recording, replacing any previous one. An oversized tail keeps its newest events.

      Parameters

      Returns void