Skip to content

Commit 93811de

Browse files
Selective Backport DOCSP-25723 (#461)
(cherry picked from commit a348602)
1 parent 125e9f3 commit 93811de

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

source/fundamentals/typescript.txt

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ For more information on object types, see the
4444
Type Parameters that Extend Document
4545
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4646

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

5049
.. _node-mongodb-type-parameters-extend-document:
5150

@@ -71,14 +70,10 @@ You can pass a type parameter that extends the ``Document`` interface like this:
7170
:start-after: start-no-key
7271
:end-before: end-no-key
7372

74-
To view an example of a mutually recursive type, which is not supported by the
75-
:ref:`preceding classes <node-mongodb-type-parameters-extend-document>`,
76-
see the :ref:`<node-driver-limitations-mutual-recursion>` section.
77-
7873
Type Parameters of Any Type
7974
~~~~~~~~~~~~~~~~~~~~~~~~~~~
8075

81-
The following classes accept all type parameters that are not mutually recursive:
76+
The following classes accept all type parameters:
8277

8378
.. _node-mongodb-type-parameters-any-type:
8479

@@ -89,11 +84,6 @@ You can find a code snippet that shows how to specify a type for the ``FindCurso
8984
class in the
9085
:ref:`Find Multiple Documents Usage Example <node-driver-find-usage-example-code-snippet>`.
9186

92-
To view an example of a mutually recursive type, which is not supported by the
93-
:ref:`preceding classes <node-mongodb-type-parameters-any-type>`,
94-
see the :ref:`<node-driver-limitations-mutual-recursion>` section.
95-
96-
9787
Type Safety and Dot Notation
9888
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9989

source/includes/limitations/limits.rst

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ Learn about the following TypeScript specific limitations of the {+driver-short+
88
Recursive Types and Dot Notation
99
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1010

11-
.. important:: Impacted Versions
12-
13-
- 4.3
14-
- 4.4
15-
1611
The {+driver-short+} cannot provide type safety within nested instances of
1712
**recursive types** referenced through dot notation.
1813

@@ -80,10 +75,11 @@ in the MongoDB manual.
8075
Mutual Recursion
8176
~~~~~~~~~~~~~~~~
8277

83-
.. important:: Impacted Versions
78+
.. important::
8479

85-
- 4.3
86-
- 4.4
80+
In this driver version, you cannot specify a mutually recursive type as a
81+
type parameter. To specify a mutually recursive type as a type parameter,
82+
use version 4.11 or newer.
8783

8884
You cannot specify a **mutually recursive** type as a type parameter.
8985

@@ -115,5 +111,3 @@ following error:
115111
116112
error TS2615: Type of property 'r' circularly references itself in mapped type '{ [Key in keyof MutuallyRecursive]...
117113
118-
If you must apply a mutually recursive type to your classes, use version 4.2 of
119-
the {+driver-short+}.

0 commit comments

Comments
 (0)