import libAsync = require("../.."); export = function(): void { console.info("The test for libAsync.control.parallel started."); libAsync.parallel([ function(next: libAsync.AsyncErrorCallback): void { let startedTime: Date = new Date(); setTimeout(function(): void { console.info(`[control.parallel] start at ${startedTime} and ended at ${new Date()}.`); next(); }, 5000 * Math.random()); }, function(next: libAsync.AsyncErrorCallback): void { let startedTime: Date = new Date(); setTimeout(function(): void { console.info(`[control.parallel] start at ${startedTime} and ended at ${new Date()}.`); next(); }, 5000 * Math.random()); }, function(next: libAsync.AsyncErrorCallback): void { let startedTime: Date = new Date(); setTimeout(function(): void { console.info(`[control.parallel] start at ${startedTime} and ended at ${new Date()}.`); next(); }, 5000 * Math.random()); }, function(next: libAsync.AsyncErrorCallback): void { let startedTime: Date = new Date(); setTimeout(function(): void { console.info(`[control.parallel] start at ${startedTime} and ended at ${new Date()}.`); next(); }, 5000 * Math.random()); } ], function(err?: libAsync.NumericDictionary): void { console.info("[control.parallel] done."); }); };