-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
-
Not Needed
Unable to find source-code formatter for language: node. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
const cursor = col.find({...}); for await (const doc of cursor) { console.log(doc) // doc has type of <null | Document> }
I think this is an error and the doc should always have the Document type.
What is the point of giving null in this loop?
- duplicates
-
NODE-3442 `AbstractCursor[Symbol.asyncIterator]` is wrongly typed
- Closed