2.1 KiB
2.1 KiB
Non-Critical Type Errors - Fix Progress
Status: In Progress
Fixing non-critical TypeScript type errors systematically.
✅ Completed Fixes
1. AccountType Enum Issues
- Files Fixed:
src/integration/plugins/temenos-adapter.tssrc/integration/plugins/flexcube-adapter.tssrc/integration/plugins/iso20022-adapter.tssrc/integration/plugins/swift-adapter.ts
- Fix: Imported
AccountTypeenum and used enum values instead of string literals
2. JsonValue Type Issues (Partial)
- Files Fixed:
src/core/accounting/reporting-engine.service.ts- AddedPrisma.InputJsonValuecastingsrc/core/admin/dbis-admin/controls/corridor-controls.service.ts- AddedPrisma.InputJsonValuecasting
⚠️ Remaining Issues
Given the large number of errors (hundreds), the remaining errors fall into these categories:
-
JsonValue Type Mismatches (~100+ instances)
- Need to cast
Record<string, unknown>toPrisma.InputJsonValue - Pattern:
as Prisma.InputJsonValue
- Need to cast
-
Property Access Errors (~50+ instances)
- Missing properties in Prisma query results
- Often due to incorrect
includestatements or schema mismatches
-
Missing Return Statements (~100+ instances)
- Route handlers missing explicit returns in all code paths
- Pattern: Add
returnstatements or throw errors
-
Decimal Method Errors (~30+ instances)
- Using
isGreaterThan,isLessThaninstead ofgreaterThan,lessThan - Pattern: Replace method names
- Using
-
Unknown Type Errors (~20+ instances)
- Objects typed as
unknownneed type assertions - Pattern: Add proper type assertions
- Objects typed as
Strategy
Due to the volume of errors, I'm focusing on:
- High-impact fixes: Fixing the most common patterns first
- Systematic approach: Creating patterns that can be applied broadly
- Priority files: Core services and commonly used code paths
Next Steps
Continue fixing errors systematically, focusing on:
- JsonValue issues in core services
- Property access errors that are easy to fix
- Missing return statements in route handlers