Yes you should remove async
.
You should not force to use async
to the class that implements it. There are other ways to return a Promise
, not just async
.
Edit:
Since it is not clear for some people why the async
is not important. Here a couple of ways to return a promise:
async function iAmAsync(): Promise<boolean>{
return false;
}
function iAmNotAsync(): Promise<boolean>{
return new Promise(resolve => resolve(false));
}
function iAmAlsoNotAsync(): Promise<boolean>{
return new Observable().pipe(first()).toPromise();
}
iAmAsync().then();
iAmNotAsync().then();
Playground Link