Mongodb – Typescript return type changes with async keyword
This seems really strange to me. I have a function to count documents from a collection async getDocCount(): Promise<number> { return MyModel.countDocuments({}); } All good. But there's no reason to have async when you are returning a Promise. So I…