Skip to content

Commit 8c89074

Browse files
(DOCSP-17936) Count Typescript Example (#232)
Co-authored-by: dariakp <[email protected]>
1 parent b13fce3 commit 8c89074

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

source/usage-examples/count.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,32 @@ collection with ``Canada`` in the ``countries`` field.
4949

5050
.. include:: /includes/connect-guide-note.rst
5151

52-
.. literalinclude:: /code-snippets/usage-examples/count.js
53-
:language: javascript
52+
.. tabs::
53+
54+
.. tab:: JavaScript
55+
:tabid: javascript
56+
57+
.. literalinclude:: /code-snippets/usage-examples/count.js
58+
:language: javascript
59+
:linenos:
60+
61+
.. tab:: TypeScript
62+
:tabid: typescript
63+
64+
.. literalinclude:: /code-snippets/usage-examples/count.js
65+
:language: javascript
66+
:linenos:
67+
68+
.. note:: Identical Code Snippets
69+
70+
The JavaScript and TypeScript code snippets above are identical. There are no
71+
TypeScript specific features of the driver relevant to this use case.
5472

5573
If you run the sample code above, you should see output that resembles the
5674
following:
5775

5876
.. code-block:: none
77+
:copyable: false
5978

6079
Estimated number of documents in the movies collection: 23541
6180
Number of movies from Canada: 1349

0 commit comments

Comments
 (0)