From 2e5f53c46bdc5bb3c6370a0b1586da936ae20bda Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Tue, 20 Aug 2024 08:29:38 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E5=AE=9A=E3=83=9F=E3=82=B9=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/getTrainDelayStatus.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/getTrainDelayStatus.ts b/lib/getTrainDelayStatus.ts index 5dd722f..af7e163 100644 --- a/lib/getTrainDelayStatus.ts +++ b/lib/getTrainDelayStatus.ts @@ -1,7 +1,7 @@ type getTrainDelayStatus = ( - current: { delay: string; Pos: string }, + current: { delay: number | "入線" | string; Pos: string }, Station_JP: string -) => string; +) => string | number; export const getTrainDelayStatus: getTrainDelayStatus = ( current, Station_JP @@ -17,7 +17,7 @@ export const getTrainDelayStatus: getTrainDelayStatus = ( } case Number.isNaN(delay): return delay; - case delay === "0": + case delay === 0: return "定刻通り"; default: return delay + "分遅れ";