Answer the question
In order to leave comments, you need to log in
Typescript, mandatory await promise void function warning, or at least a warning?
async function test() : Promise<void>{
//some async actions
}
async function test2() : Promise<number>
{
await test();
return 123;
}
test2().then(() => {
alert('ok');
});
async function test() : Promise<void>{
//some async actions
}
async function test2() : Promise<number>
{
test();
return 123;
}
test2().then(() => {
alert('ok');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question