Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2021 08:20
What would you like to do?
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