From ecda482213de4c6895e5087644c7deeb4491dc39 Mon Sep 17 00:00:00 2001 From: Domagoj Kriskovic Date: Fri, 17 Apr 2026 09:31:10 +0200 Subject: [PATCH] add JSDoc comments for FileWriter methods and promises GitOrigin-RevId: a7b2229b12973a8ebf4a1d6b94159efbd63df02a --- .../web/app/src/infrastructure/FileWriter.mjs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/services/web/app/src/infrastructure/FileWriter.mjs b/services/web/app/src/infrastructure/FileWriter.mjs index e878f3db94..236e1a87e7 100644 --- a/services/web/app/src/infrastructure/FileWriter.mjs +++ b/services/web/app/src/infrastructure/FileWriter.mjs @@ -51,6 +51,21 @@ export class SizeLimitedStream extends Transform { } } +/** + * @type {{ + * ensureDumpFolderExists: () => void, + * writeLinesToDisk: (identifier: any, lines: any, callback?: any) => void, + * writeContentToDisk: (identifier: any, content: any, callback?: any) => void, + * writeStreamToDisk: (identifier: any, stream: any, options?: any, callback?: any) => void, + * writeUrlToDisk: (identifier: any, url: any, options?: any, callback?: any) => void, + * promises: { + * writeLinesToDisk: (identifier: any, lines: any) => Promise, + * writeContentToDisk: (identifier: any, content: any) => Promise, + * writeStreamToDisk: (identifier: any, stream: any, options?: any) => Promise, + * writeUrlToDisk: (identifier: any, url: any, options?: any) => Promise, + * }, + * }} + */ const FileWriter = { ensureDumpFolderExists() { fs.mkdirSync(Settings.path.dumpFolder, { recursive: true })