Typescript: Internal types use Date
instead of NativeDate
- bug?
#10426
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Hey!
Trying to implement custom
timestamps.currentTime
as described in the docsMy simplified implementation looks like this:
I get the following TS error:
After some investigation it looks like there might be some confusion with the
NativeDate
andDate
types.For instance, I would expect
mongoose.now
to returnNativeDate
and notDate
Same for
mongoose.SchemaTimestampsConfig.currentTime
.mongoose
version5.13.2
tsconfig.json
The text was updated successfully, but these errors were encountered: