pond-ts API Reference (core)
    Preparing search index...

    Type Alias AggregateMap<S>

    AggregateMap: Readonly<
        Record<string, AggregateReducer | AggregateOutputSpec<S>>,
    >

    Unified per-output-key value for an aggregate / rolling / reduce mapping. One mapping may freely mix two forms per key:

    • Shorthandcpu: 'avg': the key names a source column and the value is a reducer (built-in name or CustomAggregateReducer). Output name == source name == key.
    • Speccpu_p95: { from: 'cpu', using: 'p95' }: the key names an arbitrary output column, from names the source column, using names the reducer. This is the only form that can apply multiple reducers to one source column or rename the output.

    This shape is deliberately permissive (any reducer or spec on any key) — it is the assignment surface, used by implementation signatures, internal delegation, and pre-widened values. The public aggregate / rolling / reduce signatures additionally constrain inline literals through ValidatedAggregateMap, which restores the per-key compile-time guards the pre-unification overloads had. The result schema dispatches per output key (see AggregateColumns), so mixing the two forms keeps every output column.

    Before v0.23.0 the two forms lived on separate overloads (AggregateMap for shorthand, AggregateOutputMap for specs); a mixed literal silently resolved to the shorthand overload and dropped every spec-keyed output column from the result type (audit v2 §5 F1). Collapsing to one overload over this unified map fixes that.

    Type Parameters