"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function promiseSerial(tasks, fn) {
    return tasks.reduce(function (promise, task, index) { return promise.then(function () { return fn(task, index); }); }, Promise.resolve());
}
exports.promiseSerial = promiseSerial;
