-
-
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
types: improve lastErrorObject typing for rawResults #11602
Conversation
Hi Simon, Lgtm. Could you please add your Sample Code to the typings Tests in test/types? I guess models.test.ts is the fitting file. Maybe also add an error test? Like Greetings from Teheran to Vienna :) |
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.
Thanks 👍
I second Uzlopak's comment, would be nice if we can have tests.
I've added a test in queries.test.ts as there are also some other similar tests in it already. Let me know if I should move it to models or another file if you think it fits better somewhere else. |
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
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, thanks 👍
Summary
This improves the type for lastErrorObject, this helps to use the correct values as there is for example no modifiedCount or other things that a simple updateOne returns.
Examples