From 04f30ca3e7e82a5c3f1fd0db41356e55e9eb3360 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 10 Nov 2025 14:06:02 -0500 Subject: [PATCH] Fix TypeScript errors in financial validation --- backend/src/services/simpleDocumentProcessor.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/services/simpleDocumentProcessor.ts b/backend/src/services/simpleDocumentProcessor.ts index c62c0c7..8ca5bb7 100644 --- a/backend/src/services/simpleDocumentProcessor.ts +++ b/backend/src/services/simpleDocumentProcessor.ts @@ -536,9 +536,9 @@ Focus on finding these specific fields in the document. Extract exact values, nu const otherValues = otherPeriods .map(p => { const val = extractNumericValue(financials[p]!.revenue || ''); - return val !== null && val > 0 ? { period: p, value: val } : null; + return val !== null && val > 0 ? { period: p as 'fy3' | 'fy2' | 'fy1' | 'ltm', value: val } : null; }) - .filter((v): v is { period: string; value: number } => v !== null); + .filter((v): v is { period: 'fy3' | 'fy2' | 'fy1' | 'ltm'; value: number } => v !== null); if (otherValues.length > 0) { const avgOtherValue = otherValues.reduce((a, b) => a + b.value, 0) / otherValues.length;