Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
task-executor.ts
let taskExecutor = async (task: {delay: number, index: string}) => {
console.log(` --> Task ${task.index} started`);
await sleep(task.delay);
console.log(` <-- Task ${task.index} finished`);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment