Automattic / mongoose

MongoDB object modeling designed to work in an asynchronous environment.
https://mongoosejs.com
MIT License
26.96k stars 3.84k forks source link

I just updated to mongoose 6.1.1 #11082

Closed iustin4 closed 2 years ago

iustin4 commented 2 years ago

When i try to use mongoose.hookNextFunction type it says "type mongoose.hookNextFunction = /unresolved/ any Namespace '"mongoose"' has no exported member 'hookNextFunction'.ts(2694)"

hansemannn commented 2 years ago

See https://mongoosejs.com/docs/migrating_to_6.html#typescript-changes for details which references HookNextFunction as part of deprecated / removed types.

vkarpov15 commented 2 years ago

We removed HookNextFunction in 6.0. It's an unnecessary definition and we're trying to trim down our TypeScript type complexity as much as possible. HookNextFunction was just (err?: Error): any anyway.