@bitcobblers/wod-wiki-library
Version:
A specialized markdown-like workout syntax editor and runtime for defining workouts
34 lines (33 loc) • 1.18 kB
TypeScript
import { ResultSpan } from '../ResultSpan';
import { IResultSpanAggregate } from './IResultSpanAggregate';
/**
* Base class for ResultSpan aggregators.
* Provides common functionality for all aggregator implementations.
*/
export declare abstract class ResultSpanAggregateBase implements IResultSpanAggregate {
private _id;
private _displayName;
/**
* Creates a new instance of ResultSpanAggregateBase.
*
* @param id - Unique identifier for this aggregator
* @param displayName - Human-readable display name for this aggregator
*/
constructor(id: string, displayName: string);
/**
* Gets the unique identifier for this aggregator.
*/
get id(): string;
/**
* Gets the display name for this aggregator.
*/
get displayName(): string;
/**
* Process a collection of ResultSpan objects to calculate aggregated statistics.
* This method must be implemented by derived classes.
*
* @param spans - Collection of ResultSpan objects to aggregate
* @returns An object containing the aggregated statistics
*/
abstract aggregate(spans: ResultSpan[]): Record<string, any>;
}