summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Argasinski <argasinski.hubert@gmail.com>2022-01-21 19:56:50 -0500
committerHubert Argasinski <argasinski.hubert@gmail.com>2022-01-21 19:56:50 -0500
commit3ad4b3d3c8c9a75ad5548daadd28a815fbb94cef (patch)
tree587c3970a4a32369885c96577de5bca1682b301f
parent6ae4aaafa3541f0a5179e97d8263af9bd53d97eb (diff)
downloadasync-add_missing_return_docs.tar.gz
docs: add missing return definitions for awaitable functionsadd_missing_return_docs
-rw-r--r--lib/detect.js2
-rw-r--r--lib/detectLimit.js2
-rw-r--r--lib/detectSeries.js2
-rw-r--r--lib/race.js2
-rw-r--r--lib/waterfall.js2
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/detect.js b/lib/detect.js
index 43fab1e..5c8fd6e 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -27,7 +27,7 @@ import awaitify from './internal/awaitify.js'
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
- * @returns A Promise, if no callback is passed
+ * @returns {Promise} a promise, if a callback is omitted
* @example
*
* // dir1 is a directory that contains file1.txt, file2.txt
diff --git a/lib/detectLimit.js b/lib/detectLimit.js
index 8ba89a0..0765fe8 100644
--- a/lib/detectLimit.js
+++ b/lib/detectLimit.js
@@ -23,7 +23,7 @@ import awaitify from './internal/awaitify.js'
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
- * @returns a Promise if no callback is passed
+ * @returns {Promise} a promise, if a callback is omitted
*/
function detectLimit(coll, limit, iteratee, callback) {
return createTester(bool => bool, (res, item) => item)(eachOfLimit(limit), coll, iteratee, callback)
diff --git a/lib/detectSeries.js b/lib/detectSeries.js
index 18a7b17..4cc9d2b 100644
--- a/lib/detectSeries.js
+++ b/lib/detectSeries.js
@@ -21,7 +21,7 @@ import awaitify from './internal/awaitify.js'
* Result will be the first item in the array that passes the truth test
* (iteratee) or the value `undefined` if none passed. Invoked with
* (err, result).
- * @returns a Promise if no callback is passed
+ * @returns {Promise} a promise, if a callback is omitted
*/
function detectSeries(coll, iteratee, callback) {
return createTester(bool => bool, (res, item) => item)(eachOfLimit(1), coll, iteratee, callback)
diff --git a/lib/race.js b/lib/race.js
index 0d4d4bf..6cbe513 100644
--- a/lib/race.js
+++ b/lib/race.js
@@ -18,7 +18,7 @@ import awaitify from './internal/awaitify.js'
* @param {Function} callback - A callback to run once any of the functions have
* completed. This function gets an error or result from the first function that
* completed. Invoked with (err, result).
- * @returns undefined
+ * @returns {Promise} a promise, if a callback is omitted
* @example
*
* async.race([
diff --git a/lib/waterfall.js b/lib/waterfall.js
index 92783b2..e29ea42 100644
--- a/lib/waterfall.js
+++ b/lib/waterfall.js
@@ -21,7 +21,7 @@ import awaitify from './internal/awaitify.js'
* @param {Function} [callback] - An optional callback to run once all the
* functions have completed. This will be passed the results of the last task's
* callback. Invoked with (err, [results]).
- * @returns undefined
+ * @returns {Promise} a promise, if a callback is omitted
* @example
*
* async.waterfall([