Hello i use lastest nodejs + mongodb driver. I want define id as string by default.
In this topic by @Tim_Hilt i found solution
dbo.collection<{ _id: string }>("my-collection").deleteOne({ _id: id }, (err, obj) => {
But after
let collection = db.collection<{ _id: String }>('users');
console.log(collection);
I get in log ‘false’
what is problem & was changes in driver ?
Also the same question , how to globally do for classic js without ts
Few people here are familiar with nodejs, I’ll go write to the nodejs forum)