-
-
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
Typescript types don't support dot syntax for $pull #9993
Comments
IslandRhythms
added
the
typescript
Types or Types-test related issue / Pull Request
label
Mar 4, 2021
This was referenced Mar 11, 2021
Closed
This was referenced Mar 13, 2021
Closed
Were you able to find a solution? I just ran into this error, and have no idea why this happens. |
@AntoRin We updated to version 5.12.0 which solved the issue for us. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Using
findOneAndUpdate
,findByIdAndUpdate
,updateOne
orupdateMany
with the$pull
operator and dot syntax causes a Typescript compilation error. The syntax itself works both with mongoose (if the typescript error is silenced) and within the mongo console. Using a nested object does not work in this case as it's not supported my mongo.If the current behavior is a bug, please provide the steps to reproduce.
Resulting error:
tsconfig.json:
What is the expected behavior?
There should be no compilation error and the dot syntax should be allowed.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
The text was updated successfully, but these errors were encountered: