7

```
public someMethod(index: string): Promise<void> {
return Promise.resolve(someAsyncFunction().then(() => {
return;
})
.catch((error) => {
this.logger.error(error);
throw error;
});
```

Somebdoy doesn't know their async / await syntax but they wanted aboard the promise-hype train. There is an entire class in that style.

Comments
  • 1
    Wtf, even an copy and paste from stack overflow would have been better!
Add Comment