-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathCancellationToken.html
84 lines (84 loc) · 133 KB
/
CancellationToken.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
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CancellationToken | 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="CancellationToken.html">CancellationToken</a></li></ul><h1>Class CancellationToken</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="TypedEventEmitter.html" class="tsd-signature-type" data-tsd-kind="Class">TypedEventEmitter</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>cancel<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><ul class="tsd-hierarchy"><li><span class="target">CancellationToken</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 tsd-is-inherited"><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="CancellationToken.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited"><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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 tsd-is-static tsd-is-external"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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 tsd-is-inherited"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><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-inherited"><li class="tsd-signature tsd-kind-icon">new <wbr/>Cancellation<wbr/>Token<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">EventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.html#constructor">constructor</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:74</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: <span class="tsd-signature-type">EventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Properties</h2><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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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>Methods</h2><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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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-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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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 <span class="tsd-signature-symbol">{ </span>cancel<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" 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="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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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" 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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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">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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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 <span class="tsd-signature-symbol">{ </span>cancel<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">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="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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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><span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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">"cancel"</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: <span class="tsd-signature-symbol">{ </span>cancel<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">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-signature-type" data-tsd-kind="Class">CancellationToken</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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="TypedEventEmitter.html">TypedEventEmitter</a>.<a href="TypedEventEmitter.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="CancellationToken.html" class="tsd-kind-icon">Cancellation<wbr/>Token</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="CancellationToken.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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 tsd-is-static tsd-is-external"><a href="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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="CancellationToken.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>