Webstorm and mongoDB Follow
Hi, I am using Webstorm IDE, currently, I am facing a weird error with MongoDB, the methods below should normally work but Webstorm refuses to accept the method signature. anyone knows why?
Please sign in to leave a comment.
can't reproduce
please could you share a complete code snippet (as text)?
The problem is that the IDE analyzes the code statically, using the library typings (node_modules\mongodb\mongodb.d.ts) for types resolving. But none of find() method overloads in this file match this call (as _id property is not defined in FindOptions interface), so it uses the first overload (without params0 and reports an error about unexpected number of arguments