Skip to content

Commit

Permalink
fix: prperly type time property in TimeObject
Browse files Browse the repository at this point in the history
  • Loading branch information
khawarizmus committed Dec 18, 2022
1 parent 7978bc0 commit 63b8e82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ReactiveCalculator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ 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())!,
}
}

private _calculateNextPrayer() {
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())!,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/types/TimeObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface FormattedTimeObject {

export interface TimeObject {
name: TimesNamesType
time: Date | null
time: Date
}

export interface TimeEventObject {
Expand Down

0 comments on commit 63b8e82

Please sign in to comment.