判定ミスを修正
This commit is contained in:
parent
1a10bee3c8
commit
2e5f53c46b
@ -1,7 +1,7 @@
|
|||||||
type getTrainDelayStatus = (
|
type getTrainDelayStatus = (
|
||||||
current: { delay: string; Pos: string },
|
current: { delay: number | "入線" | string; Pos: string },
|
||||||
Station_JP: string
|
Station_JP: string
|
||||||
) => string;
|
) => string | number;
|
||||||
export const getTrainDelayStatus: getTrainDelayStatus = (
|
export const getTrainDelayStatus: getTrainDelayStatus = (
|
||||||
current,
|
current,
|
||||||
Station_JP
|
Station_JP
|
||||||
@ -17,7 +17,7 @@ export const getTrainDelayStatus: getTrainDelayStatus = (
|
|||||||
}
|
}
|
||||||
case Number.isNaN(delay):
|
case Number.isNaN(delay):
|
||||||
return delay;
|
return delay;
|
||||||
case delay === "0":
|
case delay === 0:
|
||||||
return "定刻通り";
|
return "定刻通り";
|
||||||
default:
|
default:
|
||||||
return delay + "分遅れ";
|
return delay + "分遅れ";
|
||||||
|
Loading…
Reference in New Issue
Block a user