import * as mongoModule from 'mongodb';
The code snippet above demonstrates the standard ES6 method of importing mongodb in Node.js. It is interesting to note that while using
import mongodbModule from 'mongodb'
is expected to result in an error due to the mongodb module not having a default export, it still functions correctly. This discovery led me to question whether the mongodb module is actually a TypeScript file.