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 0986653e8..d8258ed24 100644 --- a/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts +++ b/libs/ui/src/lib/fire-calculator/fire-calculator.component.ts @@ -13,12 +13,11 @@ import { ChangeDetectorRef, Component, ElementRef, - EventEmitter, Input, OnChanges, OnDestroy, - Output, - ViewChild + ViewChild, + output } from '@angular/core'; import { FormBuilder, @@ -90,13 +89,6 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { @Input() retirementDate: Date; @Input() savingsRate = 0; - @Output() annualInterestRateChanged = new EventEmitter(); - @Output() calculationCompleted = - new EventEmitter(); - @Output() projectedTotalAmountChanged = new EventEmitter(); - @Output() retirementDateChanged = new EventEmitter(); - @Output() savingsRateChanged = new EventEmitter(); - @ViewChild('chartCanvas') chartCanvas: ElementRef; public calculatorForm = this.formBuilder.group({ @@ -111,6 +103,13 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { public minDate = addDays(new Date(), 1); public periodsToRetire = 0; + protected readonly annualInterestRateChanged = output(); + protected readonly calculationCompleted = + output(); + protected readonly projectedTotalAmountChanged = output(); + protected readonly retirementDateChanged = output(); + protected readonly savingsRateChanged = output(); + private readonly CONTRIBUTION_PERIOD = 12; private readonly DEFAULT_RETIREMENT_DATE = startOfMonth( addYears(new Date(), 10) @@ -302,8 +301,6 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy { return `Total: ${new Intl.NumberFormat(this.locale, { currency: this.currency, - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore: Only supported from ES2020 or later currencyDisplay: 'code', style: 'currency' }).format(totalAmount)}`;