-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathListIndexesCursor.html
148 lines (148 loc) · 215 KB
/
ListIndexesCursor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ListIndexesCursor | mongodb</title><meta name="description" content="Documentation for mongodb"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">mongodb</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">mongodb</a></li><li><a href="ListIndexesCursor.html">ListIndexesCursor</a></li></ul><h1>Class ListIndexesCursor</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="AbstractCursor.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractCursor</a><ul class="tsd-hierarchy"><li><span class="target">ListIndexesCursor</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ListIndexesCursor.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Events</h3><ul class="tsd-index-list"><li class="tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="ListIndexesCursor.html#CLOSE" class="tsd-kind-icon">CLOSE</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="ListIndexesCursor.html#options" class="tsd-kind-icon">options</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="ListIndexesCursor.html#parent" class="tsd-kind-icon">parent</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#captureRejectionSymbol" class="tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#captureRejections" class="tsd-kind-icon">capture<wbr/>Rejections</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#defaultMaxListeners" class="tsd-kind-icon">default<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited"><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#closed" class="tsd-kind-icon">closed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#killed" class="tsd-kind-icon">killed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#loadBalanced" class="tsd-kind-icon">load<wbr/>Balanced</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#namespace" class="tsd-kind-icon">namespace</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readConcern" class="tsd-kind-icon">read<wbr/>Concern</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readPreference" class="tsd-kind-icon">read<wbr/>Preference</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#_asyncIterator_" class="tsd-kind-icon">[async<wbr/>Iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#addCursorFlag" class="tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#batchSize" class="tsd-kind-icon">batch<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#bufferedCount" class="tsd-kind-icon">buffered<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ListIndexesCursor.html#clone" class="tsd-kind-icon">clone</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#eventNames" class="tsd-kind-icon">event<wbr/>Names</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#hasNext" class="tsd-kind-icon">has<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#listenerCount" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#listeners" class="tsd-kind-icon">listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#maxTimeMS" class="tsd-kind-icon">max<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#next" class="tsd-kind-icon">next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#off" class="tsd-kind-icon">off</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#on" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#once" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#prependListener" class="tsd-kind-icon">prepend<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#prependOnceListener" class="tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readBufferedDocuments" class="tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#removeAllListeners" class="tsd-kind-icon">remove<wbr/>All<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#rewind" class="tsd-kind-icon">rewind</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#setMaxListeners" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#toArray" class="tsd-kind-icon">to<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#tryNext" class="tsd-kind-icon">try<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#withReadConcern" class="tsd-kind-icon">with<wbr/>Read<wbr/>Concern</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#withReadPreference" class="tsd-kind-icon">with<wbr/>Read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#getEventListeners" class="tsd-kind-icon">get<wbr/>Event<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#listenerCount-1" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#on-1" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#once-1" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#setMaxListeners-1" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link">constructor<a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>List<wbr/>Indexes<wbr/>Cursor<span class="tsd-signature-symbol">(</span>collection<span class="tsd-signature-symbol">: </span><a href="Collection.html" class="tsd-signature-type" data-tsd-kind="Class">Collection</a><span class="tsd-signature-symbol"><</span><a href="../interfaces/Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">></span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/ListIndexesOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ListIndexesOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractCursor.constructor</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/list_indexes_cursor.ts#L13">src/cursor/list_indexes_cursor.ts:13</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>collection: <a href="Collection.html" class="tsd-signature-type" data-tsd-kind="Class">Collection</a><span class="tsd-signature-symbol"><</span><a href="../interfaces/Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">></span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/ListIndexesOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ListIndexesOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Events</h2><section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a id="CLOSE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> CLOSE<a href="#CLOSE" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">CLOSE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"close"</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#CLOSE">CLOSE</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L167">src/cursor/abstract_cursor.ts:167</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="options" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> options<a href="#options" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">options<span class="tsd-signature-symbol">?:</span> <a href="../interfaces/ListIndexesOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">ListIndexesOptions</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/list_indexes_cursor.ts#L11">src/cursor/list_indexes_cursor.ts:11</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="parent" class="tsd-anchor"></a><h3 class="tsd-anchor-link">parent<a href="#parent" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">parent<span class="tsd-signature-symbol">:</span> <a href="Collection.html" class="tsd-signature-type" data-tsd-kind="Class">Collection</a><span class="tsd-signature-symbol"><</span><a href="../interfaces/Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/list_indexes_cursor.ts#L10">src/cursor/list_indexes_cursor.ts:10</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="captureRejectionSymbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> capture<wbr/>Rejection<wbr/>Symbol<a href="#captureRejectionSymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><a class="tsd-signature-type" data-tsd-kind="Property">captureRejectionSymbol</a></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#captureRejectionSymbol">captureRejectionSymbol</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:291</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="captureRejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> capture<wbr/>Rejections<a href="#captureRejections" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">capture<wbr/>Rejections<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#captureRejections">captureRejections</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:296</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets or gets the default captureRejection value for all emitters.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="defaultMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> default<wbr/>Max<wbr/>Listeners<a href="#defaultMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">default<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#defaultMaxListeners">defaultMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:297</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="errorMonitor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> error<wbr/>Monitor<a href="#errorMonitor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">error<wbr/>Monitor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">errorMonitor</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#errorMonitor">errorMonitor</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:290</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>This symbol shall be used to install a listener for only monitoring <code>'error'</code>
events. Listeners installed using this symbol are called before the regular
<code>'error'</code> listeners are called.</p>
</div><div><p>Installing a listener using this symbol does not change the behavior once an
<code>'error'</code> event is emitted, therefore the process will still crash if no
regular <code>'error'</code> listener is installed.</p>
</div></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="closed" class="tsd-anchor"></a><h3 class="tsd-anchor-link">closed<a href="#closed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> closed<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.closed</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L264">src/cursor/abstract_cursor.ts:264</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link">id<a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> id<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="Long.html" class="tsd-signature-type" data-tsd-kind="Class">Long</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.id</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L224">src/cursor/abstract_cursor.ts:224</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="Long.html" class="tsd-signature-type" data-tsd-kind="Class">Long</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="killed" class="tsd-anchor"></a><h3 class="tsd-anchor-link">killed<a href="#killed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> killed<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.killed</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L268">src/cursor/abstract_cursor.ts:268</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="loadBalanced" class="tsd-anchor"></a><h3 class="tsd-anchor-link">load<wbr/>Balanced<a href="#loadBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> loadBalanced<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.loadBalanced</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L272">src/cursor/abstract_cursor.ts:272</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="namespace" class="tsd-anchor"></a><h3 class="tsd-anchor-link">namespace<a href="#namespace" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> namespace<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="MongoDBNamespace.html" class="tsd-signature-type" data-tsd-kind="Class">MongoDBNamespace</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.namespace</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L238">src/cursor/abstract_cursor.ts:238</a></li></ul></aside><h4 class="tsd-returns-title">Returns <a href="MongoDBNamespace.html" class="tsd-signature-type" data-tsd-kind="Class">MongoDBNamespace</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="readConcern" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Concern<a href="#readConcern" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> readConcern<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="ReadConcern.html" class="tsd-signature-type" data-tsd-kind="Class">ReadConcern</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.readConcern</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L246">src/cursor/abstract_cursor.ts:246</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="ReadConcern.html" class="tsd-signature-type" data-tsd-kind="Class">ReadConcern</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="readPreference" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Preference<a href="#readPreference" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> readPreference<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ReadPreference.html" class="tsd-signature-type" data-tsd-kind="Class">ReadPreference</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.readPreference</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L242">src/cursor/abstract_cursor.ts:242</a></li></ul></aside><h4 class="tsd-returns-title">Returns <a href="ReadPreference.html" class="tsd-signature-type" data-tsd-kind="Class">ReadPreference</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="_asyncIterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link">[async<wbr/>Iterator]<a href="#_asyncIterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">[async<wbr/>Iterator]<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#_asyncIterator_">[asyncIterator]</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L286">src/cursor/abstract_cursor.ts:286</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="addCursorFlag" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Cursor<wbr/>Flag<a href="#addCursorFlag" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag<span class="tsd-signature-symbol">(</span>flag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"tailable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"oplogReplay"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"noCursorTimeout"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"awaitData"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"exhaust"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"partial"</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addCursorFlag">addCursorFlag</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L500">src/cursor/abstract_cursor.ts:500</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Add a cursor flag to the cursor</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>flag: <span class="tsd-signature-type">"tailable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"oplogReplay"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"noCursorTimeout"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"awaitData"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"exhaust"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"partial"</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.</p>
</div></div></li><li><h5>value: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The flag boolean value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="addListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Listener<a href="#addListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L375">src/mongo_types.ts:375</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L376">src/mongo_types.ts:376</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L380">src/mongo_types.ts:380</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="batchSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link">batch<wbr/>Size<a href="#batchSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">batch<wbr/>Size<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#batchSize">batchSize</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L600">src/cursor/abstract_cursor.ts:600</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the batch size for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The number of documents to return per batch. See <a href="https://www.mongodb.com/docs/manual/reference/command/find/" class="external">find command documentation</a>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="bufferedCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link">buffered<wbr/>Count<a href="#bufferedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">buffered<wbr/>Count<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#bufferedCount">bufferedCount</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L277">src/cursor/abstract_cursor.ts:277</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns current buffered documents length</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="clone" class="tsd-anchor"></a><h3 class="tsd-anchor-link">clone<a href="#clone" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#clone">clone</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/list_indexes_cursor.ts#L19">src/cursor/list_indexes_cursor.ts:19</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="close" class="tsd-anchor"></a><h3 class="tsd-anchor-link">close<a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">: </span><a href="../interfaces/CursorCloseOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorCloseOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">: </span><a href="../interfaces/CursorCloseOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorCloseOptions</a>, callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#close">close</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L430">src/cursor/abstract_cursor.ts:430</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#close">close</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L432">src/cursor/abstract_cursor.ts:432</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#close">close</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L436">src/cursor/abstract_cursor.ts:436</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>options argument is deprecated</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>options: <a href="../interfaces/CursorCloseOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorCloseOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#close">close</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L440">src/cursor/abstract_cursor.ts:440</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>options argument is deprecated. Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>options: <a href="../interfaces/CursorCloseOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorCloseOptions</a></h5></li><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">emit<a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">emit<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, <span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol"><</span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#emit">emit</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L422">src/mongo_types.ts:422</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol"><</span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link">event<wbr/>Names<a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">event<wbr/>Names<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#eventNames">eventNames</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L448">src/mongo_types.ts:448</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link">for<wbr/>Each<a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>iterator<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>iterator<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span>, callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#forEach">forEach</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L384">src/cursor/abstract_cursor.ts:384</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Iterates over all the documents for this cursor using the iterator, callback pattern.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>iterator: <span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The iteration callback.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#forEach">forEach</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L386">src/cursor/abstract_cursor.ts:386</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>iterator: <span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="getMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Max<wbr/>Listeners<a href="#getMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">get<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#getMaxListeners">getMaxListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L449">src/mongo_types.ts:449</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="hasNext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">has<wbr/>Next<a href="#hasNext" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">has<wbr/>Next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">has<wbr/>Next<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#hasNext">hasNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L319">src/cursor/abstract_cursor.ts:319</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#hasNext">hasNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L321">src/cursor/abstract_cursor.ts:321</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="listenerCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link">listener<wbr/>Count<a href="#listenerCount" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">listener<wbr/>Count<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listenerCount">listenerCount</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L427">src/mongo_types.ts:427</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>type: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">listeners<a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listeners">listeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L414">src/mongo_types.ts:414</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="map" class="tsd-anchor"></a><h3 class="tsd-anchor-link">map<a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">map<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>transform<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractCursor.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#map">map</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L533">src/cursor/abstract_cursor.ts:533</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Map all documents using the provided function
If there is a transform set on the cursor, that will be called first and the result passed to
this function's transform.</p>
</div><dl class="tsd-comment-tags"><dt>remarks</dt><dd><p><strong>Note for Typescript Users:</strong> adding a transform changes the return type of the iteration of this cursor,
it <strong>does not</strong> return a new instance of a cursor. This means when calling map,
you should always assign the result to a new variable in order to get a correctly typed cursor variable.
Take note of the following example:</p>
</dd><dt>example</dt><dd><pre><code class="language-typescript"><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">cursor</span><span class="hl-0">: </span><span class="hl-9">FindCursor</span><span class="hl-0"><</span><span class="hl-9">Document</span><span class="hl-0">> = </span><span class="hl-6">coll</span><span class="hl-0">.</span><span class="hl-2">find</span><span class="hl-0">();</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">mappedCursor</span><span class="hl-0">: </span><span class="hl-9">FindCursor</span><span class="hl-0"><</span><span class="hl-9">number</span><span class="hl-0">> = </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">map</span><span class="hl-0">(</span><span class="hl-6">doc</span><span class="hl-0"> </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-9">Object</span><span class="hl-0">.</span><span class="hl-2">keys</span><span class="hl-0">(</span><span class="hl-6">doc</span><span class="hl-0">).</span><span class="hl-6">length</span><span class="hl-0">);</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">keyCounts</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0">[] = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-6">mappedCursor</span><span class="hl-0">.</span><span class="hl-2">toArray</span><span class="hl-0">(); </span><span class="hl-1">// cursor.toArray() still returns Document[]</span>
</code></pre>
</dd></dl></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T = <span class="tsd-signature-type">any</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>transform: <span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">T</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The mapping transformation method.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">T</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">T</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="AbstractCursor.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">T</span><span class="tsd-signature-symbol">, </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="maxTimeMS" class="tsd-anchor"></a><h3 class="tsd-anchor-link">max<wbr/>TimeMS<a href="#maxTimeMS" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">max<wbr/>TimeMS<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#maxTimeMS">maxTimeMS</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L585">src/cursor/abstract_cursor.ts:585</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of milliseconds to wait before aborting the query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="next" class="tsd-anchor"></a><h3 class="tsd-anchor-link">next<a href="#next" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">next<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-signature tsd-kind-icon">next<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">?: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#next">next</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L347">src/cursor/abstract_cursor.ts:347</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the next available document from the cursor, returns null if no more documents are available.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#next">next</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L349">src/cursor/abstract_cursor.ts:349</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#next">next</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L351">src/cursor/abstract_cursor.ts:351</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="off" class="tsd-anchor"></a><h3 class="tsd-anchor-link">off<a href="#off" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L403">src/mongo_types.ts:403</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L404">src/mongo_types.ts:404</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L408">src/mongo_types.ts:408</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="on" class="tsd-anchor"></a><h3 class="tsd-anchor-link">on<a href="#on" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L382">src/mongo_types.ts:382</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L383">src/mongo_types.ts:383</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L387">src/mongo_types.ts:387</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link">once<a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L389">src/mongo_types.ts:389</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L390">src/mongo_types.ts:390</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L394">src/mongo_types.ts:394</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="prependListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">prepend<wbr/>Listener<a href="#prependListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L431">src/mongo_types.ts:431</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L432">src/mongo_types.ts:432</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L436">src/mongo_types.ts:436</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">prepend<wbr/>Once<wbr/>Listener<a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L438">src/mongo_types.ts:438</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L442">src/mongo_types.ts:442</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L446">src/mongo_types.ts:446</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">raw<wbr/>Listeners<a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">raw<wbr/>Listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#rawListeners">rawListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L418">src/mongo_types.ts:418</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="readBufferedDocuments" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Buffered<wbr/>Documents<a href="#readBufferedDocuments" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents<span class="tsd-signature-symbol">(</span>number<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#readBufferedDocuments">readBufferedDocuments</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L282">src/cursor/abstract_cursor.ts:282</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns current buffered documents</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> number: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="removeAllListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Listeners<a href="#removeAllListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L410">src/mongo_types.ts:410</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>Listener<a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L396">src/mongo_types.ts:396</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L397">src/mongo_types.ts:397</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L401">src/mongo_types.ts:401</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="rewind" class="tsd-anchor"></a><h3 class="tsd-anchor-link">rewind<a href="#rewind" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">rewind<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#rewind">rewind</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L619">src/cursor/abstract_cursor.ts:619</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Rewind this cursor to its uninitialized state. Any options that are present on the cursor will
remain in effect. Iterating this cursor will cause new queries to be sent to the server, even
if the resultant data has already been retrieved by this cursor.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="setMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">set<wbr/>Max<wbr/>Listeners<a href="#setMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">set<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#setMaxListeners">setMaxListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/mongo_types.ts#L450">src/mongo_types.ts:450</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>n: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link">stream<a href="#stream" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">stream<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/CursorStreamOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorStreamOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#stream">stream</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L295">src/cursor/abstract_cursor.ts:295</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/CursorStreamOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorStreamOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="toArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link">to<wbr/>Array<a href="#toArray" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">to<wbr/>Array<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">to<wbr/>Array<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#toArray">toArray</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L459">src/cursor/abstract_cursor.ts:459</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns an array of documents. The caller is responsible for making sure that there
is enough memory to store the results. Note that the array only contains partial
results when this cursor had been previously accessed. In that case,
cursor.rewind() can be used to reset the cursor.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#toArray">toArray</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L461">src/cursor/abstract_cursor.ts:461</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="tryNext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">try<wbr/>Next<a href="#tryNext" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">try<wbr/>Next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">try<wbr/>Next<span class="tsd-signature-symbol">(</span>callback<span class="tsd-signature-symbol">: </span><a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#tryNext">tryNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L365">src/cursor/abstract_cursor.ts:365</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Try to get the next available document from the cursor or <code>null</code> if an empty batch is returned</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#tryNext">tryNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L367">src/cursor/abstract_cursor.ts:367</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Callbacks are deprecated and will be removed in the next major version. See <a href="https://github.com/mongodb-js/nodejs-mongodb-legacy">mongodb-legacy</a> for migration assistance</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>callback: <a href="../modules.html#Callback" class="tsd-signature-type" data-tsd-kind="Type alias">Callback</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="withReadConcern" class="tsd-anchor"></a><h3 class="tsd-anchor-link">with<wbr/>Read<wbr/>Concern<a href="#withReadConcern" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">with<wbr/>Read<wbr/>Concern<span class="tsd-signature-symbol">(</span>readConcern<span class="tsd-signature-symbol">: </span><a href="../modules.html#ReadConcernLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadConcernLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#withReadConcern">withReadConcern</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L570">src/cursor/abstract_cursor.ts:570</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the ReadPreference for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>readConcern: <a href="../modules.html#ReadConcernLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadConcernLike</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="withReadPreference" class="tsd-anchor"></a><h3 class="tsd-anchor-link">with<wbr/>Read<wbr/>Preference<a href="#withReadPreference" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">with<wbr/>Read<wbr/>Preference<span class="tsd-signature-symbol">(</span>readPreference<span class="tsd-signature-symbol">: </span><a href="../modules.html#ReadPreferenceLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadPreferenceLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#withReadPreference">withReadPreference</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v4.10.0/src/cursor/abstract_cursor.ts#L552">src/cursor/abstract_cursor.ts:552</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the ReadPreference for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>readPreference: <a href="../modules.html#ReadPreferenceLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadPreferenceLike</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The new read preference for the cursor.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="ListIndexesCursor.html" class="tsd-signature-type" data-tsd-kind="Class">ListIndexesCursor</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="getEventListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Event<wbr/>Listeners<a href="#getEventListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">get<wbr/>Event<wbr/>Listeners<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">DOMEventTarget</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#getEventListeners">getEventListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:262</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
</div><div><p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.listeners</code> on
the emitter.</p>
<p>For <code>EventTarget</code>s this is the only way to get the event listeners for the
event target. This is useful for debugging and diagnostic purposes.</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">getEventListeners</span><span class="hl-0">, </span><span class="hl-4">EventEmitter</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-0">{</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-2">listener</span><span class="hl-0"> = () </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'Events are fun'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">listener</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-2">getEventListeners</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// [listener]</span><br/><span class="hl-0">}</span><br/><span class="hl-0">{</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">et</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventTarget</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-2">listener</span><span class="hl-0"> = () </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'Events are fun'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">et</span><span class="hl-0">.</span><span class="hl-2">addEventListener</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">listener</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-2">getEventListeners</span><span class="hl-0">(</span><span class="hl-6">et</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// [listener]</span><br/><span class="hl-0">}</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v15.2.0, v14.17.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">DOMEventTarget</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="listenerCount-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> listener<wbr/>Count<a href="#listenerCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">listener<wbr/>Count<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listenerCount-1">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:234</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>A class method that returns the number of listeners for the given <code>eventName</code>registered on the given <code>emitter</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">listenerCount</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">myEmitter</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-6">myEmitter</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'event'</span><span class="hl-0">, () </span><span class="hl-3">=></span><span class="hl-0"> {});</span><br/><span class="hl-6">myEmitter</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'event'</span><span class="hl-0">, () </span><span class="hl-3">=></span><span class="hl-0"> {});</span><br/><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-2">listenerCount</span><span class="hl-0">(</span><span class="hl-6">myEmitter</span><span class="hl-0">, </span><span class="hl-5">'event'</span><span class="hl-0">));</span><br/><span class="hl-1">// Prints: 2</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.9.12</p>
</dd><dt>deprecated</dt><dd><p>Since v3.2.0 - Use <code>listenerCount</code> instead.</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The emitter to query</p>
</div></div></li><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The event name</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="on-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> on<a href="#on-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncIterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on-1">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:217</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>```js
const { on, EventEmitter } = require('events');</p>
</div><div><p>(async () => {
const ee = new EventEmitter();</p>
<p> // Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});</p>
<p> for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();</p>
<pre><code><br/><span class="hl-6">Returns</span><span class="hl-0"> </span><span class="hl-6">an</span><span class="hl-0"> </span><span class="hl-5">`AsyncIterator`</span><span class="hl-0"> </span><span class="hl-6">that</span><span class="hl-0"> </span><span class="hl-6">iterates</span><span class="hl-0"> </span><span class="hl-5">`eventName`</span><span class="hl-0"> </span><span class="hl-6">events</span><span class="hl-0">. </span><span class="hl-6">It</span><span class="hl-0"> </span><span class="hl-6">will</span><span class="hl-0"> </span><span class="hl-7">throw</span><br/><span class="hl-7">if</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-5">`EventEmitter`</span><span class="hl-0"> </span><span class="hl-6">emits</span><span class="hl-0"> </span><span class="hl-5">`'error'`</span><span class="hl-0">. </span><span class="hl-6">It</span><span class="hl-0"> </span><span class="hl-6">removes</span><span class="hl-0"> </span><span class="hl-6">all</span><span class="hl-0"> </span><span class="hl-6">listeners</span><span class="hl-0"> </span><span class="hl-6">when</span><br/><span class="hl-6">exiting</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-6">loop</span><span class="hl-0">. </span><span class="hl-6">The</span><span class="hl-0"> </span><span class="hl-5">`value`</span><span class="hl-0"> </span><span class="hl-6">returned</span><span class="hl-0"> </span><span class="hl-6">by</span><span class="hl-0"> </span><span class="hl-6">each</span><span class="hl-0"> </span><span class="hl-6">iteration</span><span class="hl-0"> </span><span class="hl-6">is</span><span class="hl-0"> </span><span class="hl-6">an</span><span class="hl-0"> </span><span class="hl-6">array</span><br/><span class="hl-6">composed</span><span class="hl-0"> </span><span class="hl-3">of</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-6">emitted</span><span class="hl-0"> </span><span class="hl-6">event</span><span class="hl-0"> </span><span class="hl-3">arguments</span><span class="hl-0">.</span><br/><br/><span class="hl-6">An</span><span class="hl-0"> </span><span class="hl-5">`AbortSignal`</span><span class="hl-0"> </span><span class="hl-6">can</span><span class="hl-0"> </span><span class="hl-6">be</span><span class="hl-0"> </span><span class="hl-6">used</span><span class="hl-0"> </span><span class="hl-6">to</span><span class="hl-0"> </span><span class="hl-6">cancel</span><span class="hl-0"> </span><span class="hl-6">waiting</span><span class="hl-0"> </span><span class="hl-6">on</span><span class="hl-0"> </span><span class="hl-10">events</span><span class="hl-0">:</span><br/><br/><span class="hl-5">```js</span><br/><span class="hl-5">const { on, EventEmitter } = require('events');</span><br/><span class="hl-5">const ac = new AbortController();</span><br/><br/><span class="hl-5">(async () => {</span><br/><span class="hl-5"> const ee = new EventEmitter();</span><br/><br/><span class="hl-5"> // Emit later on</span><br/><span class="hl-5"> process.nextTick(() => {</span><br/><span class="hl-5"> ee.emit('foo', 'bar');</span><br/><span class="hl-5"> ee.emit('foo', 42);</span><br/><span class="hl-5"> });</span><br/><br/><span class="hl-5"> for await (const event of on(ee, 'foo', { signal: ac.signal })) {</span><br/><span class="hl-5"> // The execution of this inner block is synchronous and it</span><br/><span class="hl-5"> // processes one event at a time (even with await). Do not use</span><br/><span class="hl-5"> // if concurrent execution is required.</span><br/><span class="hl-5"> console.log(event); // prints ['bar'] [42]</span><br/><span class="hl-5"> }</span><br/><span class="hl-5"> // Unreachable here</span><br/><span class="hl-5">})();</span><br/><br/><span class="hl-5">process.nextTick(() => ac.abort());</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v13.6.0, v12.16.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The name of the event being listened for</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncIterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><div><p>that iterates <code>eventName</code> events emitted by the <code>emitter</code></p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="once-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> once<a href="#once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">NodeEventTarget</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">DOMEventTarget</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once-1">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:157</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates a <code>Promise</code> that is fulfilled when the <code>EventEmitter</code> emits the given
event or that is rejected if the <code>EventEmitter</code> emits <code>'error'</code> while waiting.
The <code>Promise</code> will resolve with an array of all the arguments emitted to the
given event.</p>
</div><div><p>This method is intentionally generic and works with the web platform <a href="https://dom.spec.whatwg.org/#interface-eventtarget">EventTarget</a> interface, which has no special<code>'error'</code> event
semantics and does not listen to the <code>'error'</code> event.</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">once</span><span class="hl-0">, </span><span class="hl-4">EventEmitter</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">async</span><span class="hl-0"> </span><span class="hl-3">function</span><span class="hl-0"> </span><span class="hl-2">run</span><span class="hl-0">() {</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><br/><span class="hl-0"> </span><span class="hl-6">process</span><span class="hl-0">.</span><span class="hl-2">nextTick</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'myevent'</span><span class="hl-0">, </span><span class="hl-8">42</span><span class="hl-0">);</span><br/><span class="hl-0"> });</span><br/><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> [</span><span class="hl-4">value</span><span class="hl-0">] = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'myevent'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-6">value</span><span class="hl-0">);</span><br/><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">err</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-9">Error</span><span class="hl-0">(</span><span class="hl-5">'kaboom'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">process</span><span class="hl-0">.</span><span class="hl-2">nextTick</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">);</span><br/><span class="hl-0"> });</span><br/><br/><span class="hl-0"> </span><span class="hl-7">try</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'myevent'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">catch</span><span class="hl-0"> (</span><span class="hl-6">err</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'error happened'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">);</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">run</span><span class="hl-0">();</span>
</code></pre>
<p>The special handling of the <code>'error'</code> event is only used when <code>events.once()</code>is used to wait for another event. If <code>events.once()</code> is used to wait for the
'<code>error'</code> event itself, then it is treated as any other kind of event without
special handling:</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">once</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><br/><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'error'</span><span class="hl-0">)</span><br/><span class="hl-0"> .</span><span class="hl-2">then</span><span class="hl-0">(([</span><span class="hl-6">err</span><span class="hl-0">]) </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'ok'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">))</span><br/><span class="hl-0"> .</span><span class="hl-2">catch</span><span class="hl-0">((</span><span class="hl-6">err</span><span class="hl-0">) </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">));</span><br/><br/><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-9">Error</span><span class="hl-0">(</span><span class="hl-5">'boom'</span><span class="hl-0">));</span><br/><br/><span class="hl-1">// Prints: ok boom</span>
</code></pre>
<p>An <code>AbortSignal</code> can be used to cancel waiting for the event:</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">once</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ac</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">AbortController</span><span class="hl-0">();</span><br/><br/><span class="hl-3">async</span><span class="hl-0"> </span><span class="hl-3">function</span><span class="hl-0"> </span><span class="hl-2">foo</span><span class="hl-0">(</span><span class="hl-6">emitter</span><span class="hl-0">, </span><span class="hl-6">event</span><span class="hl-0">, </span><span class="hl-6">signal</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-7">try</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">emitter</span><span class="hl-0">, </span><span class="hl-6">event</span><span class="hl-0">, { </span><span class="hl-6">signal</span><span class="hl-0"> });</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'event emitted!'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">catch</span><span class="hl-0"> (</span><span class="hl-6">error</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-7">if</span><span class="hl-0"> (</span><span class="hl-6">error</span><span class="hl-0">.</span><span class="hl-6">name</span><span class="hl-0"> === </span><span class="hl-5">'AbortError'</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">error</span><span class="hl-0">(</span><span class="hl-5">'Waiting for the event was canceled!'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">else</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">error</span><span class="hl-0">(</span><span class="hl-5">'There was an error'</span><span class="hl-0">, </span><span class="hl-6">error</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">);</span><br/><span class="hl-0"> }</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">foo</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">ac</span><span class="hl-0">.</span><span class="hl-6">signal</span><span class="hl-0">);</span><br/><span class="hl-6">ac</span><span class="hl-0">.</span><span class="hl-2">abort</span><span class="hl-0">(); </span><span class="hl-1">// Abort waiting for the event</span><br/><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// Prints: Waiting for the event was canceled!</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v11.13.0, v10.16.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">NodeEventTarget</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once-1">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:158</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">DOMEventTarget</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="setMaxListeners-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> set<wbr/>Max<wbr/>Listeners<a href="#setMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">set<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-signature-symbol">...</span>eventTargets<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">DOMEventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#setMaxListeners-1">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:280</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>```js
const {
setMaxListeners,
EventEmitter
} = require('events');</p>
</div><div><p>const target = new EventTarget();
const emitter = new EventEmitter();</p>
<p>setMaxListeners(5, target, emitter);
```</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v15.4.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> n: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A non-negative number. The maximum number of listeners per <code>EventTarget</code> event.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>eventTargets: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">DOMEventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class"><a href="ListIndexesCursor.html" class="tsd-kind-icon">List<wbr/>Indexes<wbr/>Cursor</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="ListIndexesCursor.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="ListIndexesCursor.html#CLOSE" class="tsd-kind-icon">CLOSE</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="ListIndexesCursor.html#options" class="tsd-kind-icon">options</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="ListIndexesCursor.html#parent" class="tsd-kind-icon">parent</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#captureRejectionSymbol" class="tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#captureRejections" class="tsd-kind-icon">capture<wbr/>Rejections</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#defaultMaxListeners" class="tsd-kind-icon">default<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#closed" class="tsd-kind-icon">closed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#killed" class="tsd-kind-icon">killed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#loadBalanced" class="tsd-kind-icon">load<wbr/>Balanced</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#namespace" class="tsd-kind-icon">namespace</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readConcern" class="tsd-kind-icon">read<wbr/>Concern</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readPreference" class="tsd-kind-icon">read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#_asyncIterator_" class="tsd-kind-icon">[async<wbr/>Iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#addCursorFlag" class="tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#batchSize" class="tsd-kind-icon">batch<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#bufferedCount" class="tsd-kind-icon">buffered<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="ListIndexesCursor.html#clone" class="tsd-kind-icon">clone</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#eventNames" class="tsd-kind-icon">event<wbr/>Names</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#hasNext" class="tsd-kind-icon">has<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#listenerCount" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#listeners" class="tsd-kind-icon">listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#maxTimeMS" class="tsd-kind-icon">max<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#next" class="tsd-kind-icon">next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#off" class="tsd-kind-icon">off</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#on" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#once" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#prependListener" class="tsd-kind-icon">prepend<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#prependOnceListener" class="tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#readBufferedDocuments" class="tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#removeAllListeners" class="tsd-kind-icon">remove<wbr/>All<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="ListIndexesCursor.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#rewind" class="tsd-kind-icon">rewind</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#setMaxListeners" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#toArray" class="tsd-kind-icon">to<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#tryNext" class="tsd-kind-icon">try<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#withReadConcern" class="tsd-kind-icon">with<wbr/>Read<wbr/>Concern</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="ListIndexesCursor.html#withReadPreference" class="tsd-kind-icon">with<wbr/>Read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#getEventListeners" class="tsd-kind-icon">get<wbr/>Event<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#listenerCount-1" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#on-1" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#once-1" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="ListIndexesCursor.html#setMaxListeners-1" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>