Open
Description
Prerequisites
- I have written a descriptive issue title
Mongoose version
6.9.1
Node.js version
16
MongoDB version
5
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
No response
Issue
The virtual id
getter very clearly always returns a String:
function idGetter() {
if (this._id != null) {
return String(this._id);
}
return null;
}
However the type for the id
field on Document
objects is id?: any;
.
Why not string? What am I not seeing?