UNPKG

financial-calcs

Version:

Reusable financial calculation library for FERS, Social Security, retirement savings, and mortgage amortization

33 lines 986 B
export interface MortgageAmortizationInput { loanAmount: number; annualRate: number; termYears: number; startDate?: Date; extraPayment?: number; } export interface AmortizationRow { year: number; month: number; date: string; payment: number; principal: number; interest: number; balance: number; } export interface YearlyAmortizationRow { year: number; month: number; date: string; payment: number; principal: number; interest: number; balance: number; } export interface MortgageValidationError { field: keyof MortgageAmortizationInput; message: string; } export declare function validateMortgageInput(input: MortgageAmortizationInput): MortgageValidationError[]; export declare function calculateMortgageAmortization(input: MortgageAmortizationInput): AmortizationRow[]; export declare function groupByYear(rows: AmortizationRow[]): YearlyAmortizationRow[]; //# sourceMappingURL=amortization.d.ts.map