CustomAggFunc
Since v1.31.0
Custom aggregation function that receives an array of numeric values and returns a single aggregated result.
type CustomAggFunc = (values: number[]) => numberExample
Section titled “Example”const weightedAvg: CustomAggFunc = (values) => { const total = values.reduce((a, b) => a + b, 0); return total / values.length;};