I use promises with Mongoose, which usually throws up a deprecation warning for the internal mpromise library Mongoose uses.
The workaround given in most places is to replace Mongoose's promise library with native Promises, like this
mongoose.Promise = global.Promise
However since converting my project to TypeScript my IDE (VS Code) now throws an error saying
message: 'Type 'Function' is not assignable to type 'typeof Promise'.
Property 'fulfilled' is missing in type 'Function'.'
How could I fix this?