diff --git a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts index 7589380cb..8b472fc47 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -368,7 +368,6 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { // Calculate retirement date // if we want to retire at month x, we need the projectedTotalAmount at month x-1 - // @ts-ignore const lastPeriodDate = sub(this.getRetirementDate(), { months: 1 }); const yearsToRetire = lastPeriodDate.getFullYear() - currentYear; @@ -493,7 +492,7 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { return (this.calculatorForm.get('annualInterestRate')?.value ?? 0) / 100; } - private getRetirementDate(): Date | undefined { + private getRetirementDate(): Date { if (this.periodsToRetire === Number.MAX_SAFE_INTEGER) { return this.DEFAULT_RETIREMENT_DATE; }