import libAsync = require("../.."); export = function(): void { console.info("The test for libAsync.control.loopIf started."); let i: number = 0; libAsync.loopIf(function(cb: libAsync.BooleanCallback): void { return cb(i++ < 5); }, function(next: libAsync.AsyncErrorCallback): void { console.info(`[control.loopIf] ${i}.`); next(); }, function(err?: Error): void { console.info("[control.loopIf] completed."); }); };