Skip to content

Commit

Permalink
docs: add missing return definitions for awaitable functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hargasinski committed Jan 22, 2022
1 parent 6ae4aaa commit 3ad4b3d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/detect.js
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/detectLimit.js
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/detectSeries.js
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/race.js
Expand Up @@ -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([
Expand Down
2 changes: 1 addition & 1 deletion lib/waterfall.js
Expand Up @@ -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([
Expand Down

0 comments on commit 3ad4b3d

Please sign in to comment.