@bitcobblers/wod-wiki-library
Version:
A specialized markdown-like workout syntax editor and runtime for defining workouts
34 lines (33 loc) • 821 B
TypeScript
/**
* WorkbookStorage - Utility for managing workout data in local storage
*/
export interface WorkoutEntry {
id: string;
title: string;
content: string;
lastModified: number;
}
export declare class WorkbookStorage {
private readonly STORAGE_KEY;
/**
* Load all workouts from local storage
*/
getWorkouts(): WorkoutEntry[];
/**
* Save a workout to local storage
*/
saveWorkout(workout: WorkoutEntry): void;
/**
* Delete a workout from local storage
*/
deleteWorkout(id: string): void;
/**
* Get a single workout by ID
*/
getWorkout(id: string): WorkoutEntry | undefined;
/**
* Create a new empty workout
*/
createWorkout(title?: string): WorkoutEntry;
}
export declare const workbookStorage: WorkbookStorage;