-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve types #9959
Improve types #9959
Conversation
Also question why Document defined type of key as any and not ObjectId? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Can you please clarify what you mean by "Also question why Document defined type of key as any and not ObjectId?" |
@vkarpov15 on this line https://github.com/Automattic/mongoose/blob/master/index.d.ts#L369 Document defined as |
Because |
Summary
After 5.11 mongoose started to provide its own types. Some parts of types still use `any (compare the same places with @types/mongoose e.g)
Examples
while with some tsconfig settings tsc will not complain. But you will need to do the same for typescript-eslint.