mwg API
    Preparing search index...

    Interface PlayerStatsOptions<T, S>

    interface PlayerStatsOptions<T, S = T> {
        combine: (total: T, summary: S) => T;
        initial: T;
        namespace: string;
        storage?: SaveStorage;
    }

    Type Parameters

    • T
    • S = T
    Index
    combine: (total: T, summary: S) => T

    folds one run's own summary into the running total

    initial: T

    the total before anything has ever been recorded

    namespace: string

    namespaces the stored total, so two games sharing an origin never collide

    storage?: SaveStorage