@bitcobblers/wod-wiki-library
Version:
A specialized markdown-like workout syntax editor and runtime for defining workouts
20 lines (19 loc) • 863 B
TypeScript
import { IRuntimeBlock } from '../../../IRuntimeBlock';
import { ITimerRuntime } from '../../../ITimerRuntime';
import { AbstractRuntimeAction } from './AbstractRuntimeAction';
/**
* Base class for actions that operate only on the current block in the runtime trace.
* These are "leaf node" actions that don't propagate up the block hierarchy.
*/
export declare abstract class LeafNodeAction extends AbstractRuntimeAction {
/**
* Implements the application strategy by getting the current block
* from the runtime trace and applying the action to it.
*/
protected applyImplementation(runtime: ITimerRuntime): void;
/**
* Subclasses must implement this method to define how the action
* should be applied to the current block.
*/
protected abstract applyBlock(runtime: ITimerRuntime, block: IRuntimeBlock): void;
}