60 lines
2.1 KiB
Markdown
60 lines
2.1 KiB
Markdown
|
|
# 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.ts`
|
||
|
|
- `src/integration/plugins/flexcube-adapter.ts`
|
||
|
|
- `src/integration/plugins/iso20022-adapter.ts`
|
||
|
|
- `src/integration/plugins/swift-adapter.ts`
|
||
|
|
- **Fix**: Imported `AccountType` enum and used enum values instead of string literals
|
||
|
|
|
||
|
|
### 2. JsonValue Type Issues (Partial)
|
||
|
|
- **Files Fixed**:
|
||
|
|
- `src/core/accounting/reporting-engine.service.ts` - Added `Prisma.InputJsonValue` casting
|
||
|
|
- `src/core/admin/dbis-admin/controls/corridor-controls.service.ts` - Added `Prisma.InputJsonValue` casting
|
||
|
|
|
||
|
|
## ⚠️ Remaining Issues
|
||
|
|
|
||
|
|
Given the large number of errors (hundreds), the remaining errors fall into these categories:
|
||
|
|
|
||
|
|
1. **JsonValue Type Mismatches** (~100+ instances)
|
||
|
|
- Need to cast `Record<string, unknown>` to `Prisma.InputJsonValue`
|
||
|
|
- Pattern: `as Prisma.InputJsonValue`
|
||
|
|
|
||
|
|
2. **Property Access Errors** (~50+ instances)
|
||
|
|
- Missing properties in Prisma query results
|
||
|
|
- Often due to incorrect `include` statements or schema mismatches
|
||
|
|
|
||
|
|
3. **Missing Return Statements** (~100+ instances)
|
||
|
|
- Route handlers missing explicit returns in all code paths
|
||
|
|
- Pattern: Add `return` statements or throw errors
|
||
|
|
|
||
|
|
4. **Decimal Method Errors** (~30+ instances)
|
||
|
|
- Using `isGreaterThan`, `isLessThan` instead of `greaterThan`, `lessThan`
|
||
|
|
- Pattern: Replace method names
|
||
|
|
|
||
|
|
5. **Unknown Type Errors** (~20+ instances)
|
||
|
|
- Objects typed as `unknown` need type assertions
|
||
|
|
- Pattern: Add proper type assertions
|
||
|
|
|
||
|
|
## Strategy
|
||
|
|
|
||
|
|
Due to the volume of errors, I'm focusing on:
|
||
|
|
1. **High-impact fixes**: Fixing the most common patterns first
|
||
|
|
2. **Systematic approach**: Creating patterns that can be applied broadly
|
||
|
|
3. **Priority files**: Core services and commonly used code paths
|
||
|
|
|
||
|
|
## Next Steps
|
||
|
|
|
||
|
|
Continue fixing errors systematically, focusing on:
|
||
|
|
1. JsonValue issues in core services
|
||
|
|
2. Property access errors that are easy to fix
|
||
|
|
3. Missing return statements in route handlers
|
||
|
|
|