Skip to content

Commit 079cd5e

Browse files
cc - edits
1 parent 47ec306 commit 079cd5e

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

source/code-snippets/typescript/dot-notation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ interface TestNumber {
2020
}
2121

2222
const database = client.db("<your database>");
23-
const collection = db.collection<TestNumber>("...");
23+
const collection = db.collection<TestNumber>("<your collection>");
2424
collection.find({ someRandomKey: "Accepts any type!" });
2525
// end-no-key

source/fundamentals/typescript.txt

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ For more information on object types, see the
4444
Extend Document
4545
~~~~~~~~~~~~~~~
4646

47-
The following classes accept all types that extends the ``Document`` interface
48-
and that are not recursive:
47+
The following classes accept all types that extend the ``Document`` interface
48+
and are not recursive:
4949

5050
- `Collection <{+api+}/classes/Collection.html>`__
5151
- `ChangeStream <{+api+}/classes/ChangeStream.html>`__
@@ -88,8 +88,15 @@ class in the
8888
Limitations
8989
-----------
9090

91-
You cannot specify a recursive type as a type parameter for {+driver-long+}
92-
classes. The following code snippet defines a recursive type:
91+
You cannot specify a recursive type as a type parameter for the following
92+
{+driver-long+} classes:
93+
94+
- ``FindCursor``
95+
- ``AggregationCursor``
96+
- ``Collection``
97+
- ``ChangeStream``
98+
99+
The following code snippet defines a recursive type:
93100

94101
.. code-block:: typescript
95102

@@ -114,9 +121,9 @@ The preceding code snippet raises the following error at compile time:
114121

115122
error TS2615: Type of property 'r' circularly references itself in mapped type '{ [Key in keyof RecursiveType]: [Key, ...NestedPaths<RecursiveType[Key]>]; }'.
116123

117-
If you must use a recursive type as your document schema, use version 4.2 of
124+
If you must apply a recursive type to your documents, use version 4.2 of
118125
the {+driver-long+}.
119126

120127
To track the fix for this limitation, see
121128
`NODE-3852 <https://jira.mongodb.org/browse/NODE-3852>`__
122-
in JIRA.
129+
in JIRA issue tracker.

0 commit comments

Comments
 (0)