Sfoglia il codice sorgente

add JSDoc comments for FileWriter methods and promises

GitOrigin-RevId: a7b2229b12973a8ebf4a1d6b94159efbd63df02a
Domagoj Kriskovic 3 mesi fa
parent
commit
ecda482213
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. 15 0
      services/web/app/src/infrastructure/FileWriter.mjs

+ 15 - 0
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<string>,
+ *     writeContentToDisk: (identifier: any, content: any) => Promise<string>,
+ *     writeStreamToDisk: (identifier: any, stream: any, options?: any) => Promise<string>,
+ *     writeUrlToDisk: (identifier: any, url: any, options?: any) => Promise<string>,
+ *   },
+ * }}
+ */
 const FileWriter = {
   ensureDumpFolderExists() {
     fs.mkdirSync(Settings.path.dumpFolder, { recursive: true })