diff --git a/@vates/async-each/index.js b/@vates/async-each/index.js index 61ff415be..0a291a6e1 100644 --- a/@vates/async-each/index.js +++ b/@vates/async-each/index.js @@ -9,6 +9,12 @@ class AggregateError extends Error { } } +/** + * @template Item + * @param {Iterable} iterable + * @param {(item: Item, index: number, iterable: Iterable) => Promise} iteratee + * @returns {Promise} + */ exports.asyncEach = function asyncEach(iterable, iteratee, { concurrency = 1, signal, stopOnError = true } = {}) { if (concurrency === 0) { concurrency = Infinity