Spektrum API Reference - v1.2.0
    Preparing search index...

    Interface SpektrumOptions

    interface SpektrumOptions {
        forkLimit?: number;
        historyLimit?: number;
        snapshotEvery?: number;
    }
    Index

    Properties

    forkLimit?: number

    Cap the number of preserved fork tails on forks. Defaults to 50; oldest are evicted on overflow. Set Infinity to disable trimming. Set 0 to discard forks immediately (the onFork hook still fires, but forks stays empty).

    historyLimit?: number

    Cap history.length. When exceeded, oldest entries are dropped (FIFO). With a limit set, replay() to indices below the surviving window is undefined — don't set this if you need unlimited scrubback.

    snapshotEvery?: number

    Capture an appState snapshot every K recorded entries so replay() costs O(K) instead of O(n). Snapshots are dropped alongside the entries they cover when historyLimit trims.