@leanchuck/core - v0.1.1
    Preparing search index...

    Interface RollupEntry<T>

    A single aggregated group.

    interface RollupEntry<T> {
        key: string;
        value: number;
        count: number;
        average: number;
        metrics: Record<string, number>;
        items: T[];
    }

    Type Parameters

    • T

      The shape of the source item.

    Index

    Properties

    key: string

    The grouping key (always a string).

    value: number

    Summed primary value across the group.

    count: number

    Number of source items in the group.

    average: number

    value / count, rounded to the configured precision.

    metrics: Record<string, number>

    Summed values for each metric named in RollupOptions.metrics.

    items: T[]

    The source items that fell into this group.