From 633f66b09b40f62f61875d5fbcb0efd3168029a6 Mon Sep 17 00:00:00 2001 From: mstfyldz Date: Sat, 8 Aug 2026 17:22:39 +0300 Subject: [PATCH] Fix TypeScript error for officeparser --- src/controllers/document.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/document.controller.ts b/src/controllers/document.controller.ts index 53db585..ee80272 100644 --- a/src/controllers/document.controller.ts +++ b/src/controllers/document.controller.ts @@ -39,7 +39,7 @@ export const uploadDocument = async (req: AuthenticatedRequest, res: Response) = } else { try { // officeParser natively supports pdf, docx, doc, rtf, txt, etc. - extractedText = await officeParser.parseOffice(file.buffer); + extractedText = (await officeParser.parseOffice(file.buffer)) as unknown as string; } catch (err: any) { console.error('officeParser Error:', err); return res.status(400).json({ error: 'Dosya formatı okunamadı veya desteklenmiyor.' });