From 3eef4c2a0e0b68e9e919f81325fd45d2add9ca9c Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 15 Feb 2026 07:40:58 -0800 Subject: [PATCH] fix ts errors --- apps/cron/20260201-000000/lib/schedules.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/cron/20260201-000000/lib/schedules.ts b/apps/cron/20260201-000000/lib/schedules.ts index 63b43cd..6c46bd9 100644 --- a/apps/cron/20260201-000000/lib/schedules.ts +++ b/apps/cron/20260201-000000/lib/schedules.ts @@ -86,9 +86,9 @@ function parseTime(s: string): { hour: number, minute: number } | null { // 12h: "7am", "7pm", "7:30am", "7:30pm", "12am", "12:00pm" const m12 = s.match(/^(\d{1,2})(?::(\d{2}))?\s*(am|pm)$/i) if (m12) { - let hour = parseInt(m12[1]) + let hour = parseInt(m12[1]!) const minute = m12[2] ? parseInt(m12[2]) : 0 - const period = m12[3].toLowerCase() + const period = m12[3]!.toLowerCase() if (hour < 1 || hour > 12 || minute > 59) return null if (period === 'am' && hour === 12) hour = 0 else if (period === 'pm' && hour !== 12) hour += 12 @@ -98,8 +98,8 @@ function parseTime(s: string): { hour: number, minute: number } | null { // 24h: "14:00", "0:00", "23:59" const m24 = s.match(/^(\d{1,2}):(\d{2})$/) if (m24) { - const hour = parseInt(m24[1]) - const minute = parseInt(m24[2]) + const hour = parseInt(m24[1]!) + const minute = parseInt(m24[2]!) if (hour > 23 || minute > 59) return null return { hour, minute } }