@n1xyz/nord-ts 0.0.16 → 0.0.18-8121ed05.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/dist/bridge/client.js +45 -6
  2. package/dist/gen/nord.d.ts +48 -4
  3. package/dist/gen/nord.js +634 -34
  4. package/dist/idl/bridge.d.ts +569 -0
  5. package/dist/idl/bridge.js +8 -0
  6. package/dist/idl/bridge.json +75 -62
  7. package/dist/idl/index.d.ts +71 -49
  8. package/dist/index.d.ts +1 -3
  9. package/dist/index.js +6 -13
  10. package/dist/nord/api/actions.d.ts +7 -2
  11. package/dist/nord/api/actions.js +7 -1
  12. package/dist/nord/api/core.d.ts +1 -1
  13. package/dist/nord/api/core.js +3 -3
  14. package/dist/nord/api/market.js +1 -3
  15. package/dist/nord/api/queries.js +2 -2
  16. package/dist/nord/client/Nord.d.ts +9 -14
  17. package/dist/nord/client/Nord.js +27 -38
  18. package/dist/nord/client/NordUser.d.ts +7 -23
  19. package/dist/nord/client/NordUser.js +67 -143
  20. package/dist/nord/utils/NordError.js +5 -2
  21. package/dist/types.d.ts +34 -50
  22. package/dist/utils.d.ts +2 -9
  23. package/dist/utils.js +13 -18
  24. package/package.json +17 -18
  25. package/protoc-generate.sh +0 -0
  26. package/src/idl/bridge.json +75 -62
  27. package/src/index.ts +9 -12
  28. package/src/nord/api/actions.ts +14 -3
  29. package/src/nord/api/core.ts +4 -2
  30. package/src/nord/api/market.ts +1 -4
  31. package/src/nord/api/queries.ts +2 -2
  32. package/src/nord/client/Nord.ts +45 -50
  33. package/src/nord/client/NordUser.ts +90 -171
  34. package/src/nord/utils/NordError.ts +6 -2
  35. package/src/types.ts +34 -49
  36. package/src/utils.ts +16 -19
  37. package/codebase.md +0 -18886
  38. package/docs/.nojekyll +0 -1
  39. package/docs/assets/hierarchy.js +0 -1
  40. package/docs/assets/highlight.css +0 -92
  41. package/docs/assets/icons.js +0 -18
  42. package/docs/assets/icons.svg +0 -1
  43. package/docs/assets/main.js +0 -60
  44. package/docs/assets/navigation.js +0 -1
  45. package/docs/assets/search.js +0 -1
  46. package/docs/assets/style.css +0 -1611
  47. package/docs/classes/Nord.html +0 -189
  48. package/docs/classes/NordError.html +0 -24
  49. package/docs/classes/NordUser.html +0 -115
  50. package/docs/classes/NordWebSocketClient.html +0 -330
  51. package/docs/classes/SolanaBridgeClient.html +0 -91
  52. package/docs/classes/Subscriber.html +0 -10
  53. package/docs/enums/FillMode.html +0 -5
  54. package/docs/enums/KeyType.html +0 -4
  55. package/docs/enums/MetricPeriod.html +0 -9
  56. package/docs/enums/PdaSeedType.html +0 -11
  57. package/docs/enums/PeakTpsPeriodUnit.html +0 -15
  58. package/docs/enums/Side.html +0 -3
  59. package/docs/enums/WebSocketMessageType.html +0 -7
  60. package/docs/functions/actionQueryRollman.html +0 -6
  61. package/docs/functions/actionsQueryRollman.html +0 -6
  62. package/docs/functions/aggregateMetrics-1.html +0 -7
  63. package/docs/functions/assert.html +0 -1
  64. package/docs/functions/bigIntToProtoU128.html +0 -4
  65. package/docs/functions/bridgeToBN.html +0 -5
  66. package/docs/functions/bufferToHex.html +0 -4
  67. package/docs/functions/cancelOrder.html +0 -1
  68. package/docs/functions/checkPubKeyLength.html +0 -1
  69. package/docs/functions/checkedFetch.html +0 -6
  70. package/docs/functions/createSession.html +0 -1
  71. package/docs/functions/decodeLengthDelimited.html +0 -11
  72. package/docs/functions/encodeLengthDelimited.html +0 -6
  73. package/docs/functions/fillModeToProtoFillMode.html +0 -5
  74. package/docs/functions/findMarket.html +0 -1
  75. package/docs/functions/findPda.html +0 -6
  76. package/docs/functions/findToken.html +0 -1
  77. package/docs/functions/fromBN.html +0 -5
  78. package/docs/functions/getAccount.html +0 -6
  79. package/docs/functions/getActionNonce.html +0 -5
  80. package/docs/functions/getCurrentTps.html +0 -6
  81. package/docs/functions/getInfo.html +0 -5
  82. package/docs/functions/getLastActionId.html +0 -5
  83. package/docs/functions/getMedianLatency.html +0 -6
  84. package/docs/functions/getOrderbook.html +0 -6
  85. package/docs/functions/getPeakTps.html +0 -6
  86. package/docs/functions/getTimestamp.html +0 -5
  87. package/docs/functions/getTotalTransactions.html +0 -5
  88. package/docs/functions/getTrades.html +0 -6
  89. package/docs/functions/getUserAccountIds.html +0 -6
  90. package/docs/functions/hexToBuffer.html +0 -4
  91. package/docs/functions/initWebSocketClient.html +0 -12
  92. package/docs/functions/keypairFromPrivateKey.html +0 -4
  93. package/docs/functions/makeSigningFunction.html +0 -4
  94. package/docs/functions/makeWalletSignFn.html +0 -6
  95. package/docs/functions/marketsStats.html +0 -5
  96. package/docs/functions/optExpect.html +0 -5
  97. package/docs/functions/optMap.html +0 -5
  98. package/docs/functions/optUnwrap.html +0 -2
  99. package/docs/functions/panic.html +0 -1
  100. package/docs/functions/placeOrder.html +0 -1
  101. package/docs/functions/queryAction.html +0 -6
  102. package/docs/functions/queryPrometheus.html +0 -6
  103. package/docs/functions/queryRecentActions.html +0 -7
  104. package/docs/functions/revokeSession.html +0 -1
  105. package/docs/functions/shortenPublicKey.html +0 -5
  106. package/docs/functions/signAction.html +0 -6
  107. package/docs/functions/toBN.html +0 -5
  108. package/docs/functions/toScaledU128.html +0 -8
  109. package/docs/functions/toScaledU64.html +0 -8
  110. package/docs/functions/transfer.html +0 -1
  111. package/docs/functions/withdraw.html +0 -1
  112. package/docs/hierarchy.html +0 -1
  113. package/docs/index.html +0 -40
  114. package/docs/interfaces/Account.html +0 -8
  115. package/docs/interfaces/ActionInfo.html +0 -8
  116. package/docs/interfaces/ActionNonceResponse.html +0 -3
  117. package/docs/interfaces/ActionQuery.html +0 -4
  118. package/docs/interfaces/ActionResponse.html +0 -8
  119. package/docs/interfaces/ActionsExtendedInfo.html +0 -10
  120. package/docs/interfaces/ActionsQuery.html +0 -5
  121. package/docs/interfaces/ActionsResponse.html +0 -6
  122. package/docs/interfaces/AggregateMetrics.html +0 -12
  123. package/docs/interfaces/BlockFacts.html +0 -10
  124. package/docs/interfaces/BlockQuery.html +0 -6
  125. package/docs/interfaces/BlockResponse.html +0 -6
  126. package/docs/interfaces/BlockSummary.html +0 -8
  127. package/docs/interfaces/BlockSummaryResponse.html +0 -6
  128. package/docs/interfaces/DeltaEvent.html +0 -6
  129. package/docs/interfaces/DepositSplParams.html +0 -8
  130. package/docs/interfaces/Info.html +0 -3
  131. package/docs/interfaces/Market.html +0 -8
  132. package/docs/interfaces/MarketStats.html +0 -7
  133. package/docs/interfaces/MarketsStatsResponse.html +0 -2
  134. package/docs/interfaces/NordConfig.html +0 -24
  135. package/docs/interfaces/NordWebSocketClientEvents.html +0 -4
  136. package/docs/interfaces/NordWebSocketEvents.html +0 -8
  137. package/docs/interfaces/Order.html +0 -6
  138. package/docs/interfaces/OrderInfo.html +0 -6
  139. package/docs/interfaces/OrderbookEntry.html +0 -4
  140. package/docs/interfaces/OrderbookQuery.html +0 -6
  141. package/docs/interfaces/OrderbookResponse.html +0 -6
  142. package/docs/interfaces/OrderbookSubscription.html +0 -159
  143. package/docs/interfaces/PerpMarketStats.html +0 -5
  144. package/docs/interfaces/RollmanActionExtendedInfo.html +0 -4
  145. package/docs/interfaces/RollmanActionInfo.html +0 -4
  146. package/docs/interfaces/RollmanActionResponse.html +0 -4
  147. package/docs/interfaces/RollmanActionsResponse.html +0 -2
  148. package/docs/interfaces/RollmanBlockResponse.html +0 -3
  149. package/docs/interfaces/SPLTokenInfo.html +0 -10
  150. package/docs/interfaces/SolanaBridgeConfig.html +0 -12
  151. package/docs/interfaces/StateFacts.html +0 -10
  152. package/docs/interfaces/SubscriberConfig.html +0 -3
  153. package/docs/interfaces/TimestampResponse.html +0 -3
  154. package/docs/interfaces/Token.html +0 -5
  155. package/docs/interfaces/TokenInfo.html +0 -6
  156. package/docs/interfaces/Trade.html +0 -5
  157. package/docs/interfaces/TradeSubscription.html +0 -159
  158. package/docs/interfaces/Trades.html +0 -5
  159. package/docs/interfaces/TradesQuery.html +0 -6
  160. package/docs/interfaces/TradesResponse.html +0 -7
  161. package/docs/interfaces/TransferParams.html +0 -8
  162. package/docs/interfaces/UserAccountIdsQuery.html +0 -3
  163. package/docs/interfaces/UserAccountIdsResponse.html +0 -3
  164. package/docs/interfaces/WebSocketAccountUpdate.html +0 -6
  165. package/docs/interfaces/WebSocketDeltaUpdate.html +0 -9
  166. package/docs/interfaces/WebSocketSubscription.html +0 -4
  167. package/docs/interfaces/WebSocketTradeUpdate.html +0 -6
  168. package/docs/interfaces/WithdrawalClaim.html +0 -14
  169. package/docs/interfaces/WithdrawalParams.html +0 -8
  170. package/docs/modules.html +0 -1
  171. package/docs/types/BigIntValue.html +0 -2
  172. package/docs/types/SubscriptionPattern.html +0 -4
  173. package/docs/types/SubscriptionType.html +0 -2
  174. package/docs/types/WebSocketMessage.html +0 -1
  175. package/docs/variables/DEBUG_KEYS.html +0 -1
  176. package/docs/variables/DEFAULT_FUNDING_AMOUNTS.html +0 -1
  177. package/docs/variables/DEV_TOKEN_INFOS.html +0 -1
  178. package/docs/variables/DEV_URL.html +0 -1
  179. package/docs/variables/MAX_BUFFER_LEN.html +0 -1
  180. package/docs/variables/SESSION_TTL.html +0 -1
  181. package/docs/variables/WEBSERVER_DEV_URL.html +0 -1
  182. package/docs/variables/ZERO_DECIMAL.html +0 -1
  183. package/docs/variables/_private.html +0 -2
  184. package/idl-generate.sh +0 -4
  185. package/src/bridge/client.ts +0 -498
  186. package/src/bridge/const.ts +0 -53
  187. package/src/bridge/index.ts +0 -6
  188. package/src/bridge/types.ts +0 -129
  189. package/src/bridge/utils.ts +0 -140
  190. package/src/gen/common.ts +0 -297
  191. package/src/gen/nord.ts +0 -6716
  192. package/src/idl/index.ts +0 -2
@@ -1,159 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>OrderbookSubscription | @n1xyz/nord-ts</title><meta name="description" content="Documentation for @n1xyz/nord-ts"/><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 defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></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">@n1xyz/nord-ts</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@n1xyz/nord-ts</a></li><li><a href="OrderbookSubscription.html">OrderbookSubscription</a></li></ul><h1>Interface OrderbookSubscription</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Interface for orderbook subscription</p>
2
- </div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">OrderbookSubscription</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#capturerejectionsymbol-1">&quot;[captureRejectionSymbol]&quot;</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#capturerejectionsymbolk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">event</span><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><br/>        <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">,</span><br/>    <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><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#addlistener-1">addListener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#addlistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#close-1">close</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><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#emit-1">emit</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#emitk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#eventnames-1">eventNames</a><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> <span class="tsd-signature-type">symbol</span>)<span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#getmaxlisteners-1">getMaxListeners</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#listenercount-1">listenerCount</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#listenercountk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">listener</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#listeners-1">listeners</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#listenersk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#off-1">off</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#offk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#on-1">on</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;message&quot;</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="OrderbookResponse.html" class="tsd-signature-type tsd-kind-interface">OrderbookResponse</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#on-2">on</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;error&quot;</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#once-1">once</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#oncek">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#prependlistener-1">prependListener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#prependlistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#prependoncelistener-1">prependOnceListener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#prependoncelistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#rawlisteners-1">rawListeners</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#rawlistenersk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#removealllisteners-1">removeAllListeners</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#removelistener-1">removeListener</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#removelistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">eventName</span><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><br/>        <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="OrderbookSubscription.html#setmaxlisteners-1">setMaxListeners</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel tsd-hierarchy" data-refl="905"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-signature-type">EventEmitter</span><ul class="tsd-hierarchy"><li class="tsd-hierarchy-item"><span class="tsd-hierarchy-target">OrderbookSubscription</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/639f599c4c36f1fcc745c0f0e92362164cc8f0a6/ts/src/nord/models/Subscriber.ts#L41">src/nord/models/Subscriber.ts:41</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="OrderbookSubscription.html#capturerejectionsymbol" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]?</span></a>
3
- <a href="OrderbookSubscription.html#addlistener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a>
4
- <a href="OrderbookSubscription.html#close" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>close</span></a>
5
- <a href="OrderbookSubscription.html#emit" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>emit</span></a>
6
- <a href="OrderbookSubscription.html#eventnames" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a>
7
- <a href="OrderbookSubscription.html#getmaxlisteners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a>
8
- <a href="OrderbookSubscription.html#listenercount" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a>
9
- <a href="OrderbookSubscription.html#listeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a>
10
- <a href="OrderbookSubscription.html#off" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a>
11
- <a href="OrderbookSubscription.html#on" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a>
12
- <a href="OrderbookSubscription.html#once" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a>
13
- <a href="OrderbookSubscription.html#prependlistener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Listener</span></a>
14
- <a href="OrderbookSubscription.html#prependoncelistener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a>
15
- <a href="OrderbookSubscription.html#rawlisteners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a>
16
- <a href="OrderbookSubscription.html#removealllisteners" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>All<wbr/>Listeners</span></a>
17
- <a href="OrderbookSubscription.html#removelistener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a>
18
- <a href="OrderbookSubscription.html#setmaxlisteners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
19
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Methods</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="capturerejectionsymbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>[capture<wbr/>Rejection<wbr/>Symbol]</span><a href="#capturerejectionsymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="capturerejectionsymbol-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">&quot;[captureRejectionSymbol]&quot;</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#capturerejectionsymbolk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">event</span><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><br/>    <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#capturerejectionsymbol-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="capturerejectionsymbolk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">Error</span></span></li><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">AnyRest</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from EventEmitter.[captureRejectionSymbol]</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:136</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>add<wbr/>Listener</span><a href="#addlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="addlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">addListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#addlistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">eventName</span><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><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#addlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for <code>emitter.on(eventName, listener)</code>.</p>
20
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="addlistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since" class="tsd-anchor"></a>Since<a href="#since" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
21
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.addListener</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:597</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="close" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>close</span><a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="close-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">close</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#close-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/639f599c4c36f1fcc745c0f0e92362164cc8f0a6/ts/src/nord/models/Subscriber.ts#L44">src/nord/models/Subscriber.ts:44</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>emit</span><a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#emitk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">args</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">AnyRest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Synchronously calls each of the listeners registered for the event named <code>eventName</code>, in the order they were registered, passing the supplied arguments
22
- to each.</p>
23
- <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
24
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEmitter</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><br/><span class="hl-0">// First listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">firstListener</span><span class="hl-2">() {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;Helloooo! first listener&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><span class="hl-0">// Second listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">secondListener</span><span class="hl-2">(</span><span class="hl-5">arg1</span><span class="hl-2">, </span><span class="hl-5">arg2</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`event with parameters </span><span class="hl-6">${</span><span class="hl-5">arg1</span><span class="hl-6">}</span><span class="hl-3">, </span><span class="hl-6">${</span><span class="hl-5">arg2</span><span class="hl-6">}</span><span class="hl-3"> in second listener`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><span class="hl-0">// Third listener</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">thirdListener</span><span class="hl-2">(...</span><span class="hl-5">args</span><span class="hl-2">) {</span><br/><span class="hl-2"> </span><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">parameters</span><span class="hl-2"> = </span><span class="hl-5">args</span><span class="hl-2">.</span><span class="hl-1">join</span><span class="hl-2">(</span><span class="hl-3">&#39;, &#39;</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">`event with parameters </span><span class="hl-6">${</span><span class="hl-5">parameters</span><span class="hl-6">}</span><span class="hl-3"> in third listener`</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">listeners</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">));</span><br/><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-8">1</span><span class="hl-2">, </span><span class="hl-8">2</span><span class="hl-2">, </span><span class="hl-8">3</span><span class="hl-2">, </span><span class="hl-8">4</span><span class="hl-2">, </span><span class="hl-8">5</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// [</span><br/><span class="hl-0">// [Function: firstListener],</span><br/><span class="hl-0">// [Function: secondListener],</span><br/><span class="hl-0">// [Function: thirdListener]</span><br/><span class="hl-0">// ]</span><br/><span class="hl-0">// Helloooo! first listener</span><br/><span class="hl-0">// event with parameters 1, 2 in second listener</span><br/><span class="hl-0">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
25
- </code><button type="button">Copy</button></pre>
26
-
27
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="emitk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">AnyRest</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-1" class="tsd-anchor"></a>Since<a href="#since-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
28
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.emit</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:859</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="eventnames" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>event<wbr/>Names</span><a href="#eventnames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="eventnames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">eventNames</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> <span class="tsd-signature-type">symbol</span>)<span class="tsd-signature-symbol">[]</span><a href="#eventnames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered
29
- listeners. The values in the array are strings or <code>Symbol</code>s.</p>
30
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEE</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {});</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;bar&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {});</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">sym</span><span class="hl-2"> = </span><span class="hl-1">Symbol</span><span class="hl-2">(</span><span class="hl-3">&#39;symbol&#39;</span><span class="hl-2">);</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-5">sym</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {});</span><br/><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">eventNames</span><span class="hl-2">());</span><br/><span class="hl-0">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span>
31
- </code><button type="button">Copy</button></pre>
32
-
33
- </div><h4 class="tsd-returns-title">Returns (<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></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-2" class="tsd-anchor"></a>Since<a href="#since-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
34
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.eventNames</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:922</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getmaxlisteners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>get<wbr/>Max<wbr/>Listeners</span><a href="#getmaxlisteners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="getmaxlisteners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">getMaxListeners</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#getmaxlisteners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the current max listener value for the <code>EventEmitter</code> which is either
35
- set by <code>emitter.setMaxListeners(n)</code> or defaults to <a href="../classes/NordWebSocketClient.html#defaultmaxlisteners" class="tsd-kind-property">EventEmitter.defaultMaxListeners</a>.</p>
36
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-3" class="tsd-anchor"></a>Since<a href="#since-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v1.0.0</p>
37
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.getMaxListeners</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:774</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listenercount" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listener<wbr/>Count</span><a href="#listenercount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="listenercount-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listenerCount</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#listenercountk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">listener</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#listenercount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the number of listeners listening for the event named <code>eventName</code>.
38
- If <code>listener</code> is provided, it will return how many times the listener is found
39
- in the list of the listeners of the event.</p>
40
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listenercountk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event being listened for</p>
41
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-type">Function</span></span><div class="tsd-comment tsd-typography"><p>The event handler function</p>
42
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-4" class="tsd-anchor"></a>Since<a href="#since-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v3.2.0</p>
43
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.listenerCount</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:868</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>listeners</span><a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="listeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#listenersk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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><a href="#listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
44
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span><br/><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-5">util</span><span class="hl-2">.</span><span class="hl-1">inspect</span><span class="hl-2">(</span><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">listeners</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">)));</span><br/><span class="hl-0">// Prints: [ [Function] ]</span>
45
- </code><button type="button">Copy</button></pre>
46
-
47
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listenersk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-5" class="tsd-anchor"></a>Since<a href="#since-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
48
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.listeners</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:787</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="off" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>off</span><a href="#off" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="off-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">off</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#offk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#off-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for <code>emitter.removeListener()</code>.</p>
49
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="offk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-6" class="tsd-anchor"></a>Since<a href="#since-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v10.0.0</p>
50
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.off</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:747</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="on" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>on</span><a href="#on" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="on-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;message&quot;</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="OrderbookResponse.html" class="tsd-signature-type tsd-kind-interface">OrderbookResponse</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#on-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds the <code>listener</code> function to the end of the listeners array for the event
51
- named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
52
- been added. Multiple calls passing the same combination of <code>eventName</code> and
53
- <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
54
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span>
55
- </code><button type="button">Copy</button></pre>
56
-
57
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
58
- <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the
59
- event listener to the beginning of the listeners array.</p>
60
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEE</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">prependListener</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">);</span><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// b</span><br/><span class="hl-0">// a</span>
61
- </code><button type="button">Copy</button></pre>
62
-
63
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;message&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">:</span> <a href="OrderbookResponse.html" class="tsd-signature-type tsd-kind-interface">OrderbookResponse</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
64
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-7" class="tsd-anchor"></a>Since<a href="#since-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p>
65
- </div></div><aside class="tsd-sources"><p>Overrides EventEmitter.on</p><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/639f599c4c36f1fcc745c0f0e92362164cc8f0a6/ts/src/nord/models/Subscriber.ts#L42">src/nord/models/Subscriber.ts:42</a></li></ul></aside></div></li><li class=""><div class="tsd-signature tsd-anchor-link"><a id="on-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;error&quot;</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#on-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds the <code>listener</code> function to the end of the listeners array for the event
66
- named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
67
- been added. Multiple calls passing the same combination of <code>eventName</code> and
68
- <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
69
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span>
70
- </code><button type="button">Copy</button></pre>
71
-
72
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
73
- <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependListener()</code> method can be used as an alternative to add the
74
- event listener to the beginning of the listeners array.</p>
75
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEE</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">prependListener</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">);</span><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// b</span><br/><span class="hl-0">// a</span>
76
- </code><button type="button">Copy</button></pre>
77
-
78
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">&quot;error&quot;</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
79
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-8" class="tsd-anchor"></a>Since<a href="#since-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.101</p>
80
- </div></div><aside class="tsd-sources"><p>Overrides EventEmitter.on</p><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/639f599c4c36f1fcc745c0f0e92362164cc8f0a6/ts/src/nord/models/Subscriber.ts#L43">src/nord/models/Subscriber.ts:43</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>once</span><a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#oncek">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong> <code>listener</code> function for the event named <code>eventName</code>. The
81
- next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
82
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">once</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span>
83
- </code><button type="button">Copy</button></pre>
84
-
85
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
86
- <p>By default, event listeners are invoked in the order they are added. The <code>emitter.prependOnceListener()</code> method can be used as an alternative to add the
87
- event listener to the beginning of the listeners array.</p>
88
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEE</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">once</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;a&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">prependOnceListener</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;b&#39;</span><span class="hl-2">));</span><br/><span class="hl-5">myEE</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;foo&#39;</span><span class="hl-2">);</span><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// b</span><br/><span class="hl-0">// a</span>
89
- </code><button type="button">Copy</button></pre>
90
-
91
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="oncek" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
92
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
93
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-9" class="tsd-anchor"></a>Since<a href="#since-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.3.0</p>
94
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.once</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:659</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prependlistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Listener</span><a href="#prependlistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="prependlistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prependListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#prependlistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">eventName</span><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><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#prependlistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds the <code>listener</code> function to the <em>beginning</em> of the listeners array for the
95
- event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
96
- already been added. Multiple calls passing the same combination of <code>eventName</code>
97
- and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
98
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">prependListener</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span>
99
- </code><button type="button">Copy</button></pre>
100
-
101
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
102
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="prependlistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
103
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
104
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-10" class="tsd-anchor"></a>Since<a href="#since-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
105
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.prependListener</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:886</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="prependoncelistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>prepend<wbr/>Once<wbr/>Listener</span><a href="#prependoncelistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="prependoncelistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prependOnceListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#prependoncelistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">eventName</span><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><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#prependoncelistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a <strong>one-time</strong><code>listener</code> function for the event named <code>eventName</code> to the <em>beginning</em> of the listeners array. The next time <code>eventName</code> is triggered, this
106
- listener is removed, and then invoked.</p>
107
- <pre><code class="js"><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">prependOnceListener</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;Ah, we have our first user!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">});</span>
108
- </code><button type="button">Copy</button></pre>
109
-
110
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
111
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="prependoncelistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
112
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
113
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-11" class="tsd-anchor"></a>Since<a href="#since-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v6.0.0</p>
114
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.prependOnceListener</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:902</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="rawlisteners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Listeners</span><a href="#rawlisteners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="rawlisteners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">rawListeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#rawlistenersk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><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><a href="#rawlisteners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a copy of the array of listeners for the event named <code>eventName</code>,
115
- including any wrappers (such as those created by <code>.once()</code>).</p>
116
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">emitter</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><span class="hl-5">emitter</span><span class="hl-2">.</span><span class="hl-1">once</span><span class="hl-2">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;log once&#39;</span><span class="hl-2">));</span><br/><br/><span class="hl-0">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-0">// `listener` which contains the original listener bound above</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">listeners</span><span class="hl-2"> = </span><span class="hl-5">emitter</span><span class="hl-2">.</span><span class="hl-1">rawListeners</span><span class="hl-2">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-2">);</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">logFnWrapper</span><span class="hl-2"> = </span><span class="hl-5">listeners</span><span class="hl-2">[</span><span class="hl-8">0</span><span class="hl-2">];</span><br/><br/><span class="hl-0">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-5">logFnWrapper</span><span class="hl-2">.</span><span class="hl-1">listener</span><span class="hl-2">();</span><br/><br/><span class="hl-0">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-1">logFnWrapper</span><span class="hl-2">();</span><br/><br/><span class="hl-5">emitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-2">, () </span><span class="hl-6">=&gt;</span><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;log persistently&#39;</span><span class="hl-2">));</span><br/><span class="hl-0">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">newListeners</span><span class="hl-2"> = </span><span class="hl-5">emitter</span><span class="hl-2">.</span><span class="hl-1">rawListeners</span><span class="hl-2">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-5">newListeners</span><span class="hl-2">[</span><span class="hl-8">0</span><span class="hl-2">]();</span><br/><span class="hl-5">emitter</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;log&#39;</span><span class="hl-2">);</span>
117
- </code><button type="button">Copy</button></pre>
118
-
119
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawlistenersk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-12" class="tsd-anchor"></a>Since<a href="#since-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v9.4.0</p>
120
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.rawListeners</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:818</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><a id="removealllisteners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>All<wbr/>Listeners</span><a href="#removealllisteners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link"><a id="removealllisteners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeAllListeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#removealllisteners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes all listeners, or those of the specified <code>eventName</code>.</p>
121
- <p>It is bad practice to remove listeners added elsewhere in the code,
122
- particularly when the <code>EventEmitter</code> instance was created by some other
123
- component or module (e.g. sockets or file streams).</p>
124
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
125
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">event</span>: <span class="tsd-signature-type">string</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-13" class="tsd-anchor"></a>Since<a href="#since-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
126
- </div></div><aside class="tsd-sources"><p>Overrides EventEmitter.removeAllListeners</p><ul><li>Defined in <a href="https://github.com/n1xyz/nord/blob/639f599c4c36f1fcc745c0f0e92362164cc8f0a6/ts/src/nord/models/Subscriber.ts#L45">src/nord/models/Subscriber.ts:45</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="removelistener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>remove<wbr/>Listener</span><a href="#removelistener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="removelistener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">removeListener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="OrderbookSubscription.html#removelistenerk">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">eventName</span><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><br/>    <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#removelistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes the specified <code>listener</code> from the listener array for the event named <code>eventName</code>.</p>
127
- <pre><code class="js"><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-1">callback</span><span class="hl-2"> = (</span><span class="hl-5">stream</span><span class="hl-2">) </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;someone connected!&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">};</span><br/><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, </span><span class="hl-5">callback</span><span class="hl-2">);</span><br/><span class="hl-0">// ...</span><br/><span class="hl-5">server</span><span class="hl-2">.</span><span class="hl-1">removeListener</span><span class="hl-2">(</span><span class="hl-3">&#39;connection&#39;</span><span class="hl-2">, </span><span class="hl-5">callback</span><span class="hl-2">);</span>
128
- </code><button type="button">Copy</button></pre>
129
-
130
- <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
131
- listener array. If any single listener has been added multiple times to the
132
- listener array for the specified <code>eventName</code>, then <code>removeListener()</code> must be
133
- called multiple times to remove each instance.</p>
134
- <p>Once an event is emitted, all listeners attached to it at the
135
- time of emitting are called in order. This implies that any <code>removeListener()</code> or <code>removeAllListeners()</code> calls <em>after</em> emitting and <em>before</em> the last listener finishes execution
136
- will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
137
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">class</span><span class="hl-2"> </span><span class="hl-9">MyEmitter</span><span class="hl-2"> </span><span class="hl-6">extends</span><span class="hl-2"> </span><span class="hl-9">EventEmitter</span><span class="hl-2"> {}</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">myEmitter</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">MyEmitter</span><span class="hl-2">();</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-1">callbackA</span><span class="hl-2"> = () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;A&#39;</span><span class="hl-2">);</span><br/><span class="hl-2"> </span><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">removeListener</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-5">callbackB</span><span class="hl-2">);</span><br/><span class="hl-2">};</span><br/><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-1">callbackB</span><span class="hl-2"> = () </span><span class="hl-6">=&gt;</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;B&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">};</span><br/><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-5">callbackA</span><span class="hl-2">);</span><br/><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">, </span><span class="hl-5">callbackB</span><span class="hl-2">);</span><br/><br/><span class="hl-0">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-0">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">);</span><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// A</span><br/><span class="hl-0">// B</span><br/><br/><span class="hl-0">// callbackB is now removed.</span><br/><span class="hl-0">// Internal listener array [callbackA]</span><br/><span class="hl-5">myEmitter</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;event&#39;</span><span class="hl-2">);</span><br/><span class="hl-0">// Prints:</span><br/><span class="hl-0">// A</span>
138
- </code><button type="button">Copy</button></pre>
139
-
140
- <p>Because listeners are managed using an internal array, calling this will
141
- change the position indices of any listener registered <em>after</em> the listener
142
- being removed. This will not impact the order in which listeners are called,
143
- but it means that any copies of the listener array as returned by
144
- the <code>emitter.listeners()</code> method will need to be recreated.</p>
145
- <p>When a single function has been added as a handler multiple times for a single
146
- event (as in the example below), <code>removeListener()</code> will remove the most
147
- recently added instance. In the example the <code>once('ping')</code> listener is removed:</p>
148
- <pre><code class="js"><span class="hl-4">import</span><span class="hl-2"> { </span><span class="hl-5">EventEmitter</span><span class="hl-2"> } </span><span class="hl-4">from</span><span class="hl-2"> </span><span class="hl-3">&#39;node:events&#39;</span><span class="hl-2">;</span><br/><span class="hl-6">const</span><span class="hl-2"> </span><span class="hl-7">ee</span><span class="hl-2"> = </span><span class="hl-6">new</span><span class="hl-2"> </span><span class="hl-1">EventEmitter</span><span class="hl-2">();</span><br/><br/><span class="hl-6">function</span><span class="hl-2"> </span><span class="hl-1">pong</span><span class="hl-2">() {</span><br/><span class="hl-2"> </span><span class="hl-5">console</span><span class="hl-2">.</span><span class="hl-1">log</span><span class="hl-2">(</span><span class="hl-3">&#39;pong&#39;</span><span class="hl-2">);</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-5">ee</span><span class="hl-2">.</span><span class="hl-1">on</span><span class="hl-2">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-2">, </span><span class="hl-5">pong</span><span class="hl-2">);</span><br/><span class="hl-5">ee</span><span class="hl-2">.</span><span class="hl-1">once</span><span class="hl-2">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-2">, </span><span class="hl-5">pong</span><span class="hl-2">);</span><br/><span class="hl-5">ee</span><span class="hl-2">.</span><span class="hl-1">removeListener</span><span class="hl-2">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-2">, </span><span class="hl-5">pong</span><span class="hl-2">);</span><br/><br/><span class="hl-5">ee</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-2">);</span><br/><span class="hl-5">ee</span><span class="hl-2">.</span><span class="hl-1">emit</span><span class="hl-2">(</span><span class="hl-3">&#39;ping&#39;</span><span class="hl-2">);</span>
149
- </code><button type="button">Copy</button></pre>
150
-
151
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
152
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="removelistenerk" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">K</span></span></li></ul></section><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">symbol</span></span></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</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> <span class="tsd-signature-symbol">=&gt;</span> <span class="tsd-signature-type">void</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-14" class="tsd-anchor"></a>Since<a href="#since-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.1.26</p>
153
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.removeListener</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:742</li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setmaxlisteners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Max<wbr/>Listeners</span><a href="#setmaxlisteners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-is-inherited tsd-is-external"><div class="tsd-signature tsd-anchor-link"><a id="setmaxlisteners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">setMaxListeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">this</span><a href="#setmaxlisteners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>By default <code>EventEmitter</code>s will print a warning if more than <code>10</code> listeners are
154
- added for a particular event. This is a useful default that helps finding
155
- memory leaks. The <code>emitter.setMaxListeners()</code> method allows the limit to be
156
- modified for this specific <code>EventEmitter</code> instance. The value can be set to <code>Infinity</code> (or <code>0</code>) to indicate an unlimited number of listeners.</p>
157
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
158
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-since"><h4 class="tsd-anchor-link"><a id="since-15" class="tsd-anchor"></a>Since<a href="#since-15" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>v0.3.5</p>
159
- </div></div><aside class="tsd-sources"><p>Inherited from EventEmitter.setMaxListeners</p><ul><li>Defined in node_modules/.pnpm/@types+node@20.17.30/node_modules/@types/node/events.d.ts:768</li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#capturerejectionsymbol" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]</span></a><a href="#addlistener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a><a href="#close" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>close</span></a><a href="#emit" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>emit</span></a><a href="#eventnames" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a><a href="#getmaxlisteners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a><a href="#listenercount" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a><a href="#listeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a><a href="#off" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a><a href="#on" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a><a href="#once" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a><a href="#prependlistener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Listener</span></a><a href="#prependoncelistener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a><a href="#rawlisteners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a><a href="#removealllisteners" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>All<wbr/>Listeners</span></a><a href="#removelistener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a><a href="#setmaxlisteners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@n1xyz/nord-ts</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>