From 63b8e82d29630da1908280e5f710313f719b4ee9 Mon Sep 17 00:00:00 2001 From: gimy Date: Mon, 19 Dec 2022 00:45:54 +0800 Subject: [PATCH] fix: prperly type time property in TimeObject --- src/ReactiveCalculator.ts | 4 ++-- src/types/TimeObject.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ReactiveCalculator.ts b/src/ReactiveCalculator.ts index 6c9dcd1..11bc514 100644 --- a/src/ReactiveCalculator.ts +++ b/src/ReactiveCalculator.ts @@ -241,7 +241,7 @@ export class ReactiveCalculator extends BaseCalculator { this._logger.debug('_calculateCurrentPrayer function invoked.') this._currentPrayer = { name: this._prayerTimesCalculator.currentPrayer(), - time: this._prayerTimesCalculator.timeForPrayer(this._prayerTimesCalculator.currentPrayer()), + time: this._prayerTimesCalculator.timeForPrayer(this._prayerTimesCalculator.currentPrayer())!, } } @@ -249,7 +249,7 @@ export class ReactiveCalculator extends BaseCalculator { this._logger.debug('_calculateNextPrayer function invoked.') this._nextPrayer = { name: this._prayerTimesCalculator.nextPrayer(), - time: this._prayerTimesCalculator.timeForPrayer(this._prayerTimesCalculator.nextPrayer()), + time: this._prayerTimesCalculator.timeForPrayer(this._prayerTimesCalculator.nextPrayer())!, } } diff --git a/src/types/TimeObject.ts b/src/types/TimeObject.ts index 08cfb6c..36300d5 100644 --- a/src/types/TimeObject.ts +++ b/src/types/TimeObject.ts @@ -47,7 +47,7 @@ export interface FormattedTimeObject { export interface TimeObject { name: TimesNamesType - time: Date | null + time: Date } export interface TimeEventObject {