function taskFunc1() {
return 42;
}
function taskFunc2(taskName: string) {
console.log("Running Task: " + taskName);
return fetch("https://example.com/xxxx").then((response) => {
// ...
});
}
function taskFunc3() {
return Promise.all([...]);
}
function taskFunc4() {
return createAllPromise([...]);
}
function taskFunc5(taskName: string) {
return createPromise(() => {
scheduleTimeout(() => {
console.log("Completing task: " + taskName);
resolve(true);
}, 100);
});
}
Identifies the function to call to start and execute the task when its ready to be executed.