@bitcobblers/wod-wiki-library
Version:
A specialized markdown-like workout syntax editor and runtime for defining workouts
21 lines (20 loc) • 851 B
TypeScript
import { IRuntimeAction } from '../../IRuntimeAction';
import { ITimerRuntime } from '../../ITimerRuntime';
import { IRuntimeEvent } from '../../IRuntimeEvent';
import { EventHandler } from '../EventHandler';
export declare class SaveEvent implements IRuntimeEvent {
constructor(timestamp?: Date);
timestamp: Date;
name: string;
}
/**
* SaveHandler: Handles 'save' events by generating a Markdown (.md) file from the current workout script
* and triggering a browser download. Integrates with the Runtime event/action system.
*
* SOLID: Single responsibility (file generation), open for extension (different formats),
* easy to test and maintain.
*/
export declare class SaveHandler extends EventHandler {
protected eventType: string;
protected handleEvent(_event: IRuntimeEvent, runtime: ITimerRuntime): IRuntimeAction[];
}