I'm working with Angular 8 and I'm facing this message:
'await' has no effect on the type of this expression.ts(80007)
What I'm trying to understand is the behavior of await on void functions.
Example:
const func1 = () => console.log(1);
const func2 = () => console.log(2);
const func3 = () => console.log(3);
// As you can see above those 3 functions are void
const asyncfunc = async () => {
await func1();
await func2();
await func3();
}
From what I read on the web using await on void function will return an undefined wrapped in a promise,
So that means await does effect in this case?
If so, then why I'm getting the message that await does not effect in this case.
is it only tslint or I misunderstood the behavior of await on void functions?
Do I have to return a promise from those function the achieve the effect of the await?