Feature/statement parsing #1
Reference in New Issue
Block a user
Delete Branch "feature/statement-parsing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The new statements module was hitting type-safety errors from typescript-eslint's recommendedTypeChecked config: - parse-statement.dto.ts: tighten the Transform decorator's signature so the JSON.parse path returns a typed object or undefined, not `any`. - duplicate-detector.service.ts: drop the unused WEAK_DESCRIPTION_SIMILARITY constant left over from earlier logic. - csv.parser.ts and ofx.parser.ts: the parse() methods were `async` without any `await` (require-await). Convert them to non-async functions that return a Promise — wrap parseSync() in a try/catch so thrown errors still surface as rejected promises for spec callers that use `.rejects.toThrow()`. - ofx.parser.ts: replace `require('node-ofx-parser')` with a typed `import * as ofxLib`, backed by a hand-written declaration file at src/types/node-ofx-parser.d.ts that captures the bank + credit-card transaction shapes we consume. - pdf.parser.ts: import the typed `PDFParse` class from pdf-parse directly instead of lazy-requiring it as `any`. Keep the test seam but back it with a typed PdfTextExtractor function instead of the ad-hoc `any` shape. Also pulls in the prettier reformat that `eslint --fix` produced across the touched files and their specs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>