UNPKG

@bitcobblers/wod-wiki-library

Version:

A specialized markdown-like workout syntax editor and runtime for defining workouts

27 lines (26 loc) 940 B
import { ITimerRuntime } from '../../ITimerRuntime'; import { IRuntimeBlock } from '../../IRuntimeBlock'; import { RuntimeMetric } from '../../RuntimeMetric'; import { LeafNodeAction } from './base/LeafNodeAction'; /** * Action to update metrics for a specific block * This allows blocks to update their metrics during execution */ export declare class UpdateMetricsAction extends LeafNodeAction { private blockKey; private metrics; readonly name = "update-metrics"; /** * Create a new UpdateMetricsAction * @param blockKey Block key to update metrics for * @param metrics Updated metrics */ constructor(blockKey: string, metrics: RuntimeMetric[]); /** * Apply the metrics update to a specific block * * @param runtime The timer runtime * @param block The block to apply the action to */ protected applyBlock(runtime: ITimerRuntime, block: IRuntimeBlock): void; }