MEGAINFRA-WEBAPP/foreman/mod/hooks/schedule.d.mts
DEls e97bf93c7d chore: add foreman scheduler mod; keep it out of the app type-check
foreman/ is a Claude Code mod (job runner + hooks) that imports the
claude-code runtime types, so tsc over the app failed on it. Excluding
it from tsconfig keeps the Next build green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 12:05:50 +02:00

12 lines
579 B
TypeScript

export type Schedule =
| { kind: 'manual' }
| { kind: 'error'; error: string }
| { kind: 'times'; days: number[]; times: number[] }
| { kind: 'every'; days: number[]; everyMin: number; window: [number, number] | null }
export function parseSchedule(text: string): Schedule
export function lastSlot(s: Schedule, now?: Date): Date | null
export function nextSlot(s: Schedule, now?: Date): Date | null
export function slotsBetween(s: Schedule, from: Date, to: Date): Date[]
export function describeSchedule(s: Schedule): string
export function graceMs(s: Schedule): number