diff --git a/source/fundamentals/typescript.txt b/source/fundamentals/typescript.txt index 2a165c367..b083be8bf 100644 --- a/source/fundamentals/typescript.txt +++ b/source/fundamentals/typescript.txt @@ -44,8 +44,7 @@ For more information on object types, see the Type Parameters that Extend Document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following classes accept all types that both extend -the ``Document`` interface and are not mutually recursive: +The following classes accept all types that extend the ``Document`` interface: .. _node-mongodb-type-parameters-extend-document: @@ -71,14 +70,10 @@ You can pass a type parameter that extends the ``Document`` interface like this: :start-after: start-no-key :end-before: end-no-key -To view an example of a mutually recursive type, which is not supported by the -:ref:`preceding classes `, -see the :ref:`` section. - Type Parameters of Any Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The following classes accept all type parameters that are not mutually recursive: +The following classes accept all type parameters: .. _node-mongodb-type-parameters-any-type: @@ -89,11 +84,6 @@ You can find a code snippet that shows how to specify a type for the ``FindCurso class in the :ref:`Find Multiple Documents Usage Example `. -To view an example of a mutually recursive type, which is not supported by the -:ref:`preceding classes `, -see the :ref:`` section. - - Type Safety and Dot Notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/includes/limitations/4.3.rst b/source/includes/limitations/4.3.rst index e73db1a3a..d816c11ff 100644 --- a/source/includes/limitations/4.3.rst +++ b/source/includes/limitations/4.3.rst @@ -76,8 +76,13 @@ in the MongoDB manual. Mutual Recursion ~~~~~~~~~~~~~~~~ -You cannot specify a **mutually recursive** type as a type parameter in version -4.3 of the driver. +.. important:: + + In this driver version, you cannot specify a mutually recursive type as a + type parameter. To specify a mutually recursive type as a type parameter, + use version 4.11 or newer. + +You cannot specify a **mutually recursive** type as a type parameter. A mutually recursive type exists when two types contain a property that is of the other's type. You can update the @@ -107,5 +112,3 @@ following error: error TS2615: Type of property 'r' circularly references itself in mapped type '{ [Key in keyof MutuallyRecursive]... -If you must apply a mutually recursive type to your classes, use version 4.2 of -the {+driver-short+}.