You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
omitUndefined and timestamps options are documented in Documentation but TypeScript QueryFindOneAndUpdateOptions interface doesn't have that options defined. So it doesn't allowed to use them with TypeScript.
If the current behavior is a bug, please provide the steps to reproduce.
Install Latest Mongoose and @types/mongoose
Write a method with findOneAndUpate with options either one or both omitUndefined or timestamps to be true.
Typescript will yell they are not defined in QueryFindOneAndUpdateOptions
What is the expected behavior?
To use omitUndefined and timestamps options in TypeScript enviroment.
What are the versions of Node.js, Mongoose and MongoDB you are using? Note that "latest" is not a version.
I just had a look over there and it seems like so already reported that problem in June. So far, no-one seems to have cared about that. However, you could support the bug by giving it a thumbs-up. That might raise some attention.
ALA they don't update it, I'd just use ts-ignore although that's not pretty:
This project isn't @types/mongoose, that's DefinitelyTyped. Please follow #8108 for updates on typescript support - right now Mongoose doesn't have any official typescript support.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
omitUndefined
andtimestamps
options are documented in Documentation but TypeScriptQueryFindOneAndUpdateOptions
interface doesn't have that options defined. So it doesn't allowed to use them with TypeScript.If the current behavior is a bug, please provide the steps to reproduce.
omitUndefined
ortimestamps
to be true.QueryFindOneAndUpdateOptions
What is the expected behavior?
To use
omitUndefined
andtimestamps
options in TypeScript enviroment.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: