Typescript compiles into Javascript wrong?

I’m trying to connect to MongoDB in my Node app using Typescript.

This line of code:

const MongoClient = mongoDb.MongoClient;

Compiles into this line of code:

const MongoClient = mongodb_1.default.MongoClient;

Throwing this error:
TypeError: Cannot read properties of undefined (reading ‘MongoClient’)

Removing the “.default.” in the compiled code makes it run.

I’ve tried messing with package.json as well as tsconfig.json
Namely the esModuleInterop and allowSyntheticDefaultImports
but nothing works.