When I tslint my whole project using tslint --project tsconfig.json src/**/*.ts
I get lots of tslint errors like these:
Invalid 'await' of a non-Promise value.
These errors pops up in every line where I am awaiting a Bluebird promise. I wonder what I should do to avoid these warnings? At runtime I don't face any issues, however I assume that there is a good reason to fix these issues?
For instance I am using the amqplib library which uses Bluebird for all promises. And every time I await one of the promise based methods I will get a tslint error:
const queueInfo: Replies.AssertQueue = await this.channel.assertQueue(this.jobQueueName);
Question:
What is the best way for awaiting non-Promise values like Bluebird promises?
await Bluebird.resolve(3);
with type-checks enabled. – Pleuron