import { PeprStore } from "./storage"; export type Unit = "seconds" | "second" | "minute" | "minutes" | "hours" | "hour"; export interface Schedule { /** * * The name of the store */ name: string; /** * The value associated with a unit of time */ every: number; /** * The unit of time */ unit: Unit; /** * The code to run */ run: () => void; /** * The start time of the schedule */ startTime?: Date | undefined; /** * The number of times the schedule has run */ completions?: number | undefined; /** * Tje intervalID to clear the interval */ intervalID?: NodeJS.Timeout; } export declare class OnSchedule implements Schedule { intervalId: NodeJS.Timeout | null; store: PeprStore | undefined; name: string; completions?: number | undefined; every: number; unit: Unit; run: () => void; startTime?: Date | undefined; duration: number | undefined; lastTimestamp: Date | undefined; constructor(schedule: Schedule); setStore(store: PeprStore): void; startInterval(): void; /** * Checks the store for this schedule and sets the values if it exists * @returns */ checkStore(): void; /** * Saves the schedule to the store * @returns */ saveToStore(): void; /** * Gets the durations in milliseconds */ getDuration(): void; /** * Sets up the interval */ setupInterval(): void; /** * Starts the interval */ start(): void; /** * Stops the interval */ stop(): void; } //# sourceMappingURL=schedule.d.ts.map