export interface CronSpec { /** The expression, aliases expanded, whitespace normalized. */ text: string; minutes: Set; hours: Set; daysOfMonth: Set; /** 1-12 */ months: Set; /** 0 (Sunday) to 6 (Saturday); `7` in the expression means Sunday too. */ daysOfWeek: Set; domRestricted: boolean; dowRestricted: boolean; } export declare class CronError extends Error { constructor(message: string); } export declare const CRON_ALIASES: string[]; /** Parses a five-field cron expression or an alias (`@hourly`, `@daily`, `@midnight`, `@weekly`, `@monthly`, `@yearly`). Throws `CronError`. */ export declare function parseCron(text: string): CronSpec; export interface ZonedParts { year: number; month: number; day: number; hour: number; minute: number; /** 0 = Sunday */ weekday: number; } export declare function isValidTimeZone(timeZone: string): boolean; export declare function zonedParts(date: Date, timeZone?: string): ZonedParts; /** `2026-11-01T01:30`: the wall-clock minute of an instant in the zone. Two instants on a fall-back day can share one key. */ export declare function slotKey(date: Date, timeZone?: string): string; /** True when the wall-clock minute matches the expression. */ export declare function cronMatches(spec: CronSpec, p: ZonedParts): boolean; /** The first occurrence strictly after `after`, or undefined when there is none within about five years. */ export declare function nextRun(spec: CronSpec, after: Date, timeZone?: string): Date | undefined; /** The last occurrence at or before `before`, or undefined. */ export declare function previousRun(spec: CronSpec, before: Date, timeZone?: string): Date | undefined; /** The next `count` occurrences after `after`. */ export declare function nextRuns(spec: CronSpec, after: Date, timeZone?: string, count?: number): Date[];