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
insertMany return type changed from version 7.3.2 to 7.3.3 #13957
Labels
typescript
Types or Types-test related issue / Pull Request
Milestone
Comments
ksyd9821
added
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
help wanted
labels
Oct 9, 2023
ksyd9821
changed the title
insertMany return type changed with from version 7.3.2 to 7.3.3
insertMany return type changed from version 7.3.2 to 7.3.3
Oct 9, 2023
IslandRhythms
added
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
and removed
help
This issue can likely be resolved in GitHub issues. No bug fixes, features, or docs necessary
help wanted
labels
Oct 10, 2023
vkarpov15
added a commit
that referenced
this issue
Oct 10, 2023
…o generics to prevent errors when using `insertMany()` in generic classes Fix #13957
vkarpov15
added
typescript
Types or Types-test related issue / Pull Request
and removed
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
labels
Oct 10, 2023
vkarpov15
added a commit
that referenced
this issue
Oct 11, 2023
types(models): add cleaner type definitions for `insertMany()` with no generics to prevent errors when using `insertMany()` in generic classes
Hi @vkarpov15 , I upgraded to version 7.6.2 which should fix this issue, but the error is still present with the code above. |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
Mongoose version
Node.js version
18.x
MongoDB version
6.x
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
No response
Issue
It seems that the return type of the
insertMany
function changed with version 7.3.3.The following code runs without any error on v7.3.2 and lower
while on versions >=7.3.3 the assignment inside the function generates this error:
The typescript version is 5.2.2.
The text was updated successfully, but these errors were encountered: