Closed Vasile-Peste closed 2 weeks ago
Why do you have @types/mongoose
installed? That might be causing some issues.
Why do you have
@types/mongoose
installed? That might be causing some issues.
I also tried without it but the issue persists
Does this issue occur when you compile with TypeScript or is it just your IDE? As a general rule, we don't debug autocomplete issues in IDEs, especially since our TypeScript types do define 0-3 argument overrides for Model.findOne().
If this causes trouble for you, you can use Poll.findOne({ _id: pollId }, null, { lean: true, session: mongoSession })
instead of chaining .lean().session()
.
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days
This issue was closed because it has been inactive for 19 days and has been marked as stale.
Prerequisites
Mongoose version
8.4.4
Node.js version
20
MongoDB version
7
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
No response
Issue
Hello,
I'm using WebStorm 2024.1.5
"mongoose": "^8.4.4", "@types/mongoose": "^5.11.97",
I don't understand if it's an issue of Mongoose or the IDE, but basically it happens only with Mongoose: for every method, it's like all the optional parameters are marked as required
Can someone help me? Thanks!