mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 00:23:12 +09:00
Fix incorrect JSDoc async return annotations
The return type of an async function should be documented as a Promise of what the function returns as this is what JSDoc expects.
This commit is contained in:
1 parent
a7dedcd3b7
commit
2d8b35291d
12 files changed
+33
-33
No files matched your search
@@ -13,7 +13,7 @@ const crypto = require("crypto"); // needed for getTempFile
|
||||
* @param {function(string): boolean} filter -
|
||||
* Optional function to filter out files to ignore. Should return true
|
||||
* if the file is to be considered.
|
||||
* @returns {?string}
|
||||
* @returns {Promise<?string>}
|
||||
* Name of the file with the newest timestamp or null if the
|
||||
* directory contains no files.
|
||||
*/
|
||||
@@ -80,8 +80,8 @@ async function directorySize(directory) {
|
||||
* @param {string} directory - directory to check in.
|
||||
* @param {string} name - file name to check for, may have extension.
|
||||
* @param {string} extension - dot extension used for the file name.
|
||||
* @returns {string} modified name with extension that likely does not exist
|
||||
* in the folder
|
||||
* @returns {Promise<string>} modified name with extension that likely does
|
||||
* not exist in the folder
|
||||
*/
|
||||
async function findUnusedName(directory, name, extension = "") {
|
||||
if (extension && name.endsWith(extension)) {
|
||||
|
||||
Reference in new issue
Block a user