@codebolt/codeboltjs 2.0.3 → 2.0.4

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 (415) hide show
  1. package/Readme.md +47 -0
  2. package/{modules → dist}/agentlib/agent.js +4 -4
  3. package/{modules → dist}/agentlib/usermessage.js +3 -3
  4. package/dist/utils.d.ts +5 -0
  5. package/{utils.js → dist/utils.js} +4 -4
  6. package/package.json +17 -8
  7. package/.codebolt/chat.json +0 -1
  8. package/.codebolt/debug.json +0 -1
  9. package/.codebolt/projectState.json +0 -127
  10. package/.codebolt/tasks.json +0 -1
  11. package/.codeboltconfig.yaml +0 -0
  12. package/.github/workflows/publish-to-npm.yml +0 -20
  13. package/bkp/toolBox.bkp.ts +0 -1162
  14. package/docs/.nojekyll +0 -1
  15. package/docs/assets/highlight.css +0 -127
  16. package/docs/assets/icons.js +0 -15
  17. package/docs/assets/icons.svg +0 -1
  18. package/docs/assets/main.js +0 -59
  19. package/docs/assets/navigation.js +0 -1
  20. package/docs/assets/search.js +0 -1
  21. package/docs/assets/style.css +0 -1412
  22. package/docs/classes/_internal_.Agent.html +0 -318
  23. package/docs/classes/_internal_.AsyncResource.html +0 -44
  24. package/docs/classes/_internal_.Blob.html +0 -33
  25. package/docs/classes/_internal_.ClientRequest.html +0 -506
  26. package/docs/classes/_internal_.Codebolt.html +0 -315
  27. package/docs/classes/_internal_.CustomEventEmitter-1.html +0 -248
  28. package/docs/classes/_internal_.CustomEventEmitter.html +0 -248
  29. package/docs/classes/_internal_.Duplex.html +0 -690
  30. package/docs/classes/_internal_.EventEmitter-1.html +0 -254
  31. package/docs/classes/_internal_.EventEmitter.EventEmitterAsyncResource.html +0 -268
  32. package/docs/classes/_internal_.IncomingMessage.html +0 -661
  33. package/docs/classes/_internal_.KeyObject.html +0 -76
  34. package/docs/classes/_internal_.OutgoingMessage.html +0 -491
  35. package/docs/classes/_internal_.Readable.html +0 -551
  36. package/docs/classes/_internal_.ReadableBase.html +0 -551
  37. package/docs/classes/_internal_.Server-1.html +0 -416
  38. package/docs/classes/_internal_.Server-2.html +0 -326
  39. package/docs/classes/_internal_.Server-3.html +0 -353
  40. package/docs/classes/_internal_.Server.html +0 -390
  41. package/docs/classes/_internal_.ServerResponse.html +0 -569
  42. package/docs/classes/_internal_.Socket.html +0 -791
  43. package/docs/classes/_internal_.Stream.html +0 -256
  44. package/docs/classes/_internal_.TLSSocket.html +0 -947
  45. package/docs/classes/_internal_.URL.html +0 -140
  46. package/docs/classes/_internal_.URLSearchParams.html +0 -68
  47. package/docs/classes/_internal_.WebSocket-1.html +0 -297
  48. package/docs/classes/_internal_.WebSocket.Server.html +0 -261
  49. package/docs/classes/_internal_.Writable.html +0 -394
  50. package/docs/classes/_internal_.WritableBase.html +0 -394
  51. package/docs/classes/_internal_.X509Certificate.html +0 -144
  52. package/docs/classes/_internal_.internal-1.html +0 -256
  53. package/docs/classes/_internal_.internal.PassThrough.html +0 -686
  54. package/docs/classes/_internal_.internal.Transform.html +0 -693
  55. package/docs/enums/_internal_.logType.html +0 -4
  56. package/docs/functions/_internal_.WebSocket.createWebSocketStream.html +0 -1
  57. package/docs/functions/_internal_._node_stream_consumers_.arrayBuffer.html +0 -1
  58. package/docs/functions/_internal_._node_stream_consumers_.blob.html +0 -1
  59. package/docs/functions/_internal_._node_stream_consumers_.buffer.html +0 -1
  60. package/docs/functions/_internal_._node_stream_consumers_.json.html +0 -1
  61. package/docs/functions/_internal_._node_stream_consumers_.text.html +0 -1
  62. package/docs/functions/_internal_._node_stream_promises_.finished.html +0 -1
  63. package/docs/functions/_internal_._node_stream_promises_.pipeline.html +0 -1
  64. package/docs/functions/_internal_.internal.addAbortSignal.html +0 -17
  65. package/docs/functions/_internal_.internal.finished-1.html +0 -20
  66. package/docs/functions/_internal_.internal.finished.__promisify__.html +0 -1
  67. package/docs/functions/_internal_.internal.getDefaultHighWaterMark.html +0 -4
  68. package/docs/functions/_internal_.internal.isErrored.html +0 -3
  69. package/docs/functions/_internal_.internal.isReadable.html +0 -3
  70. package/docs/functions/_internal_.internal.pipeline-1.html +0 -24
  71. package/docs/functions/_internal_.internal.pipeline.__promisify__.html +0 -1
  72. package/docs/functions/_internal_.internal.setDefaultHighWaterMark.html +0 -4
  73. package/docs/hierarchy.html +0 -1
  74. package/docs/index.html +0 -12
  75. package/docs/interfaces/_internal_.AddToAgentStateResponse.html +0 -3
  76. package/docs/interfaces/_internal_.AddTokenResponse.html +0 -3
  77. package/docs/interfaces/_internal_.AddVectorItemResponse.html +0 -3
  78. package/docs/interfaces/_internal_.AddressInfo.html +0 -4
  79. package/docs/interfaces/_internal_.AgentOptions.html +0 -35
  80. package/docs/interfaces/_internal_.ApplicationState.html +0 -4
  81. package/docs/interfaces/_internal_.ArrayBufferView.html +0 -7
  82. package/docs/interfaces/_internal_.ArrayLike.html +0 -2
  83. package/docs/interfaces/_internal_.ArrayOptions.html +0 -7
  84. package/docs/interfaces/_internal_.AsymmetricKeyDetails.html +0 -15
  85. package/docs/interfaces/_internal_.AsyncGenerator.html +0 -5
  86. package/docs/interfaces/_internal_.AsyncGeneratorFunction.html +0 -12
  87. package/docs/interfaces/_internal_.AsyncIterable.html +0 -2
  88. package/docs/interfaces/_internal_.AsyncIterableIterator.html +0 -5
  89. package/docs/interfaces/_internal_.AsyncIterator.html +0 -4
  90. package/docs/interfaces/_internal_.AsyncResourceOptions.html +0 -12
  91. package/docs/interfaces/_internal_.BlobOptions.html +0 -8
  92. package/docs/interfaces/_internal_.Buffer.html +0 -760
  93. package/docs/interfaces/_internal_.BufferConstructor.html +0 -165
  94. package/docs/interfaces/_internal_.Certificate.html +0 -13
  95. package/docs/interfaces/_internal_.ChatMessage.html +0 -3
  96. package/docs/interfaces/_internal_.Choice.html +0 -5
  97. package/docs/interfaces/_internal_.CipherNameAndProtocol.html +0 -7
  98. package/docs/interfaces/_internal_.ClientRequestArgs.html +0 -28
  99. package/docs/interfaces/_internal_.CommandError.html +0 -3
  100. package/docs/interfaces/_internal_.CommonConnectionOptions.html +0 -29
  101. package/docs/interfaces/_internal_.ConnectOpts.html +0 -5
  102. package/docs/interfaces/_internal_.CreateFileResponse.html +0 -6
  103. package/docs/interfaces/_internal_.CreateFolderResponse.html +0 -6
  104. package/docs/interfaces/_internal_.CryptoKey.html +0 -26
  105. package/docs/interfaces/_internal_.DebugAddLogResponse.html +0 -4
  106. package/docs/interfaces/_internal_.DeleteFileResponse.html +0 -6
  107. package/docs/interfaces/_internal_.DeleteFolderResponse.html +0 -6
  108. package/docs/interfaces/_internal_.DetailedPeerCertificate.html +0 -53
  109. package/docs/interfaces/_internal_.Dict.html +0 -1
  110. package/docs/interfaces/_internal_.Disposable.html +0 -2
  111. package/docs/interfaces/_internal_.DropArgument.html +0 -7
  112. package/docs/interfaces/_internal_.DuplexOptions.html +0 -22
  113. package/docs/interfaces/_internal_.EphemeralKeyInfo.html +0 -7
  114. package/docs/interfaces/_internal_.ErrnoException.html +0 -8
  115. package/docs/interfaces/_internal_.Error.html +0 -4
  116. package/docs/interfaces/_internal_.EventEmitter-2.html +0 -130
  117. package/docs/interfaces/_internal_.EventEmitter.Abortable.html +0 -3
  118. package/docs/interfaces/_internal_.EventEmitter.EventEmitterAsyncResourceOptions.html +0 -19
  119. package/docs/interfaces/_internal_.EventEmitter.EventEmitterReferencingAsyncResource.html +0 -32
  120. package/docs/interfaces/_internal_.EventEmitterOptions.html +0 -3
  121. package/docs/interfaces/_internal_.ExtractTextResponse.html +0 -3
  122. package/docs/interfaces/_internal_.GetAgentStateResponse.html +0 -3
  123. package/docs/interfaces/_internal_.GetContentResponse.html +0 -3
  124. package/docs/interfaces/_internal_.GetMarkdownResponse.html +0 -3
  125. package/docs/interfaces/_internal_.GetMatcherListTreeResponse.html +0 -3
  126. package/docs/interfaces/_internal_.GetProjectPathResponse.html +0 -5
  127. package/docs/interfaces/_internal_.GetTokenResponse.html +0 -3
  128. package/docs/interfaces/_internal_.GetVectorResponse.html +0 -3
  129. package/docs/interfaces/_internal_.GoToPageResponse.html +0 -3
  130. package/docs/interfaces/_internal_.HtmlReceived.html +0 -3
  131. package/docs/interfaces/_internal_.IncomingHttpHeaders.html +0 -64
  132. package/docs/interfaces/_internal_.InformationEvent.html +0 -8
  133. package/docs/interfaces/_internal_.IpcSocketConnectOpts.html +0 -6
  134. package/docs/interfaces/_internal_.Iterable.html +0 -2
  135. package/docs/interfaces/_internal_.IterableIterator.html +0 -5
  136. package/docs/interfaces/_internal_.Iterator.html +0 -4
  137. package/docs/interfaces/_internal_.IteratorReturnResult.html +0 -3
  138. package/docs/interfaces/_internal_.IteratorYieldResult.html +0 -3
  139. package/docs/interfaces/_internal_.JsonWebKey.html +0 -14
  140. package/docs/interfaces/_internal_.JwkKeyExportOptions.html +0 -2
  141. package/docs/interfaces/_internal_.KeyAlgorithm.html +0 -2
  142. package/docs/interfaces/_internal_.KeyExportOptions.html +0 -5
  143. package/docs/interfaces/_internal_.KeyObject-1.html +0 -5
  144. package/docs/interfaces/_internal_.LLMResponse.html +0 -4
  145. package/docs/interfaces/_internal_.ListenOptions.html +0 -13
  146. package/docs/interfaces/_internal_.LookupAddress.html +0 -6
  147. package/docs/interfaces/_internal_.LookupOptions.html +0 -27
  148. package/docs/interfaces/_internal_.MatchProblemResponse.html +0 -3
  149. package/docs/interfaces/_internal_.MemoryGetResponse.html +0 -5
  150. package/docs/interfaces/_internal_.MemorySetResponse.html +0 -5
  151. package/docs/interfaces/_internal_.Message.html +0 -8
  152. package/docs/interfaces/_internal_.MessageContent.html +0 -3
  153. package/docs/interfaces/_internal_.Object.html +0 -18
  154. package/docs/interfaces/_internal_.OnReadOpts.html +0 -6
  155. package/docs/interfaces/_internal_.OpenDebugBrowserResponse.html +0 -4
  156. package/docs/interfaces/_internal_.OutgoingHttpHeaders.html +0 -80
  157. package/docs/interfaces/_internal_.PeerCertificate.html +0 -50
  158. package/docs/interfaces/_internal_.PromiseLike.html +0 -6
  159. package/docs/interfaces/_internal_.PxfObject.html +0 -5
  160. package/docs/interfaces/_internal_.QueryVectorItemResponse.html +0 -3
  161. package/docs/interfaces/_internal_.QueuingStrategy.html +0 -3
  162. package/docs/interfaces/_internal_.QueuingStrategySize.html +0 -1
  163. package/docs/interfaces/_internal_.ReadFileResponse.html +0 -7
  164. package/docs/interfaces/_internal_.ReadOnlyDict.html +0 -1
  165. package/docs/interfaces/_internal_.ReadWriteStream.html +0 -144
  166. package/docs/interfaces/_internal_.ReadableByteStreamController.html +0 -6
  167. package/docs/interfaces/_internal_.ReadableByteStreamControllerCallback.html +0 -1
  168. package/docs/interfaces/_internal_.ReadableOptions.html +0 -11
  169. package/docs/interfaces/_internal_.ReadableStream-1.html +0 -141
  170. package/docs/interfaces/_internal_.ReadableStream.html +0 -10
  171. package/docs/interfaces/_internal_.ReadableStreamBYOBReader.html +0 -5
  172. package/docs/interfaces/_internal_.ReadableStreamDefaultController.html +0 -5
  173. package/docs/interfaces/_internal_.ReadableStreamDefaultReadDoneResult.html +0 -3
  174. package/docs/interfaces/_internal_.ReadableStreamDefaultReadValueResult.html +0 -3
  175. package/docs/interfaces/_internal_.ReadableStreamDefaultReader.html +0 -5
  176. package/docs/interfaces/_internal_.ReadableStreamErrorCallback.html +0 -1
  177. package/docs/interfaces/_internal_.ReadableStreamGenericReader.html +0 -3
  178. package/docs/interfaces/_internal_.ReadableStreamReadDoneResult.html +0 -3
  179. package/docs/interfaces/_internal_.ReadableStreamReadValueResult.html +0 -3
  180. package/docs/interfaces/_internal_.ReadableWritablePair.html +0 -9
  181. package/docs/interfaces/_internal_.SecureContext.html +0 -2
  182. package/docs/interfaces/_internal_.SecureContextOptions.html +0 -121
  183. package/docs/interfaces/_internal_.Selection.html +0 -6
  184. package/docs/interfaces/_internal_.ServerOptions.html +0 -64
  185. package/docs/interfaces/_internal_.ServerOpts.html +0 -25
  186. package/docs/interfaces/_internal_.SharedArrayBuffer.html +0 -7
  187. package/docs/interfaces/_internal_.SharedArrayBufferConstructor.html +0 -3
  188. package/docs/interfaces/_internal_.SocketConstructorOpts.html +0 -6
  189. package/docs/interfaces/_internal_.StaticEventEmitterOptions.html +0 -15
  190. package/docs/interfaces/_internal_.StreamOptions.html +0 -9
  191. package/docs/interfaces/_internal_.StreamPipeOptions.html +0 -37
  192. package/docs/interfaces/_internal_.TLSSocketOptions.html +0 -160
  193. package/docs/interfaces/_internal_.TcpSocketConnectOpts.html +0 -19
  194. package/docs/interfaces/_internal_.TerminalInterruptResponse.html +0 -3
  195. package/docs/interfaces/_internal_.TlsOptions.html +0 -197
  196. package/docs/interfaces/_internal_.UnderlyingByteSource.html +0 -6
  197. package/docs/interfaces/_internal_.UnderlyingSink.html +0 -6
  198. package/docs/interfaces/_internal_.UnderlyingSinkAbortCallback.html +0 -1
  199. package/docs/interfaces/_internal_.UnderlyingSinkCloseCallback.html +0 -1
  200. package/docs/interfaces/_internal_.UnderlyingSinkStartCallback.html +0 -1
  201. package/docs/interfaces/_internal_.UnderlyingSinkWriteCallback.html +0 -1
  202. package/docs/interfaces/_internal_.UnderlyingSource.html +0 -5
  203. package/docs/interfaces/_internal_.UnderlyingSourceCancelCallback.html +0 -1
  204. package/docs/interfaces/_internal_.UnderlyingSourcePullCallback.html +0 -1
  205. package/docs/interfaces/_internal_.UnderlyingSourceStartCallback.html +0 -1
  206. package/docs/interfaces/_internal_.UpdateFileResponse.html +0 -6
  207. package/docs/interfaces/_internal_.UrlResponse.html +0 -3
  208. package/docs/interfaces/_internal_.Usage-1.html +0 -4
  209. package/docs/interfaces/_internal_.Usage.html +0 -4
  210. package/docs/interfaces/_internal_.UserMessage.html +0 -3
  211. package/docs/interfaces/_internal_.UserRequest.html +0 -7
  212. package/docs/interfaces/_internal_.WebSocket.AddressInfo.html +0 -4
  213. package/docs/interfaces/_internal_.WebSocket.ClientOptions.html +0 -138
  214. package/docs/interfaces/_internal_.WebSocket.CloseEvent.html +0 -6
  215. package/docs/interfaces/_internal_.WebSocket.ErrorEvent.html +0 -5
  216. package/docs/interfaces/_internal_.WebSocket.Event.html +0 -3
  217. package/docs/interfaces/_internal_.WebSocket.EventListenerOptions.html +0 -2
  218. package/docs/interfaces/_internal_.WebSocket.MessageEvent.html +0 -4
  219. package/docs/interfaces/_internal_.WebSocket.PerMessageDeflateOptions.html +0 -9
  220. package/docs/interfaces/_internal_.WebSocket.ServerOptions.html +0 -14
  221. package/docs/interfaces/_internal_.WebSocket.WebSocket.html +0 -172
  222. package/docs/interfaces/_internal_.WebSocket.WebSocketServer.html +0 -144
  223. package/docs/interfaces/_internal_.WebSocketAlias.html +0 -172
  224. package/docs/interfaces/_internal_.WritableOptions.html +0 -14
  225. package/docs/interfaces/_internal_.WritableStream-1.html +0 -8
  226. package/docs/interfaces/_internal_.WritableStream.html +0 -133
  227. package/docs/interfaces/_internal_.WritableStreamDefaultController.html +0 -6
  228. package/docs/interfaces/_internal_.WritableStreamDefaultWriter.html +0 -12
  229. package/docs/interfaces/_internal_.X509CheckOptions.html +0 -16
  230. package/docs/interfaces/_internal_.ZlibOptions.html +0 -21
  231. package/docs/interfaces/_internal_.getMatchDetail.html +0 -3
  232. package/docs/interfaces/_internal_.internal.FinishedOptions.html +0 -6
  233. package/docs/interfaces/_internal_.internal.Pipe.html +0 -5
  234. package/docs/interfaces/_internal_.internal.PipelineOptions.html +0 -3
  235. package/docs/interfaces/_internal_.internal.TransformOptions.html +0 -24
  236. package/docs/modules/_internal_.EventEmitter.html +0 -6
  237. package/docs/modules/_internal_.WebSocket.html +0 -21
  238. package/docs/modules/_internal_._node_stream_consumers_.html +0 -6
  239. package/docs/modules/_internal_._node_stream_promises_.html +0 -3
  240. package/docs/modules/_internal_.html +0 -228
  241. package/docs/modules/_internal_.internal.finished.html +0 -2
  242. package/docs/modules/_internal_.internal.html +0 -36
  243. package/docs/modules/_internal_.internal.pipeline.html +0 -2
  244. package/docs/modules.html +0 -3
  245. package/docs/types/_internal_.AnyRest.html +0 -1
  246. package/docs/types/_internal_.Args.html +0 -1
  247. package/docs/types/_internal_.ArrayBufferLike.html +0 -1
  248. package/docs/types/_internal_.ArrayBufferView-1.html +0 -1
  249. package/docs/types/_internal_.BinaryLike.html +0 -1
  250. package/docs/types/_internal_.BufferEncoding.html +0 -1
  251. package/docs/types/_internal_.BufferLike.html +0 -1
  252. package/docs/types/_internal_.ComposeFnParam.html +0 -1
  253. package/docs/types/_internal_.DefaultEventMap.html +0 -1
  254. package/docs/types/_internal_.EventMap.html +0 -1
  255. package/docs/types/_internal_.InstanceType.html +0 -2
  256. package/docs/types/_internal_.IteratorResult.html +0 -1
  257. package/docs/types/_internal_.Key.html +0 -1
  258. package/docs/types/_internal_.Key2.html +0 -1
  259. package/docs/types/_internal_.KeyFormat.html +0 -1
  260. package/docs/types/_internal_.KeyObjectType.html +0 -1
  261. package/docs/types/_internal_.KeyType-1.html +0 -1
  262. package/docs/types/_internal_.KeyType.html +0 -1
  263. package/docs/types/_internal_.KeyUsage.html +0 -1
  264. package/docs/types/_internal_.Listener.html +0 -1
  265. package/docs/types/_internal_.LookupFunction.html +0 -1
  266. package/docs/types/_internal_.OutgoingHttpHeader.html +0 -1
  267. package/docs/types/_internal_.Partial.html +0 -2
  268. package/docs/types/_internal_.Pick.html +0 -2
  269. package/docs/types/_internal_.PropertyKey.html +0 -1
  270. package/docs/types/_internal_.ReadableStreamController.html +0 -1
  271. package/docs/types/_internal_.ReadableStreamDefaultReadResult.html +0 -1
  272. package/docs/types/_internal_.ReadableStreamReadResult.html +0 -1
  273. package/docs/types/_internal_.Record.html +0 -2
  274. package/docs/types/_internal_.RequestListener.html +0 -1
  275. package/docs/types/_internal_.SecureVersion.html +0 -1
  276. package/docs/types/_internal_.ServerOptions-1.html +0 -1
  277. package/docs/types/_internal_.SocketConnectOpts.html +0 -1
  278. package/docs/types/_internal_.SocketReadyState.html +0 -1
  279. package/docs/types/_internal_.TypedArray.html +0 -1
  280. package/docs/types/_internal_.WebSocket.CertMeta.html +0 -2
  281. package/docs/types/_internal_.WebSocket.Data.html +0 -2
  282. package/docs/types/_internal_.WebSocket.RawData.html +0 -2
  283. package/docs/types/_internal_.WebSocket.VerifyClientCallbackAsync.html +0 -4
  284. package/docs/types/_internal_.WebSocket.VerifyClientCallbackSync.html +0 -4
  285. package/docs/types/_internal_.WithImplicitCoercion.html +0 -1
  286. package/docs/types/_internal_.internal.PipelineCallback.html +0 -1
  287. package/docs/types/_internal_.internal.PipelineDestination.html +0 -1
  288. package/docs/types/_internal_.internal.PipelineDestinationIterableFunction.html +0 -1
  289. package/docs/types/_internal_.internal.PipelineDestinationPromiseFunction.html +0 -1
  290. package/docs/types/_internal_.internal.PipelinePromise.html +0 -1
  291. package/docs/types/_internal_.internal.PipelineSource.html +0 -1
  292. package/docs/types/_internal_.internal.PipelineSourceFunction.html +0 -1
  293. package/docs/types/_internal_.internal.PipelineTransform.html +0 -1
  294. package/docs/types/_internal_.internal.PipelineTransformSource.html +0 -1
  295. package/docs/types/_internal_.internal.TransformCallback.html +0 -1
  296. package/docs/variables/_internal_.Buffer-1.html +0 -1
  297. package/docs/variables/_internal_.Error-1.html +0 -1
  298. package/docs/variables/_internal_.Object-1.html +0 -2
  299. package/docs/variables/_internal_.ReadableByteStreamController-1.html +0 -1
  300. package/docs/variables/_internal_.ReadableStream-2.html +0 -1
  301. package/docs/variables/_internal_.ReadableStreamBYOBReader-1.html +0 -1
  302. package/docs/variables/_internal_.ReadableStreamDefaultController-1.html +0 -1
  303. package/docs/variables/_internal_.ReadableStreamDefaultReader-1.html +0 -1
  304. package/docs/variables/_internal_.SharedArrayBuffer-1.html +0 -1
  305. package/docs/variables/_internal_.WebSocket.WebSocket-1.html +0 -1
  306. package/docs/variables/_internal_.WebSocket.WebSocketServer-1.html +0 -1
  307. package/docs/variables/_internal_.WebSocketAlias-1.html +0 -1
  308. package/docs/variables/_internal_.WritableStream-2.html +0 -1
  309. package/docs/variables/_internal_.WritableStreamDefaultController-1.html +0 -1
  310. package/docs/variables/_internal_.WritableStreamDefaultWriter-1.html +0 -1
  311. package/docs/variables/_internal_.internal.consumers.html +0 -1
  312. package/docs/variables/_internal_.internal.promises.html +0 -1
  313. package/docs/variables/default.html +0 -1
  314. package/script/gen.js +0 -27
  315. package/src/index.ts +0 -108
  316. package/src/modules/agent.ts +0 -120
  317. package/src/modules/agentlib/agent.ts +0 -417
  318. package/src/modules/agentlib/systemprompt.ts +0 -55
  319. package/src/modules/agentlib/taskInstruction.ts +0 -105
  320. package/src/modules/agentlib/usermessage.ts +0 -188
  321. package/src/modules/browser.ts +0 -352
  322. package/src/modules/chat.ts +0 -229
  323. package/src/modules/codeparsers.ts +0 -28
  324. package/src/modules/codeutils.ts +0 -182
  325. package/src/modules/crawler.ts +0 -121
  326. package/src/modules/dbmemory.ts +0 -52
  327. package/src/modules/debug.ts +0 -68
  328. package/src/modules/docutils.ts +0 -18
  329. package/src/modules/fs.ts +0 -263
  330. package/src/modules/git.ts +0 -237
  331. package/src/modules/history.ts +0 -82
  332. package/src/modules/knowledge.ts +0 -5
  333. package/src/modules/llm.ts +0 -36
  334. package/src/modules/outputparsers.ts +0 -30
  335. package/src/modules/project.ts +0 -68
  336. package/src/modules/rag.ts +0 -27
  337. package/src/modules/search.ts +0 -32
  338. package/src/modules/state.ts +0 -115
  339. package/src/modules/task.ts +0 -73
  340. package/src/modules/terminal.ts +0 -113
  341. package/src/modules/tokenizer.ts +0 -56
  342. package/src/modules/toolBox.ts +0 -1384
  343. package/src/modules/tools.ts +0 -254
  344. package/src/modules/vectordb.ts +0 -102
  345. package/src/modules/websocket.ts +0 -97
  346. package/src/utils/editFile.ts +0 -30
  347. package/src/utils.ts +0 -5
  348. package/tests/chat.test.js +0 -0
  349. package/tests/fs.test.js +0 -89
  350. package/tests/index.test.js +0 -4
  351. package/tsconfig.json +0 -122
  352. package/utils.d.ts +0 -5
  353. package/webpack.config.js +0 -25
  354. /package/{modules → dist}/agentlib/agent.d.ts +0 -0
  355. /package/{modules → dist}/agentlib/systemprompt.d.ts +0 -0
  356. /package/{modules → dist}/agentlib/systemprompt.js +0 -0
  357. /package/{modules → dist}/agentlib/taskInstruction.d.ts +0 -0
  358. /package/{modules → dist}/agentlib/taskInstruction.js +0 -0
  359. /package/{modules → dist}/agentlib/usermessage.d.ts +0 -0
  360. /package/{index.d.ts → dist/index.d.ts} +0 -0
  361. /package/{index.js → dist/index.js} +0 -0
  362. /package/{modules → dist/modules}/agent.d.ts +0 -0
  363. /package/{modules → dist/modules}/agent.js +0 -0
  364. /package/{modules → dist/modules}/browser.d.ts +0 -0
  365. /package/{modules → dist/modules}/browser.js +0 -0
  366. /package/{modules → dist/modules}/chat.d.ts +0 -0
  367. /package/{modules → dist/modules}/chat.js +0 -0
  368. /package/{modules → dist/modules}/codeparsers.d.ts +0 -0
  369. /package/{modules → dist/modules}/codeparsers.js +0 -0
  370. /package/{modules → dist/modules}/codeutils.d.ts +0 -0
  371. /package/{modules → dist/modules}/codeutils.js +0 -0
  372. /package/{modules → dist/modules}/crawler.d.ts +0 -0
  373. /package/{modules → dist/modules}/crawler.js +0 -0
  374. /package/{modules → dist/modules}/dbmemory.d.ts +0 -0
  375. /package/{modules → dist/modules}/dbmemory.js +0 -0
  376. /package/{modules → dist/modules}/debug.d.ts +0 -0
  377. /package/{modules → dist/modules}/debug.js +0 -0
  378. /package/{modules → dist/modules}/docutils.d.ts +0 -0
  379. /package/{modules → dist/modules}/docutils.js +0 -0
  380. /package/{modules → dist/modules}/fs.d.ts +0 -0
  381. /package/{modules → dist/modules}/fs.js +0 -0
  382. /package/{modules → dist/modules}/git.d.ts +0 -0
  383. /package/{modules → dist/modules}/git.js +0 -0
  384. /package/{modules → dist/modules}/history.d.ts +0 -0
  385. /package/{modules → dist/modules}/history.js +0 -0
  386. /package/{modules → dist/modules}/knowledge.d.ts +0 -0
  387. /package/{modules → dist/modules}/knowledge.js +0 -0
  388. /package/{modules → dist/modules}/llm.d.ts +0 -0
  389. /package/{modules → dist/modules}/llm.js +0 -0
  390. /package/{modules → dist/modules}/outputparsers.d.ts +0 -0
  391. /package/{modules → dist/modules}/outputparsers.js +0 -0
  392. /package/{modules → dist/modules}/project.d.ts +0 -0
  393. /package/{modules → dist/modules}/project.js +0 -0
  394. /package/{modules → dist/modules}/rag.d.ts +0 -0
  395. /package/{modules → dist/modules}/rag.js +0 -0
  396. /package/{modules → dist/modules}/search.d.ts +0 -0
  397. /package/{modules → dist/modules}/search.js +0 -0
  398. /package/{modules → dist/modules}/state.d.ts +0 -0
  399. /package/{modules → dist/modules}/state.js +0 -0
  400. /package/{modules → dist/modules}/task.d.ts +0 -0
  401. /package/{modules → dist/modules}/task.js +0 -0
  402. /package/{modules → dist/modules}/terminal.d.ts +0 -0
  403. /package/{modules → dist/modules}/terminal.js +0 -0
  404. /package/{modules → dist/modules}/tokenizer.d.ts +0 -0
  405. /package/{modules → dist/modules}/tokenizer.js +0 -0
  406. /package/{modules → dist/modules}/toolBox.d.ts +0 -0
  407. /package/{modules → dist/modules}/toolBox.js +0 -0
  408. /package/{modules → dist/modules}/tools.d.ts +0 -0
  409. /package/{modules → dist/modules}/tools.js +0 -0
  410. /package/{modules → dist/modules}/vectordb.d.ts +0 -0
  411. /package/{modules → dist/modules}/vectordb.js +0 -0
  412. /package/{modules → dist/modules}/websocket.d.ts +0 -0
  413. /package/{modules → dist/modules}/websocket.js +0 -0
  414. /package/{utils → dist/utils}/editFile.d.ts +0 -0
  415. /package/{utils → dist/utils}/editFile.js +0 -0
@@ -1,661 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>IncomingMessage | @codebolt/codeboltjs</title><meta name="description" content="Documentation for @codebolt/codeboltjs"/><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></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" data-base=".."><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"><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">@codebolt/codeboltjs</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"><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">@codebolt/codeboltjs</a></li><li><a href="../modules/_internal_.html">&lt;internal&gt;</a></li><li><a href="_internal_.IncomingMessage.html">IncomingMessage</a></li></ul><h1>Class IncomingMessage</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>An <code>IncomingMessage</code> object is created by <a href="_internal_.Server.html" class="tsd-kind-class">Server</a> or <a href="_internal_.ClientRequest.html" class="tsd-kind-class">ClientRequest</a> and passed as the first argument to the <code>&#39;request&#39;</code> and <code>&#39;response&#39;</code> event respectively. It may be used to
2
- access response
3
- status, headers, and data.</p>
4
- <p>Different from its <code>socket</code> value which is a subclass of <code>stream.Duplex</code>, the <code>IncomingMessage</code> itself extends <code>stream.Readable</code> and is created separately to
5
- parse and emit the incoming HTTP headers and payload, as the underlying socket
6
- may be reused multiple times in case of keep-alive.</p>
7
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.17</p>
8
- </div></section><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a class="link" href="../hierarchy.html#<internal>.IncomingMessage">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><ul class="tsd-hierarchy"><li><span class="target">IncomingMessage</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1135</li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-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"><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">Constructors</h3><div class="tsd-index-list"><a href="_internal_.IncomingMessage.html#constructor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
9
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="_internal_.IncomingMessage.html#aborted" class="tsd-index-link deprecated tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>aborted</span></a>
10
- <a href="_internal_.IncomingMessage.html#closed" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>closed</span></a>
11
- <a href="_internal_.IncomingMessage.html#complete" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>complete</span></a>
12
- <a href="_internal_.IncomingMessage.html#connection" class="tsd-index-link deprecated tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connection</span></a>
13
- <a href="_internal_.IncomingMessage.html#destroyed" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>destroyed</span></a>
14
- <a href="_internal_.IncomingMessage.html#errored" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>errored</span></a>
15
- <a href="_internal_.IncomingMessage.html#headers" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>headers</span></a>
16
- <a href="_internal_.IncomingMessage.html#headersDistinct" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>headers<wbr/>Distinct</span></a>
17
- <a href="_internal_.IncomingMessage.html#httpVersion" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version</span></a>
18
- <a href="_internal_.IncomingMessage.html#httpVersionMajor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version<wbr/>Major</span></a>
19
- <a href="_internal_.IncomingMessage.html#httpVersionMinor" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version<wbr/>Minor</span></a>
20
- <a href="_internal_.IncomingMessage.html#method" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>method?</span></a>
21
- <a href="_internal_.IncomingMessage.html#rawHeaders" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>raw<wbr/>Headers</span></a>
22
- <a href="_internal_.IncomingMessage.html#rawTrailers" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>raw<wbr/>Trailers</span></a>
23
- <a href="_internal_.IncomingMessage.html#readable" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable</span></a>
24
- <a href="_internal_.IncomingMessage.html#readableAborted" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Aborted</span></a>
25
- <a href="_internal_.IncomingMessage.html#readableDidRead" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Did<wbr/>Read</span></a>
26
- <a href="_internal_.IncomingMessage.html#readableEncoding" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Encoding</span></a>
27
- <a href="_internal_.IncomingMessage.html#readableEnded" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Ended</span></a>
28
- <a href="_internal_.IncomingMessage.html#readableFlowing" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Flowing</span></a>
29
- <a href="_internal_.IncomingMessage.html#readableHighWaterMark" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>High<wbr/>Water<wbr/>Mark</span></a>
30
- <a href="_internal_.IncomingMessage.html#readableLength" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Length</span></a>
31
- <a href="_internal_.IncomingMessage.html#readableObjectMode" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Object<wbr/>Mode</span></a>
32
- <a href="_internal_.IncomingMessage.html#socket" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>socket</span></a>
33
- <a href="_internal_.IncomingMessage.html#statusCode" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>status<wbr/>Code?</span></a>
34
- <a href="_internal_.IncomingMessage.html#statusMessage" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>status<wbr/>Message?</span></a>
35
- <a href="_internal_.IncomingMessage.html#trailers" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trailers</span></a>
36
- <a href="_internal_.IncomingMessage.html#trailersDistinct" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trailers<wbr/>Distinct</span></a>
37
- <a href="_internal_.IncomingMessage.html#url" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>url?</span></a>
38
- <a href="_internal_.IncomingMessage.html#captureRejectionSymbol" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejection<wbr/>Symbol</span></a>
39
- <a href="_internal_.IncomingMessage.html#captureRejections" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejections</span></a>
40
- <a href="_internal_.IncomingMessage.html#defaultMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>default<wbr/>Max<wbr/>Listeners</span></a>
41
- <a href="_internal_.IncomingMessage.html#errorMonitor" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Monitor</span></a>
42
- </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="_internal_.IncomingMessage.html#_asyncDispose_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Dispose]</span></a>
43
- <a href="_internal_.IncomingMessage.html#_asyncIterator_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Iterator]</span></a>
44
- <a href="_internal_.IncomingMessage.html#_captureRejectionSymbol_" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]?</span></a>
45
- <a href="_internal_.IncomingMessage.html#_construct" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_construct?</span></a>
46
- <a href="_internal_.IncomingMessage.html#_destroy" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_destroy</span></a>
47
- <a href="_internal_.IncomingMessage.html#_read" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_read</span></a>
48
- <a href="_internal_.IncomingMessage.html#addListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a>
49
- <a href="_internal_.IncomingMessage.html#asIndexedPairs" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>as<wbr/>Indexed<wbr/>Pairs</span></a>
50
- <a href="_internal_.IncomingMessage.html#compose" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compose</span></a>
51
- <a href="_internal_.IncomingMessage.html#destroy" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a>
52
- <a href="_internal_.IncomingMessage.html#drop" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>drop</span></a>
53
- <a href="_internal_.IncomingMessage.html#emit" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>emit</span></a>
54
- <a href="_internal_.IncomingMessage.html#eventNames" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a>
55
- <a href="_internal_.IncomingMessage.html#every" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>every</span></a>
56
- <a href="_internal_.IncomingMessage.html#filter" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>filter</span></a>
57
- <a href="_internal_.IncomingMessage.html#find" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find</span></a>
58
- <a href="_internal_.IncomingMessage.html#flatMap" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flat<wbr/>Map</span></a>
59
- <a href="_internal_.IncomingMessage.html#forEach" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
60
- <a href="_internal_.IncomingMessage.html#getMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a>
61
- <a href="_internal_.IncomingMessage.html#isPaused" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Paused</span></a>
62
- <a href="_internal_.IncomingMessage.html#iterator" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>iterator</span></a>
63
- <a href="_internal_.IncomingMessage.html#listenerCount" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a>
64
- <a href="_internal_.IncomingMessage.html#listeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a>
65
- <a href="_internal_.IncomingMessage.html#map" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map</span></a>
66
- <a href="_internal_.IncomingMessage.html#off" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a>
67
- <a href="_internal_.IncomingMessage.html#on" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a>
68
- <a href="_internal_.IncomingMessage.html#once" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a>
69
- <a href="_internal_.IncomingMessage.html#pause" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause</span></a>
70
- <a href="_internal_.IncomingMessage.html#pipe" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pipe</span></a>
71
- <a href="_internal_.IncomingMessage.html#prependListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Listener</span></a>
72
- <a href="_internal_.IncomingMessage.html#prependOnceListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a>
73
- <a href="_internal_.IncomingMessage.html#push" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>push</span></a>
74
- <a href="_internal_.IncomingMessage.html#rawListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a>
75
- <a href="_internal_.IncomingMessage.html#read" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read</span></a>
76
- <a href="_internal_.IncomingMessage.html#reduce" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce</span></a>
77
- <a href="_internal_.IncomingMessage.html#removeAllListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>All<wbr/>Listeners</span></a>
78
- <a href="_internal_.IncomingMessage.html#removeListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a>
79
- <a href="_internal_.IncomingMessage.html#resume" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume</span></a>
80
- <a href="_internal_.IncomingMessage.html#setEncoding" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Encoding</span></a>
81
- <a href="_internal_.IncomingMessage.html#setMaxListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
82
- <a href="_internal_.IncomingMessage.html#setTimeout" class="tsd-index-link tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Timeout</span></a>
83
- <a href="_internal_.IncomingMessage.html#some" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>some</span></a>
84
- <a href="_internal_.IncomingMessage.html#take" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take</span></a>
85
- <a href="_internal_.IncomingMessage.html#toArray" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Array</span></a>
86
- <a href="_internal_.IncomingMessage.html#unpipe" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unpipe</span></a>
87
- <a href="_internal_.IncomingMessage.html#unshift" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unshift</span></a>
88
- <a href="_internal_.IncomingMessage.html#wrap" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wrap</span></a>
89
- <a href="_internal_.IncomingMessage.html#addAbortListener" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Abort<wbr/>Listener</span></a>
90
- <a href="_internal_.IncomingMessage.html#from" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from</span></a>
91
- <a href="_internal_.IncomingMessage.html#fromWeb" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Web</span></a>
92
- <a href="_internal_.IncomingMessage.html#getEventListeners" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Event<wbr/>Listeners</span></a>
93
- <a href="_internal_.IncomingMessage.html#getMaxListeners-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a>
94
- <a href="_internal_.IncomingMessage.html#isDisturbed" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Disturbed</span></a>
95
- <a href="_internal_.IncomingMessage.html#listenerCount-2" class="tsd-index-link deprecated tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a>
96
- <a href="_internal_.IncomingMessage.html#on-9" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a>
97
- <a href="_internal_.IncomingMessage.html#once-9" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a>
98
- <a href="_internal_.IncomingMessage.html#setMaxListeners-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a>
99
- <a href="_internal_.IncomingMessage.html#toWeb" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Web</span></a>
100
- </div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-is-external"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_IncomingMessage" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Incoming<wbr/>Message</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">socket</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.IncomingMessage.html" class="tsd-signature-type tsd-kind-class">IncomingMessage</a><a href="#constructor.new_IncomingMessage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">socket</span>: <a href="_internal_.Socket.html" class="tsd-signature-type tsd-kind-class">Socket</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.IncomingMessage.html" class="tsd-signature-type tsd-kind-class">IncomingMessage</a></h4><aside class="tsd-sources"><p>Overrides <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#constructor">constructor</a></p><ul><li>Defined in node_modules/@types/node/http.d.ts:1136</li></ul></aside></li></ul></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-is-external"><a id="aborted" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="deprecated">aborted</span><a href="#aborted" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">aborted</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>The <code>message.aborted</code> property will be <code>true</code> if the request has
101
- been aborted.</p>
102
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v10.1.0</p>
103
- <h4>Deprecated</h4><p>Since v17.0.0,v16.12.0 - Check <code>message.destroyed</code> from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.</p>
104
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1143</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="closed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>closed</span><a href="#closed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">closed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> after <code>&#39;close&#39;</code> has been emitted.</p>
105
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.0.0</p>
106
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#closed">closed</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:126</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="complete" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>complete</span><a href="#complete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">complete</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>The <code>message.complete</code> property will be <code>true</code> if a complete HTTP message has
107
- been received and successfully parsed.</p>
108
- <p>This property is particularly useful as a means of determining if a client or
109
- server fully transmitted a message before a connection was terminated:</p>
110
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">req</span><span class="hl-1"> = </span><span class="hl-7">http</span><span class="hl-1">.</span><span class="hl-0">request</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-7">host:</span><span class="hl-1"> </span><span class="hl-2">&#39;127.0.0.1&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">port:</span><span class="hl-1"> </span><span class="hl-9">8080</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">method:</span><span class="hl-1"> </span><span class="hl-2">&#39;POST&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">}, (</span><span class="hl-7">res</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">res</span><span class="hl-1">.</span><span class="hl-0">resume</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">res</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (!</span><span class="hl-7">res</span><span class="hl-1">.</span><span class="hl-7">complete</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;The connection was terminated while the message was still being sent&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span><br/><span class="hl-1">});</span>
111
- </code><button>Copy</button></pre>
112
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
113
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1178</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="connection" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="deprecated">connection</span><a href="#connection" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">connection</span><span class="tsd-signature-symbol">:</span> <a href="_internal_.Socket.html" class="tsd-signature-type tsd-kind-class">Socket</a></div><div class="tsd-comment tsd-typography"><p>Alias for <code>message.socket</code>.</p>
114
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
115
- <h4>Deprecated</h4><p>Since v16.0.0 - Use <code>socket</code>.</p>
116
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1184</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="destroyed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroyed</span><a href="#destroyed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">destroyed</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> after <code>readable.destroy()</code> has been called.</p>
117
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v8.0.0</p>
118
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#destroyed">destroyed</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:121</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="errored" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>errored</span><a href="#errored" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">errored</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></div><div class="tsd-comment tsd-typography"><p>Returns error if the stream has been destroyed with an error.</p>
119
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.0.0</p>
120
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#errored">errored</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:131</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="headers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>headers</span><a href="#headers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">headers</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/_internal_.IncomingHttpHeaders.html" class="tsd-signature-type tsd-kind-interface">IncomingHttpHeaders</a></div><div class="tsd-comment tsd-typography"><p>The request/response headers object.</p>
121
- <p>Key-value pairs of header names and values. Header names are lower-cased.</p>
122
- <pre><code class="language-js"><span class="hl-5">// Prints something like:</span><br/><span class="hl-5">//</span><br/><span class="hl-5">// { &#39;user-agent&#39;: &#39;curl/7.22.0&#39;,</span><br/><span class="hl-5">// host: &#39;127.0.0.1:8000&#39;,</span><br/><span class="hl-5">// accept: &#39;*&#39; }</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">request</span><span class="hl-1">.</span><span class="hl-7">headers</span><span class="hl-1">);</span>
123
- </code><button>Copy</button></pre>
124
- <p>Duplicates in raw headers are handled in the following ways, depending on the
125
- header name:</p>
126
- <ul>
127
- <li>Duplicates of <code>age</code>, <code>authorization</code>, <code>content-length</code>, <code>content-type</code>, <code>etag</code>, <code>expires</code>, <code>from</code>, <code>host</code>, <code>if-modified-since</code>, <code>if-unmodified-since</code>, <code>last-modified</code>, <code>location</code>,
128
- <code>max-forwards</code>, <code>proxy-authorization</code>, <code>referer</code>, <code>retry-after</code>, <code>server</code>, or <code>user-agent</code> are discarded.
129
- To allow duplicate values of the headers listed above to be joined,
130
- use the option <code>joinDuplicateHeaders</code> in request and createServer. See RFC 9110 Section 5.3 for more
131
- information.</li>
132
- <li><code>set-cookie</code> is always an array. Duplicates are added to the array.</li>
133
- <li>For duplicate <code>cookie</code> headers, the values are joined together with <code>; </code>.</li>
134
- <li>For all other headers, the values are joined together with <code>, </code>.</li>
135
- </ul>
136
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.5</p>
137
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1224</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="headersDistinct" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>headers<wbr/>Distinct</span><a href="#headersDistinct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">headers<wbr/>Distinct</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/_internal_.Dict.html" class="tsd-signature-type tsd-kind-interface">Dict</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Similar to <code>message.headers</code>, but there is no join logic and the values are
138
- always arrays of strings, even for headers received just once.</p>
139
- <pre><code class="language-js"><span class="hl-5">// Prints something like:</span><br/><span class="hl-5">//</span><br/><span class="hl-5">// { &#39;user-agent&#39;: [&#39;curl/7.22.0&#39;],</span><br/><span class="hl-5">// host: [&#39;127.0.0.1:8000&#39;],</span><br/><span class="hl-5">// accept: [&#39;*&#39;] }</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">request</span><span class="hl-1">.</span><span class="hl-7">headersDistinct</span><span class="hl-1">);</span>
140
- </code><button>Copy</button></pre>
141
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.3.0, v16.17.0</p>
142
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1239</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="httpVersion" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>http<wbr/>Version</span><a href="#httpVersion" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">http<wbr/>Version</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>In case of server request, the HTTP version sent by the client. In the case of
143
- client response, the HTTP version of the connected-to server.
144
- Probably either <code>&#39;1.1&#39;</code> or <code>&#39;1.0&#39;</code>.</p>
145
- <p>Also <code>message.httpVersionMajor</code> is the first integer and <code>message.httpVersionMinor</code> is the second.</p>
146
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.1</p>
147
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1152</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="httpVersionMajor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>http<wbr/>Version<wbr/>Major</span><a href="#httpVersionMajor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">http<wbr/>Version<wbr/>Major</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1153</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="httpVersionMinor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>http<wbr/>Version<wbr/>Minor</span><a href="#httpVersionMinor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">http<wbr/>Version<wbr/>Minor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1154</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="method" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>method</span><a href="#method" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">method</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p><strong>Only valid for request obtained from <a href="_internal_.Server.html" class="tsd-kind-class">Server</a>.</strong></p>
148
- <p>The request method as a string. Read only. Examples: <code>&#39;GET&#39;</code>, <code>&#39;DELETE&#39;</code>.</p>
149
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.1</p>
150
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1294</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="rawHeaders" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Headers</span><a href="#rawHeaders" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">raw<wbr/>Headers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>The raw request/response headers list exactly as they were received.</p>
151
- <p>The keys and values are in the same list. It is <em>not</em> a
152
- list of tuples. So, the even-numbered offsets are key values, and the
153
- odd-numbered offsets are the associated values.</p>
154
- <p>Header names are not lowercased, and duplicates are not merged.</p>
155
- <pre><code class="language-js"><span class="hl-5">// Prints something like:</span><br/><span class="hl-5">//</span><br/><span class="hl-5">// [ &#39;user-agent&#39;,</span><br/><span class="hl-5">// &#39;this is invalid because there can be only one&#39;,</span><br/><span class="hl-5">// &#39;User-Agent&#39;,</span><br/><span class="hl-5">// &#39;curl/7.22.0&#39;,</span><br/><span class="hl-5">// &#39;Host&#39;,</span><br/><span class="hl-5">// &#39;127.0.0.1:8000&#39;,</span><br/><span class="hl-5">// &#39;ACCEPT&#39;,</span><br/><span class="hl-5">// &#39;*&#39; ]</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">request</span><span class="hl-1">.</span><span class="hl-7">rawHeaders</span><span class="hl-1">);</span>
156
- </code><button>Copy</button></pre>
157
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.6</p>
158
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1264</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="rawTrailers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>raw<wbr/>Trailers</span><a href="#rawTrailers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">raw<wbr/>Trailers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>The raw request/response trailer keys and values exactly as they were
159
- received. Only populated at the <code>&#39;end&#39;</code> event.</p>
160
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.6</p>
161
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1282</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readable" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>readable</span><a href="#readable" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Is <code>true</code> if it is safe to call <a href="_internal_.ReadableBase.html#read" class="tsd-kind-method">read</a>, which means
162
- the stream has not been destroyed or emitted <code>&#39;error&#39;</code> or <code>&#39;end&#39;</code>.</p>
163
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.4.0</p>
164
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readable">readable</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:77</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableAborted" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <code class="tsd-tag ts-flagExperimental">Experimental</code> <span>readable<wbr/>Aborted</span><a href="#readableAborted" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Aborted</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Returns whether the stream was destroyed or errored before emitting <code>&#39;end&#39;</code>.</p>
165
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.8.0</p>
166
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableAborted">readableAborted</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:71</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableDidRead" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <code class="tsd-tag ts-flagExperimental">Experimental</code> <span>readable<wbr/>Did<wbr/>Read</span><a href="#readableDidRead" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Did<wbr/>Read</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Returns whether <code>&#39;data&#39;</code> has been emitted.</p>
167
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.7.0, v14.18.0</p>
168
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableDidRead">readableDidRead</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:83</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Encoding</span><a href="#readableEncoding" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Encoding</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></div><div class="tsd-comment tsd-typography"><p>Getter for the property <code>encoding</code> of a given <code>Readable</code> stream. The <code>encoding</code> property can be set using the <a href="_internal_.ReadableBase.html#setEncoding" class="tsd-kind-method">setEncoding</a> method.</p>
169
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.7.0</p>
170
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableEncoding">readableEncoding</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:88</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableEnded" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Ended</span><a href="#readableEnded" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Ended</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Becomes <code>true</code> when <a href="https://nodejs.org/docs/latest-v20.x/api/stream.html#event-end"><code>&#39;end&#39;</code></a> event is emitted.</p>
171
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.9.0</p>
172
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableEnded">readableEnded</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:93</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableFlowing" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Flowing</span><a href="#readableFlowing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Flowing</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>This property reflects the current state of a <code>Readable</code> stream as described
173
- in the <a href="https://nodejs.org/docs/latest-v20.x/api/stream.html#three-states">Three states</a> section.</p>
174
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
175
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableFlowing">readableFlowing</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:99</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableHighWaterMark" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>High<wbr/>Water<wbr/>Mark</span><a href="#readableHighWaterMark" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>High<wbr/>Water<wbr/>Mark</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Returns the value of <code>highWaterMark</code> passed when creating this <code>Readable</code>.</p>
176
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.3.0</p>
177
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableHighWaterMark">readableHighWaterMark</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:104</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableLength" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Length</span><a href="#readableLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>This property contains the number of bytes (or objects) in the queue
178
- ready to be read. The value provides introspection data regarding
179
- the status of the <code>highWaterMark</code>.</p>
180
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v9.4.0</p>
181
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableLength">readableLength</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:111</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="readableObjectMode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>readable<wbr/>Object<wbr/>Mode</span><a href="#readableObjectMode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">readable<wbr/>Object<wbr/>Mode</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Getter for the property <code>objectMode</code> of a given <code>Readable</code> stream.</p>
182
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.3.0</p>
183
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#readableObjectMode">readableObjectMode</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:116</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="socket" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>socket</span><a href="#socket" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">socket</span><span class="tsd-signature-symbol">:</span> <a href="_internal_.Socket.html" class="tsd-signature-type tsd-kind-class">Socket</a></div><div class="tsd-comment tsd-typography"><p>The <code>net.Socket</code> object associated with the connection.</p>
184
- <p>With HTTPS support, use <code>request.socket.getPeerCertificate()</code> to obtain the
185
- client&#39;s authentication details.</p>
186
- <p>This property is guaranteed to be an instance of the <code>net.Socket</code> class,
187
- a subclass of <code>stream.Duplex</code>, unless the user specified a socket
188
- type other than <code>net.Socket</code> or internally nulled.</p>
189
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
190
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1196</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="statusCode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>status<wbr/>Code</span><a href="#statusCode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Code</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p><strong>Only valid for response obtained from <a href="_internal_.ClientRequest.html" class="tsd-kind-class">ClientRequest</a>.</strong></p>
191
- <p>The 3-digit HTTP response status code. E.G. <code>404</code>.</p>
192
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.1</p>
193
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1344</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="statusMessage" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>status<wbr/>Message</span><a href="#statusMessage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">status<wbr/>Message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p><strong>Only valid for response obtained from <a href="_internal_.ClientRequest.html" class="tsd-kind-class">ClientRequest</a>.</strong></p>
194
- <p>The HTTP response status message (reason phrase). E.G. <code>OK</code> or <code>Internal Server Error</code>.</p>
195
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.10</p>
196
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1351</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="trailers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>trailers</span><a href="#trailers" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">trailers</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/_internal_.Dict.html" class="tsd-signature-type tsd-kind-interface">Dict</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>The request/response trailers object. Only populated at the <code>&#39;end&#39;</code> event.</p>
197
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
198
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1269</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="trailersDistinct" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>trailers<wbr/>Distinct</span><a href="#trailersDistinct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">trailers<wbr/>Distinct</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/_internal_.Dict.html" class="tsd-signature-type tsd-kind-interface">Dict</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Similar to <code>message.trailers</code>, but there is no join logic and the values are
199
- always arrays of strings, even for headers received just once.
200
- Only populated at the <code>&#39;end&#39;</code> event.</p>
201
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v18.3.0, v16.17.0</p>
202
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1276</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-external"><a id="url" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>url</span><a href="#url" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">url</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p><strong>Only valid for request obtained from <a href="_internal_.Server.html" class="tsd-kind-class">Server</a>.</strong></p>
203
- <p>Request URL string. This contains only the URL that is present in the actual
204
- HTTP request. Take the following request:</p>
205
- <pre><code class="language-http"><span class="hl-6">GET</span><span class="hl-1"> /status?name=ryan </span><span class="hl-3">HTTP</span><span class="hl-1">/</span><span class="hl-9">1.1</span><br/><span class="hl-13">Accept</span><span class="hl-3">:</span><span class="hl-1"> </span><span class="hl-2">text/plain</span>
206
- </code><button>Copy</button></pre>
207
- <p>To parse the URL into its parts:</p>
208
- <pre><code class="language-js"><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">URL</span><span class="hl-1">(</span><span class="hl-2">`http://</span><span class="hl-3">${</span><span class="hl-7">process</span><span class="hl-10">.</span><span class="hl-7">env</span><span class="hl-10">.</span><span class="hl-4">HOST</span><span class="hl-10"> </span><span class="hl-1">??</span><span class="hl-10"> </span><span class="hl-2">&#39;localhost&#39;</span><span class="hl-3">}${</span><span class="hl-7">request</span><span class="hl-10">.</span><span class="hl-7">url</span><span class="hl-3">}</span><span class="hl-2">`</span><span class="hl-1">);</span>
209
- </code><button>Copy</button></pre>
210
- <p>When <code>request.url</code> is <code>&#39;/status?name=ryan&#39;</code> and <code>process.env.HOST</code> is undefined:</p>
211
- <pre><code class="language-console"><span class="hl-1">$ node</span><br/><span class="hl-1">&gt; new URL(</span><span class="hl-2">`</span><span class="hl-0">http://$</span><span class="hl-2">{process.env.HOST ?? &#39;localhost&#39;}${</span><span class="hl-7">request</span><span class="hl-2">.</span><span class="hl-7">url</span><span class="hl-2">}`</span><span class="hl-1">);</span><br/><span class="hl-1">URL {</span><br/><span class="hl-1"> href: &#39;http://localhost/status?name=ryan&#39;,</span><br/><span class="hl-1"> origin: &#39;http://localhost&#39;,</span><br/><span class="hl-1"> protocol: &#39;http:&#39;,</span><br/><span class="hl-1"> username: &#39;&#39;,</span><br/><span class="hl-1"> password: &#39;&#39;,</span><br/><span class="hl-1"> host: &#39;localhost&#39;,</span><br/><span class="hl-1"> hostname: &#39;localhost&#39;,</span><br/><span class="hl-1"> port: &#39;&#39;,</span><br/><span class="hl-1"> pathname: &#39;/status&#39;,</span><br/><span class="hl-1"> search: &#39;?name=ryan&#39;,</span><br/><span class="hl-1"> searchParams: URLSearchParams { &#39;name&#39; =&gt; &#39;ryan&#39; },</span><br/><span class="hl-1"> hash: &#39;&#39;</span><br/><span class="hl-1">}</span>
212
- </code><button>Copy</button></pre>
213
- <p>Ensure that you set <code>process.env.HOST</code> to the server&#39;s host name, or consider replacing this part entirely. If using <code>req.headers.host</code>, ensure proper
214
- validation is used, as clients may specify a custom <code>Host</code> header.</p>
215
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.90</p>
216
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1337</li></ul></aside></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 ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>capture<wbr/>Rejection<wbr/>Symbol</span><a href="#captureRejectionSymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">capture<wbr/>Rejection<wbr/>Symbol</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof </span><a href="_internal_.EventEmitter-1.html#captureRejectionSymbol" class="tsd-signature-type tsd-kind-property">captureRejectionSymbol</a></div><div class="tsd-comment tsd-typography"><p>Value: <code>Symbol.for(&#39;nodejs.rejection&#39;)</code></p>
217
- <p>See how to write a custom <code>rejection handler</code>.</p>
218
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
219
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#captureRejectionSymbol">captureRejectionSymbol</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:430</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="captureRejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>capture<wbr/>Rejections</span><a href="#captureRejections" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">capture<wbr/>Rejections</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Value: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type">boolean</a></p>
220
- <p>Change the default <code>captureRejections</code> option on all new <code>EventEmitter</code> objects.</p>
221
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.4.0, v12.16.0</p>
222
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#captureRejections">captureRejections</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:437</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="defaultMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>default<wbr/>Max<wbr/>Listeners</span><a href="#defaultMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">default<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>By default, a maximum of <code>10</code> listeners can be registered for any single
223
- event. This limit can be changed for individual <code>EventEmitter</code> instances
224
- using the <code>emitter.setMaxListeners(n)</code> method. To change the default
225
- for <em>all</em><code>EventEmitter</code> instances, the <code>events.defaultMaxListeners</code> property
226
- can be used. If this value is not a positive number, a <code>RangeError</code> is thrown.</p>
227
- <p>Take caution when setting the <code>events.defaultMaxListeners</code> because the
228
- change affects <em>all</em> <code>EventEmitter</code> instances, including those created before
229
- the change is made. However, calling <code>emitter.setMaxListeners(n)</code> still has
230
- precedence over <code>events.defaultMaxListeners</code>.</p>
231
- <p>This is not a hard limit. The <code>EventEmitter</code> instance will allow
232
- more listeners to be added but will output a trace warning to stderr indicating
233
- that a &quot;possible EventEmitter memory leak&quot; has been detected. For any single
234
- <code>EventEmitter</code>, the <code>emitter.getMaxListeners()</code> and <code>emitter.setMaxListeners()</code> methods can be used to
235
- temporarily avoid this warning:</p>
236
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">getMaxListeners</span><span class="hl-1">() + </span><span class="hl-9">1</span><span class="hl-1">);</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// do stuff</span><br/><span class="hl-1"> </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-7">Math</span><span class="hl-1">.</span><span class="hl-0">max</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">getMaxListeners</span><span class="hl-1">() - </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">0</span><span class="hl-1">));</span><br/><span class="hl-1">});</span>
237
- </code><button>Copy</button></pre>
238
- <p>The <code>--trace-warnings</code> command-line flag can be used to display the
239
- stack trace for such warnings.</p>
240
- <p>The emitted warning can be inspected with <code>process.on(&#39;warning&#39;)</code> and will
241
- have the additional <code>emitter</code>, <code>type</code>, and <code>count</code> properties, referring to
242
- the event emitter instance, the event&#39;s name and the number of attached
243
- listeners, respectively.
244
- Its <code>name</code> property is set to <code>&#39;MaxListenersExceededWarning&#39;</code>.</p>
245
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.2</p>
246
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#defaultMaxListeners">defaultMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:476</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="errorMonitor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>error<wbr/>Monitor</span><a href="#errorMonitor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">error<wbr/>Monitor</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof </span><a href="_internal_.EventEmitter-1.html#errorMonitor" class="tsd-signature-type tsd-kind-property">errorMonitor</a></div><div class="tsd-comment tsd-typography"><p>This symbol shall be used to install a listener for only monitoring <code>&#39;error&#39;</code> events. Listeners installed using this symbol are called before the regular <code>&#39;error&#39;</code> listeners are called.</p>
247
- <p>Installing a listener using this symbol does not change the behavior once an <code>&#39;error&#39;</code> event is emitted. Therefore, the process will still crash if no
248
- regular <code>&#39;error&#39;</code> listener is installed.</p>
249
- </div><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.17.0</p>
250
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#errorMonitor">errorMonitor</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:423</li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group"><h2>Methods</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_asyncDispose_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[async<wbr/>Dispose]</span><a href="#_asyncDispose_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_asyncDispose_._asyncDispose_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[async<wbr/>Dispose]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#_asyncDispose_._asyncDispose_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calls <code>readable.destroy()</code> with an <code>AbortError</code> and returns a promise that fulfills when the stream is finished.</p>
251
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v20.4.0</p>
252
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_asyncDispose_">[asyncDispose]</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:659</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_asyncIterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>[async<wbr/>Iterator]</span><a href="#_asyncIterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_asyncIterator_._asyncIterator_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[async<wbr/>Iterator]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#_asyncIterator_._asyncIterator_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_asyncIterator_">[asyncIterator]</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:654</li></ul></aside></li></ul></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 ts-flagOptional">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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_captureRejectionSymbol_._captureRejectionSymbol_-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">[capture<wbr/>Rejection<wbr/>Symbol]</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#_captureRejectionSymbol_._captureRejectionSymbol_-1.K">K</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span>, <span class="tsd-kind-parameter">event</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_captureRejectionSymbol_._captureRejectionSymbol_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="_captureRejectionSymbol_._captureRejectionSymbol_-1.K" 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>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></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><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <a href="../types/_internal_.AnyRest.html" class="tsd-signature-type tsd-kind-type-alias">AnyRest</a></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 <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_captureRejectionSymbol_">[captureRejectionSymbol]</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:135</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_construct" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>_construct</span><a href="#_construct" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_construct._construct-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_construct</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_construct._construct-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">callback</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-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_construct">_construct</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:133</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_destroy</span><a href="#_destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_destroy._destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_destroy._destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li><li><span><span class="tsd-kind-parameter">callback</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-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">error</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_destroy">_destroy</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:574</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="_read" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>_read</span><a href="#_read" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="_read._read-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">_read</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_read._read-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">size</span>: <span class="tsd-signature-type">number</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 <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#_read">_read</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:134</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Event emitter
253
- The defined events on documents including:</p>
254
- <ol>
255
- <li>close</li>
256
- <li>data</li>
257
- <li>end</li>
258
- <li>error</li>
259
- <li>pause</li>
260
- <li>readable</li>
261
- <li>resume</li>
262
- </ol>
263
- </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;close&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:598</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:599</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:600</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:601</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:602</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:603</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:604</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="addListener.addListener-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#addListener.addListener-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addListener">addListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:605</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="asIndexedPairs" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>as<wbr/>Indexed<wbr/>Pairs</span><a href="#asIndexedPairs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="asIndexedPairs.asIndexedPairs-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">as<wbr/>Indexed<wbr/>Pairs</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#asIndexedPairs.asIndexedPairs-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method returns a new stream with chunks of the underlying stream paired with a counter
264
- in the form <code>[index, chunk]</code>. The first index value is <code>0</code> and it increases by 1 for each chunk produced.</p>
265
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream of indexed pairs.</p>
266
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
267
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#asIndexedPairs">asIndexedPairs</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:549</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="compose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>compose</span><a href="#compose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="compose.compose-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">compose</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><a href="#compose.compose-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="compose.compose-1.T" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></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">stream</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol"> | </span><a href="../types/_internal_.ComposeFnParam.html" class="tsd-signature-type tsd-kind-type-alias">ComposeFnParam</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AsyncIterable.html" class="tsd-signature-type tsd-kind-interface">AsyncIterable</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">signal</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AbortSignal</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-kind-property">signal</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AbortSignal</span></h5></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#compose.compose-1.T">T</a></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#compose">compose</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:36</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="destroy.destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">error</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#destroy.destroy-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calls <code>destroy()</code> on the socket that received the <code>IncomingMessage</code>. If <code>error</code> is provided, an <code>&#39;error&#39;</code> event is emitted on the socket and <code>error</code> is passed
268
- as an argument to any listeners on the event.</p>
269
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">error</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
270
- </div><aside class="tsd-sources"><p>Overrides <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#destroy">destroy</a></p><ul><li>Defined in node_modules/@types/node/http.d.ts:1357</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="drop" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>drop</span><a href="#drop" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="drop.drop-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">drop</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">limit</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#drop.drop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method returns a new stream with the first <em>limit</em> chunks dropped from the start.</p>
271
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">limit</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>the number of chunks to drop from the readable.</p>
272
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream with <em>limit</em> chunks dropped from the start.</p>
273
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
274
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#drop">drop</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:535</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
275
- to each.</p>
276
- <p>Returns <code>true</code> if the event had listeners, <code>false</code> otherwise.</p>
277
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// First listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">firstListener</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Helloooo! first listener&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-5">// Second listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">secondListener</span><span class="hl-1">(</span><span class="hl-7">arg1</span><span class="hl-1">, </span><span class="hl-7">arg2</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-3">${</span><span class="hl-7">arg1</span><span class="hl-3">}</span><span class="hl-2">, </span><span class="hl-3">${</span><span class="hl-7">arg2</span><span class="hl-3">}</span><span class="hl-2"> in second listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-5">// Third listener</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">thirdListener</span><span class="hl-1">(...</span><span class="hl-7">args</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">parameters</span><span class="hl-1"> = </span><span class="hl-7">args</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;, &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`event with parameters </span><span class="hl-3">${</span><span class="hl-7">parameters</span><span class="hl-3">}</span><span class="hl-2"> in third listener`</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-9">1</span><span class="hl-1">, </span><span class="hl-9">2</span><span class="hl-1">, </span><span class="hl-9">3</span><span class="hl-1">, </span><span class="hl-9">4</span><span class="hl-1">, </span><span class="hl-9">5</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// [</span><br/><span class="hl-5">// [Function: firstListener],</span><br/><span class="hl-5">// [Function: secondListener],</span><br/><span class="hl-5">// [Function: thirdListener]</span><br/><span class="hl-5">// ]</span><br/><span class="hl-5">// Helloooo! first listener</span><br/><span class="hl-5">// event with parameters 1, 2 in second listener</span><br/><span class="hl-5">// event with parameters 1, 2, 3, 4, 5 in third listener</span>
278
- </code><button>Copy</button></pre>
279
- </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;close&quot;</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"><h4>Since</h4><p>v0.1.26</p>
280
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:606</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</span></span></li><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:607</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:608</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:609</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:610</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:611</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:612</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="emit.emit-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">emit</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#emit.emit-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></span></li><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#emit">emit</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:613</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="eventNames.eventNames-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">event<wbr/>Names</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">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><a href="#eventNames.eventNames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an array listing the events for which the emitter has registered
281
- listeners. The values in the array are strings or <code>Symbol</code>s.</p>
282
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">sym</span><span class="hl-1"> = </span><span class="hl-0">Symbol</span><span class="hl-1">(</span><span class="hl-2">&#39;symbol&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">sym</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">eventNames</span><span class="hl-1">());</span><br/><span class="hl-5">// Prints: [ &#39;foo&#39;, &#39;bar&#39;, Symbol(symbol) ]</span>
283
- </code><button>Copy</button></pre>
284
- </div><h4 class="tsd-returns-title">Returns <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></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
285
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#eventNames">eventNames</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:900</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="every" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>every</span><a href="#every" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="every.every-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">every</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#every.every-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method is similar to <code>Array.prototype.every</code> and calls <em>fn</em> on each chunk in the stream
286
- to check if all awaited return values are truthy value for <em>fn</em>. Once an <em>fn</em> call on a chunk
287
- <code>await</code>ed return value is falsy, the stream is destroyed and the promise is fulfilled with <code>false</code>.
288
- If all of the <em>fn</em> calls on the chunks return a truthy value, the promise is fulfilled with <code>true</code>.</p>
289
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
290
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to <code>true</code> if <em>fn</em> returned a truthy value for every one of the chunks.</p>
291
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
292
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#every">every</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:514</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="filter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="filter.filter-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#filter.filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method allows filtering the stream. For each chunk in the stream the <em>fn</em> function will be called
293
- and if it returns a truthy value, the chunk will be passed to the result stream.
294
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed.</p>
295
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to filter chunks from the stream. Async or not.</p>
296
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream filtered with the predicate <em>fn</em>.</p>
297
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.4.0, v16.14.0</p>
298
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#filter">filter</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:442</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="find" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>find</span><a href="#find" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="find.find-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method is similar to <code>Array.prototype.find</code> and calls <em>fn</em> on each chunk in the stream
299
- to find a chunk with a truthy value for <em>fn</em>. Once an <em>fn</em> call&#39;s awaited return value is truthy,
300
- the stream is destroyed and the promise is fulfilled with value for which <em>fn</em> returned a truthy value.
301
- If all of the <em>fn</em> calls on the chunks return a falsy value, the promise is fulfilled with <code>undefined</code>.</p>
302
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="find.find-1.T-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
303
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-kind-parameter">data</span><span class="tsd-signature-keyword"> is </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#find.find-1.T-1">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to the first chunk for which <em>fn</em> evaluated with a truthy value,
304
- or <code>undefined</code> if no element was found.</p>
305
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
306
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#find">find</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:497</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="find.find-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#find.find-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#find">find</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:501</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="flatMap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>flat<wbr/>Map</span><a href="#flatMap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="flatMap.flatMap-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flat<wbr/>Map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#flatMap.flatMap-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method returns a new stream by applying the given callback to each chunk of the stream
307
- and then flattening the result.</p>
308
- <p>It is possible to return a stream or another iterable or async iterable from <em>fn</em> and the result streams
309
- will be merged (flattened) into the returned stream.</p>
310
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">any</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to map over every chunk in the stream. May be async. May be a stream or generator.</p>
311
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream flat-mapped with the function <em>fn</em>.</p>
312
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
313
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#flatMap">flatMap</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:528</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="forEach.forEach-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method allows iterating a stream. For each chunk in the stream the <em>fn</em> function will be called.
314
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed.</p>
315
- <p>This method is different from <code>for await...of</code> loops in that it can optionally process chunks concurrently.
316
- In addition, a <code>forEach</code> iteration can only be stopped by having passed a <code>signal</code> option
317
- and aborting the related AbortController while <code>for await...of</code> can be stopped with <code>break</code> or <code>return</code>.
318
- In either case the stream will be destroyed.</p>
319
- <p>This method is different from listening to the <code>&#39;data&#39;</code> event in that it uses the <code>readable</code> event
320
- in the underlying machinary and can limit the number of concurrent <em>fn</em> calls.</p>
321
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
322
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise for when the stream has finished.</p>
323
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
324
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#forEach">forEach</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:461</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getMaxListeners.getMaxListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getMaxListeners.getMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the current max listener value for the <code>EventEmitter</code> which is either
325
- set by <code>emitter.setMaxListeners(n)</code> or defaults to <a href="_internal_.IncomingMessage.html#defaultMaxListeners" class="tsd-kind-property">defaultMaxListeners</a>.</p>
326
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v1.0.0</p>
327
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#getMaxListeners">getMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:752</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isPaused" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>is<wbr/>Paused</span><a href="#isPaused" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isPaused.isPaused-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Paused</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isPaused.isPaused-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.isPaused()</code> method returns the current operating state of the <code>Readable</code>.
328
- This is used primarily by the mechanism that underlies the <code>readable.pipe()</code> method.
329
- In most typical cases, there will be no reason to use this method directly.</p>
330
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">Readable</span><span class="hl-1">();</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === false</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">pause</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === true</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">resume</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">isPaused</span><span class="hl-1">(); </span><span class="hl-5">// === false</span>
331
- </code><button>Copy</button></pre>
332
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.11.14</p>
333
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#isPaused">isPaused</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:295</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="iterator" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>iterator</span><a href="#iterator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="iterator.iterator-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">iterator</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#iterator.iterator-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The iterator created by this method gives users the option to cancel the destruction
334
- of the stream if the <code>for await...of</code> loop is exited by <code>return</code>, <code>break</code>, or <code>throw</code>,
335
- or if the iterator should destroy the stream if the stream emitted an error during iteration.</p>
336
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">destroyOnReturn</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">destroy<wbr/>On<wbr/>Return</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><p>When set to <code>false</code>, calling <code>return</code> on the async iterator,
337
- or exiting a <code>for await...of</code> iteration using a <code>break</code>, <code>return</code>, or <code>throw</code> will not destroy the stream.
338
- <strong>Default: <code>true</code></strong>.</p>
339
- </div><div class="tsd-comment tsd-typography"></div></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.3.0</p>
340
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#iterator">iterator</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:425</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listenerCount.listenerCount-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listener<wbr/>Count</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#listenerCount.listenerCount-1.K-1">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-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-signature-type">number</span><a href="#listenerCount.listenerCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the number of listeners listening for the event named <code>eventName</code>.
341
- If <code>listener</code> is provided, it will return how many times the listener is found
342
- in the list of the listeners of the event.</p>
343
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listenerCount.listenerCount-1.K-1" 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>
344
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">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>
345
- </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"><h4>Since</h4><p>v3.2.0</p>
346
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#listenerCount">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:846</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listeners.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="_internal_.IncomingMessage.html#listeners.listeners-1.K-2">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-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#listeners.listeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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>
347
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">util</span><span class="hl-1">.</span><span class="hl-0">inspect</span><span class="hl-1">(</span><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">listeners</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">)));</span><br/><span class="hl-5">// Prints: [ [Function] ]</span>
348
- </code><button>Copy</button></pre>
349
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="listeners.listeners-1.K-2" 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"><h4>Since</h4><p>v0.1.26</p>
350
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#listeners">listeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:765</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="map" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="map.map-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#map.map-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method allows mapping over the stream. The <em>fn</em> function will be called for every chunk in the stream.
351
- If the <em>fn</em> function returns a promise - that promise will be <code>await</code>ed before being passed to the result stream.</p>
352
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">any</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to map over every chunk in the stream. Async or not.</p>
353
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream mapped with the function <em>fn</em>.</p>
354
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.4.0, v16.14.0</p>
355
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#map">map</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:433</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="off.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="_internal_.IncomingMessage.html#off.off-1.K-3">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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#off.off-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Alias for <code>emitter.removeListener()</code>.</p>
356
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="off.off-1.K-3" 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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v10.0.0</p>
357
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#off">off</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:725</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="on.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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
358
- named <code>eventName</code>. No checks are made to see if the <code>listener</code> has already
359
- been added. Multiple calls passing the same combination of <code>eventName</code> and
360
- <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
361
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
362
- </code><button>Copy</button></pre>
363
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
364
- <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
365
- event listener to the beginning of the listeners array.</p>
366
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// b</span><br/><span class="hl-5">// a</span>
367
- </code><button>Copy</button></pre>
368
- </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;close&quot;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
369
- </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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
370
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.101</p>
371
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:614</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:615</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-3" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:616</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-4" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:617</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-5" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:618</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-6" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:619</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-7" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:620</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on.on-8" 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-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#on.on-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on">on</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:621</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once.once-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
372
- next time <code>eventName</code> is triggered, this listener is removed and then invoked.</p>
373
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
374
- </code><button>Copy</button></pre>
375
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
376
- <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
377
- event listener to the beginning of the listeners array.</p>
378
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEE</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;a&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;b&#39;</span><span class="hl-1">));</span><br/><span class="hl-7">myEE</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// b</span><br/><span class="hl-5">// a</span>
379
- </code><button>Copy</button></pre>
380
- </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;close&quot;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
381
- </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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
382
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.3.0</p>
383
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:622</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:623</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:624</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:625</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:626</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:627</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:628</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once.once-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#once.once-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once">once</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:629</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pause" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pause</span><a href="#pause" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="pause.pause-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pause</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#pause.pause-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.pause()</code> method will cause a stream in flowing mode to stop
384
- emitting <code>&#39;data&#39;</code> events, switching out of flowing mode. Any data that
385
- becomes available will remain in the internal buffer.</p>
386
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;data&#39;</span><span class="hl-1">, (</span><span class="hl-7">chunk</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Received </span><span class="hl-3">${</span><span class="hl-7">chunk</span><span class="hl-10">.</span><span class="hl-7">length</span><span class="hl-3">}</span><span class="hl-2"> bytes of data.`</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">pause</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;There will be no additional data for 1 second.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-0">setTimeout</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Now data will start flowing again.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">resume</span><span class="hl-1">();</span><br/><span class="hl-1"> }, </span><span class="hl-9">1000</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
387
- </code><button>Copy</button></pre>
388
- <p>The <code>readable.pause()</code> method has no effect if there is a <code>&#39;readable&#39;</code> event listener.</p>
389
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.4</p>
390
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#pause">pause</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:259</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="pipe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>pipe</span><a href="#pipe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="pipe.pipe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">pipe</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">destination</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a><a href="#pipe.pipe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="pipe.pipe-1.T-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/_internal_.WritableStream.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a></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">destination</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">end</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></span><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">end</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span></h5></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#pipe.pipe-1.T-2">T</a></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#pipe">pipe</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:30</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
391
- event named <code>eventName</code>. No checks are made to see if the <code>listener</code> has
392
- already been added. Multiple calls passing the same combination of <code>eventName</code>
393
- and <code>listener</code> will result in the <code>listener</code> being added, and called, multiple times.</p>
394
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">prependListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
395
- </code><button>Copy</button></pre>
396
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
397
- </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;close&quot;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
398
- </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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
399
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
400
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:630</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:631</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:632</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:633</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:634</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:635</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:636</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependListener.prependListener-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependListener.prependListener-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependListener">prependListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:637</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
401
- listener is removed, and then invoked.</p>
402
- <pre><code class="language-js"><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">prependOnceListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Ah, we have our first user!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
403
- </code><button>Copy</button></pre>
404
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
405
- </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;close&quot;</span></span><div class="tsd-comment tsd-typography"><p>The name of the event.</p>
406
- </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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The callback function</p>
407
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v6.0.0</p>
408
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:638</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:639</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:640</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:641</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:642</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:643</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:644</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="prependOnceListener.prependOnceListener-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">prepend<wbr/>Once<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#prependOnceListener.prependOnceListener-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:645</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="push" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>push</span><a href="#push" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="push.push-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">push</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#push.push-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#push">push</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:415</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="rawListeners.rawListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">raw<wbr/>Listeners</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#rawListeners.rawListeners-1.K-4">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-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span><a href="#rawListeners.rawListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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>,
409
- including any wrappers (such as those created by <code>.once()</code>).</p>
410
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log once&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Returns a new Array with a function `onceWrapper` which has a property</span><br/><span class="hl-5">// `listener` which contains the original listener bound above</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">listeners</span><span class="hl-1"> = </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">logFnWrapper</span><span class="hl-1"> = </span><span class="hl-7">listeners</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">];</span><br/><br/><span class="hl-5">// Logs &quot;log once&quot; to the console and does not unbind the `once` event</span><br/><span class="hl-7">logFnWrapper</span><span class="hl-1">.</span><span class="hl-0">listener</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Logs &quot;log once&quot; to the console and removes the listener</span><br/><span class="hl-0">logFnWrapper</span><span class="hl-1">();</span><br/><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;log persistently&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Will return a new Array with a single function bound by `.on()` above</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">newListeners</span><span class="hl-1"> = </span><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">rawListeners</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Logs &quot;log persistently&quot; twice</span><br/><span class="hl-7">newListeners</span><span class="hl-1">[</span><span class="hl-9">0</span><span class="hl-1">]();</span><br/><span class="hl-7">emitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;log&#39;</span><span class="hl-1">);</span>
411
- </code><button>Copy</button></pre>
412
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="rawListeners.rawListeners-1.K-4" 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"><h4>Since</h4><p>v9.4.0</p>
413
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#rawListeners">rawListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:796</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="read" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>read</span><a href="#read" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="read.read-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">read</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">size</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><a href="#read.read-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.read()</code> method reads data out of the internal buffer and
414
- returns it. If no data is available to be read, <code>null</code> is returned. By default,
415
- the data is returned as a <code>Buffer</code> object unless an encoding has been
416
- specified using the <code>readable.setEncoding()</code> method or the stream is operating
417
- in object mode.</p>
418
- <p>The optional <code>size</code> argument specifies a specific number of bytes to read. If
419
- <code>size</code> bytes are not available to be read, <code>null</code> will be returned <em>unless</em> the
420
- stream has ended, in which case all of the data remaining in the internal buffer
421
- will be returned.</p>
422
- <p>If the <code>size</code> argument is not specified, all of the data contained in the
423
- internal buffer will be returned.</p>
424
- <p>The <code>size</code> argument must be less than or equal to 1 GiB.</p>
425
- <p>The <code>readable.read()</code> method should only be called on <code>Readable</code> streams
426
- operating in paused mode. In flowing mode, <code>readable.read()</code> is called
427
- automatically until the internal buffer is fully drained.</p>
428
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// &#39;readable&#39; may be triggered multiple times as data is buffered in</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Stream is readable (new data received in buffer)&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Use a loop to make sure we read all currently available data</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">`Read </span><span class="hl-3">${</span><span class="hl-7">chunk</span><span class="hl-10">.</span><span class="hl-7">length</span><span class="hl-3">}</span><span class="hl-2"> bytes of data...`</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-5">// &#39;end&#39; will be triggered once when there is no more data available</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Reached end of stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
429
- </code><button>Copy</button></pre>
430
- <p>Each call to <code>readable.read()</code> returns a chunk of data, or <code>null</code>. The chunks
431
- are not concatenated. A <code>while</code> loop is necessary to consume all data
432
- currently in the buffer. When reading a large file <code>.read()</code> may return <code>null</code>,
433
- having consumed all buffered content so far, but there is still more data to
434
- come not yet buffered. In this case a new <code>&#39;readable&#39;</code> event will be emitted
435
- when there is more data in the buffer. Finally the <code>&#39;end&#39;</code> event will be
436
- emitted when there is no more data to come.</p>
437
- <p>Therefore to read a file&#39;s whole contents from a <code>readable</code>, it is necessary
438
- to collect chunks across multiple <code>&#39;readable&#39;</code> events:</p>
439
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">chunks</span><span class="hl-1"> = [];</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-7">chunks</span><span class="hl-1">.</span><span class="hl-0">push</span><span class="hl-1">(</span><span class="hl-7">chunk</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">content</span><span class="hl-1"> = </span><span class="hl-7">chunks</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
440
- </code><button>Copy</button></pre>
441
- <p>A <code>Readable</code> stream in object mode will always return a single item from
442
- a call to <code>readable.read(size)</code>, regardless of the value of the <code>size</code> argument.</p>
443
- <p>If the <code>readable.read()</code> method returns a chunk of data, a <code>&#39;data&#39;</code> event will
444
- also be emitted.</p>
445
- <p>Calling <a href="_internal_.ReadableBase.html#read" class="tsd-kind-method">read</a> after the <code>&#39;end&#39;</code> event has
446
- been emitted will return <code>null</code>. No runtime error will be raised.</p>
447
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">size</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Optional argument to specify how much data to read.</p>
448
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.4</p>
449
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#read">read</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:212</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="reduce" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>reduce</span><a href="#reduce" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">initial</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#reduce.reduce-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method calls <em>fn</em> on each chunk of the stream in order, passing it the result from the calculation
450
- on the previous element. It returns a promise for the final value of the reduction.</p>
451
- <p>If no <em>initial</em> value is supplied the first chunk of the stream is used as the initial value.
452
- If the stream is empty, the promise is rejected with a <code>TypeError</code> with the <code>ERR_INVALID_ARGS</code> code property.</p>
453
- <p>The reducer function iterates the stream element-by-element which means that there is no <em>concurrency</em> parameter
454
- or parallelism. To perform a reduce concurrently, you can extract the async function to <code>readable.map</code> method.</p>
455
- </div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduce.reduce-1.T-3" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a reducer function to call over every chunk in the stream. Async or not.</p>
456
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previous</span>: <span class="tsd-signature-type">any</span></span></li><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">initial</span>: <span class="tsd-signature-type">undefined</span></span><div class="tsd-comment tsd-typography"><p>the initial value to use in the reduction.</p>
457
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-1.T-3">T</a><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise for the final value of the reduction.</p>
458
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
459
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#reduce">reduce</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:564</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="reduce.reduce-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">initial</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span><a href="#reduce.reduce-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="reduce.reduce-2.T-4" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">T</span> = <span class="tsd-signature-type">any</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">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">previous</span>, <span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">previous</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></span></li><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></h4></li></ul></li></ul></li><li><span><span class="tsd-kind-parameter">initial</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="_internal_.IncomingMessage.html#reduce.reduce-2.T-4">T</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#reduce">reduce</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:569</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeAllListeners.removeAllListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>All<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeAllListeners.removeAllListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes all listeners, or those of the specified <code>eventName</code>.</p>
460
- <p>It is bad practice to remove listeners added elsewhere in the code,
461
- particularly when the <code>EventEmitter</code> instance was created by some other
462
- component or module (e.g. sockets or file streams).</p>
463
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
464
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <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">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
465
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:736</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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>
466
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1"> = (</span><span class="hl-7">stream</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;someone connected!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span><br/><span class="hl-5">// ...</span><br/><span class="hl-7">server</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;connection&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span>
467
- </code><button>Copy</button></pre>
468
- <p><code>removeListener()</code> will remove, at most, one instance of a listener from the
469
- listener array. If any single listener has been added multiple times to the
470
- listener array for the specified <code>eventName</code>, then <code>removeListener()</code> must be
471
- called multiple times to remove each instance.</p>
472
- <p>Once an event is emitted, all listeners attached to it at the
473
- 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
474
- will not remove them from<code>emit()</code> in progress. Subsequent events behave as expected.</p>
475
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">class</span><span class="hl-1"> </span><span class="hl-8">MyEmitter</span><span class="hl-1"> </span><span class="hl-3">extends</span><span class="hl-1"> </span><span class="hl-8">EventEmitter</span><span class="hl-1"> {}</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">MyEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callbackA</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;A&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackB</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">callbackB</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;B&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">};</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackA</span><span class="hl-1">);</span><br/><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, </span><span class="hl-7">callbackB</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// callbackA removes listener callbackB but it will still be called.</span><br/><span class="hl-5">// Internal listener array at time of emit [callbackA, callbackB]</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// A</span><br/><span class="hl-5">// B</span><br/><br/><span class="hl-5">// callbackB is now removed.</span><br/><span class="hl-5">// Internal listener array [callbackA]</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// Prints:</span><br/><span class="hl-5">// A</span>
476
- </code><button>Copy</button></pre>
477
- <p>Because listeners are managed using an internal array, calling this will
478
- change the position indices of any listener registered <em>after</em> the listener
479
- being removed. This will not impact the order in which listeners are called,
480
- but it means that any copies of the listener array as returned by
481
- the <code>emitter.listeners()</code> method will need to be recreated.</p>
482
- <p>When a single function has been added as a handler multiple times for a single
483
- event (as in the example below), <code>removeListener()</code> will remove the most
484
- recently added instance. In the example the <code>once(&#39;ping&#39;)</code> listener is removed:</p>
485
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">pong</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;pong&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">, </span><span class="hl-7">pong</span><span class="hl-1">);</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;ping&#39;</span><span class="hl-1">);</span>
486
- </code><button>Copy</button></pre>
487
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
488
- </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;close&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.1.26</p>
489
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:646</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-2" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;data&quot;</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">chunk</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:647</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;end&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:648</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-4" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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-signature-symbol">(</span><span class="tsd-kind-parameter">err</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">err</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">err</span>: <a href="../interfaces/_internal_.Error.html" class="tsd-signature-type tsd-kind-interface">Error</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:649</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-5" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;pause&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:650</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-6" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;readable&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:651</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-7" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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;resume&quot;</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-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:652</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="removeListener.removeListener-8" class="tsd-anchor"></a><span class="tsd-kind-call-signature">remove<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#removeListener.removeListener-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><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">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-signature-symbol">...</span><span class="tsd-kind-parameter">args</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><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-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#removeListener">removeListener</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:653</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="resume" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>resume</span><a href="#resume" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="resume.resume-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">resume</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#resume.resume-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.resume()</code> method causes an explicitly paused <code>Readable</code> stream to
490
- resume emitting <code>&#39;data&#39;</code> events, switching the stream into flowing mode.</p>
491
- <p>The <code>readable.resume()</code> method can be used to fully consume the data from a
492
- stream without actually processing any of that data:</p>
493
- <pre><code class="language-js"><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">resume</span><span class="hl-1">()</span><br/><span class="hl-1"> .</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;end&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Reached the end, but did not read anything.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span>
494
- </code><button>Copy</button></pre>
495
- <p>The <code>readable.resume()</code> method has no effect if there is a <code>&#39;readable&#39;</code> event listener.</p>
496
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.4</p>
497
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#resume">resume</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:278</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setEncoding" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Encoding</span><a href="#setEncoding" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setEncoding.setEncoding-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Encoding</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setEncoding.setEncoding-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.setEncoding()</code> method sets the character encoding for
498
- data read from the <code>Readable</code> stream.</p>
499
- <p>By default, no encoding is assigned and stream data will be returned as <code>Buffer</code> objects. Setting an encoding causes the stream data
500
- to be returned as strings of the specified encoding rather than as <code>Buffer</code> objects. For instance, calling <code>readable.setEncoding(&#39;utf8&#39;)</code> will cause the
501
- output data to be interpreted as UTF-8 data, and passed as strings. Calling <code>readable.setEncoding(&#39;hex&#39;)</code> will cause the data to be encoded in hexadecimal
502
- string format.</p>
503
- <p>The <code>Readable</code> stream will properly handle multi-byte characters delivered
504
- through the stream that would otherwise become improperly decoded if simply
505
- pulled from the stream as <code>Buffer</code> objects.</p>
506
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">setEncoding</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;data&#39;</span><span class="hl-1">, (</span><span class="hl-7">chunk</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">assert</span><span class="hl-1">.</span><span class="hl-0">equal</span><span class="hl-1">(</span><span class="hl-3">typeof</span><span class="hl-1"> </span><span class="hl-7">chunk</span><span class="hl-1">, </span><span class="hl-2">&#39;string&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Got %d characters of string data:&#39;</span><span class="hl-1">, </span><span class="hl-7">chunk</span><span class="hl-1">.</span><span class="hl-7">length</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
507
- </code><button>Copy</button></pre>
508
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>The encoding to use.</p>
509
- </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"><h4>Since</h4><p>v0.9.4</p>
510
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#setEncoding">setEncoding</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:237</li></ul></aside></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"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setMaxListeners.setMaxListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setMaxListeners.setMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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
511
- added for a particular event. This is a useful default that helps finding
512
- memory leaks. The <code>emitter.setMaxListeners()</code> method allows the limit to be
513
- 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>
514
- <p>Returns a reference to the <code>EventEmitter</code>, so that calls can be chained.</p>
515
- </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"><h4>Since</h4><p>v0.3.5</p>
516
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#setMaxListeners">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:746</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-external"><a id="setTimeout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Timeout</span><a href="#setTimeout" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setTimeout.setTimeout-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Timeout</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">msecs</span>, <span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#setTimeout.setTimeout-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Calls <code>message.socket.setTimeout(msecs, callback)</code>.</p>
517
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">msecs</span>: <span class="tsd-signature-type">number</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">this</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.5.9</p>
518
- </div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/node/http.d.ts:1287</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="some" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>some</span><a href="#some" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="some.some-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">some</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><a href="#some.some-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method is similar to <code>Array.prototype.some</code> and calls <em>fn</em> on each chunk in the stream
519
- until the awaited return value is <code>true</code> (or any truthy value). Once an <em>fn</em> call on a chunk
520
- <code>await</code>ed return value is truthy, the stream is destroyed and the promise is fulfilled with <code>true</code>.
521
- If none of the <em>fn</em> calls on the chunks return a truthy value, the promise is fulfilled with <code>false</code>.</p>
522
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</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">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>a function to call on each chunk of the stream. Async or not.</p>
523
- </div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise evaluating to <code>true</code> if <em>fn</em> returned a truthy value for at least one of the chunks.</p>
524
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
525
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#some">some</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:483</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="take" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>take</span><a href="#take" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="take.take-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">take</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">limit</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#take.take-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method returns a new stream with the first <em>limit</em> chunks.</p>
526
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">limit</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>the number of chunks to take from the readable.</p>
527
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><p>a stream with <em>limit</em> chunks taken.</p>
528
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
529
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#take">take</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:542</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>to<wbr/>Array</span><a href="#toArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="toArray.toArray-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#toArray.toArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>This method allows easily obtaining the contents of a stream.</p>
530
- <p>As this method reads the entire stream into memory, it negates the benefits of streams. It&#39;s intended
531
- for interoperability and convenience, not as the primary way to consume streams.</p>
532
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ArrayOptions.html" class="tsd-signature-type tsd-kind-interface">ArrayOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a promise containing an array with the contents of the stream.</p>
533
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.5.0</p>
534
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#toArray">toArray</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:473</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="unpipe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unpipe</span><a href="#unpipe" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="unpipe.unpipe-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unpipe</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">destination</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#unpipe.unpipe-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The <code>readable.unpipe()</code> method detaches a <code>Writable</code> stream previously attached
535
- using the <a href="_internal_.ReadableBase.html#pipe" class="tsd-kind-method">pipe</a> method.</p>
536
- <p>If the <code>destination</code> is not specified, then <em>all</em> pipes are detached.</p>
537
- <p>If the <code>destination</code> is specified, but no pipe is set up for it, then
538
- the method does nothing.</p>
539
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">fs</span><span class="hl-1"> = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:fs&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">readable</span><span class="hl-1"> = </span><span class="hl-0">getReadableStreamSomehow</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">writable</span><span class="hl-1"> = </span><span class="hl-7">fs</span><span class="hl-1">.</span><span class="hl-0">createWriteStream</span><span class="hl-1">(</span><span class="hl-2">&#39;file.txt&#39;</span><span class="hl-1">);</span><br/><span class="hl-5">// All the data from readable goes into &#39;file.txt&#39;,</span><br/><span class="hl-5">// but only for the first second.</span><br/><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">pipe</span><span class="hl-1">(</span><span class="hl-7">writable</span><span class="hl-1">);</span><br/><span class="hl-0">setTimeout</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Stop writing to file.txt.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">readable</span><span class="hl-1">.</span><span class="hl-0">unpipe</span><span class="hl-1">(</span><span class="hl-7">writable</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Manually close the file stream.&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">writable</span><span class="hl-1">.</span><span class="hl-0">end</span><span class="hl-1">();</span><br/><span class="hl-1">}, </span><span class="hl-9">1000</span><span class="hl-1">);</span>
540
- </code><button>Copy</button></pre>
541
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">destination</span>: <a href="../interfaces/_internal_.WritableStream.html" class="tsd-signature-type tsd-kind-interface">WritableStream</a></span><div class="tsd-comment tsd-typography"><p>Optional specific stream to unpipe</p>
542
- </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"><h4>Since</h4><p>v0.9.4</p>
543
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#unpipe">unpipe</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:322</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="unshift" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>unshift</span><a href="#unshift" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="unshift.unshift-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">unshift</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">chunk</span>, <span class="tsd-kind-parameter">encoding</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#unshift.unshift-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Passing <code>chunk</code> as <code>null</code> signals the end of the stream (EOF) and behaves the
544
- same as <code>readable.push(null)</code>, after which no more data can be written. The EOF
545
- signal is put at the end of the buffer and any buffered data will still be
546
- flushed.</p>
547
- <p>The <code>readable.unshift()</code> method pushes a chunk of data back into the internal
548
- buffer. This is useful in certain situations where a stream is being consumed by
549
- code that needs to &quot;un-consume&quot; some amount of data that it has optimistically
550
- pulled out of the source, so that the data can be passed on to some other party.</p>
551
- <p>The <code>stream.unshift(chunk)</code> method cannot be called after the <code>&#39;end&#39;</code> event
552
- has been emitted or a runtime error will be thrown.</p>
553
- <p>Developers using <code>stream.unshift()</code> often should consider switching to
554
- use of a <code>Transform</code> stream instead. See the <code>API for stream implementers</code> section for more information.</p>
555
- <pre><code class="language-js"><span class="hl-5">// Pull off a header delimited by \n\n.</span><br/><span class="hl-5">// Use unshift() if we get too much.</span><br/><span class="hl-5">// Call the callback with (error, header, stream).</span><br/><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">StringDecoder</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:string_decoder&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">parseHeader</span><span class="hl-1">(</span><span class="hl-7">stream</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, </span><span class="hl-7">onReadable</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">decoder</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">StringDecoder</span><span class="hl-1">(</span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">header</span><span class="hl-1"> = </span><span class="hl-2">&#39;&#39;</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">onReadable</span><span class="hl-1">() {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">chunk</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">while</span><span class="hl-1"> (</span><span class="hl-3">null</span><span class="hl-1"> !== (</span><span class="hl-7">chunk</span><span class="hl-1"> = </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">())) {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">str</span><span class="hl-1"> = </span><span class="hl-7">decoder</span><span class="hl-1">.</span><span class="hl-0">write</span><span class="hl-1">(</span><span class="hl-7">chunk</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (</span><span class="hl-7">str</span><span class="hl-1">.</span><span class="hl-0">includes</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\n\n</span><span class="hl-2">&#39;</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Found the header boundary.</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">split</span><span class="hl-1"> = </span><span class="hl-7">str</span><span class="hl-1">.</span><span class="hl-0">split</span><span class="hl-1">(</span><span class="hl-12">/\n\n/</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">header</span><span class="hl-1"> += </span><span class="hl-7">split</span><span class="hl-1">.</span><span class="hl-0">shift</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">remaining</span><span class="hl-1"> = </span><span class="hl-7">split</span><span class="hl-1">.</span><span class="hl-0">join</span><span class="hl-1">(</span><span class="hl-2">&#39;</span><span class="hl-11">\n\n</span><span class="hl-2">&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">buf</span><span class="hl-1"> = </span><span class="hl-7">Buffer</span><span class="hl-1">.</span><span class="hl-0">from</span><span class="hl-1">(</span><span class="hl-7">remaining</span><span class="hl-1">, </span><span class="hl-2">&#39;utf8&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">callback</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Remove the &#39;readable&#39; listener before unshifting.</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">removeListener</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, </span><span class="hl-7">onReadable</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (</span><span class="hl-7">buf</span><span class="hl-1">.</span><span class="hl-7">length</span><span class="hl-1">)</span><br/><span class="hl-1"> </span><span class="hl-7">stream</span><span class="hl-1">.</span><span class="hl-0">unshift</span><span class="hl-1">(</span><span class="hl-7">buf</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-5">// Now the body of the message can be read from the stream.</span><br/><span class="hl-1"> </span><span class="hl-0">callback</span><span class="hl-1">(</span><span class="hl-3">null</span><span class="hl-1">, </span><span class="hl-7">header</span><span class="hl-1">, </span><span class="hl-7">stream</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-6">return</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-5">// Still reading the header.</span><br/><span class="hl-1"> </span><span class="hl-7">header</span><span class="hl-1"> += </span><span class="hl-7">str</span><span class="hl-1">;</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
556
- </code><button>Copy</button></pre>
557
- <p>Unlike <a href="_internal_.ReadableBase.html#push" class="tsd-kind-method">push</a>, <code>stream.unshift(chunk)</code> will not
558
- end the reading process by resetting the internal reading state of the stream.
559
- This can cause unexpected results if <code>readable.unshift()</code> is called during a
560
- read (i.e. from within a <a href="_internal_.ReadableBase.html#_read" class="tsd-kind-method">_read</a> implementation on a
561
- custom stream). Following the call to <code>readable.unshift()</code> with an immediate <a href="_internal_.ReadableBase.html#push" class="tsd-kind-method">push</a> will reset the reading state appropriately,
562
- however it is best to simply avoid calling <code>readable.unshift()</code> while in the
563
- process of performing a read.</p>
564
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">chunk</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>Chunk of data to unshift onto the read queue. For streams not operating in object mode, <code>chunk</code> must
565
- be a {string}, {Buffer}, {TypedArray}, {DataView} or <code>null</code>. For object mode streams, <code>chunk</code> may be any JavaScript value.</p>
566
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">encoding</span>: <a href="../types/_internal_.BufferEncoding.html" class="tsd-signature-type tsd-kind-type-alias">BufferEncoding</a></span><div class="tsd-comment tsd-typography"><p>Encoding of string chunks. Must be a valid <code>Buffer</code> encoding, such as <code>&#39;utf8&#39;</code> or <code>&#39;ascii&#39;</code>.</p>
567
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v0.9.11</p>
568
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#unshift">unshift</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:388</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="wrap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>wrap</span><a href="#wrap" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="wrap.wrap-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">wrap</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">this</span><a href="#wrap.wrap-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Prior to Node.js 0.10, streams did not implement the entire <code>node:stream</code> module API as it is currently defined. (See <code>Compatibility</code> for more
569
- information.)</p>
570
- <p>When using an older Node.js library that emits <code>&#39;data&#39;</code> events and has a <a href="_internal_.ReadableBase.html#pause" class="tsd-kind-method">pause</a> method that is advisory only, the <code>readable.wrap()</code> method can be used to create a <code>Readable</code>
571
- stream that uses
572
- the old stream as its data source.</p>
573
- <p>It will rarely be necessary to use <code>readable.wrap()</code> but the method has been
574
- provided as a convenience for interacting with older Node.js applications and
575
- libraries.</p>
576
- <pre><code class="language-js"><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">OldReader</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;./old-api-module.js&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> { </span><span class="hl-4">Readable</span><span class="hl-1"> } = </span><span class="hl-0">require</span><span class="hl-1">(</span><span class="hl-2">&#39;node:stream&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">oreader</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">OldReader</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myReader</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Readable</span><span class="hl-1">().</span><span class="hl-0">wrap</span><span class="hl-1">(</span><span class="hl-7">oreader</span><span class="hl-1">);</span><br/><br/><span class="hl-7">myReader</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;readable&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">myReader</span><span class="hl-1">.</span><span class="hl-0">read</span><span class="hl-1">(); </span><span class="hl-5">// etc.</span><br/><span class="hl-1">});</span>
577
- </code><button>Copy</button></pre>
578
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">stream</span>: <a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></span><div class="tsd-comment tsd-typography"><p>An &quot;old style&quot; readable stream</p>
579
- </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"><h4>Since</h4><p>v0.9.4</p>
580
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#wrap">wrap</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:414</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="addAbortListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>add<wbr/>Abort<wbr/>Listener</span><a href="#addAbortListener" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="addAbortListener.addAbortListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">add<wbr/>Abort<wbr/>Listener</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">signal</span>, <span class="tsd-kind-parameter">resource</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.Disposable.html" class="tsd-signature-type tsd-kind-interface">Disposable</a><a href="#addAbortListener.addAbortListener-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><code class="tsd-tag ts-flagExperimental">Experimental</code> <div class="tsd-comment tsd-typography"><p>Listens once to the <code>abort</code> event on the provided <code>signal</code>.</p>
581
- <p>Listening to the <code>abort</code> event on abort signals is unsafe and may
582
- lead to resource leaks since another third party with the signal can
583
- call <code>e.stopImmediatePropagation()</code>. Unfortunately Node.js cannot change
584
- this since it would violate the web standard. Additionally, the original
585
- API makes it easy to forget to remove listeners.</p>
586
- <p>This API allows safely using <code>AbortSignal</code>s in Node.js APIs by solving these
587
- two issues by listening to the event such that <code>stopImmediatePropagation</code> does
588
- not prevent the listener from running.</p>
589
- <p>Returns a disposable so that it may be unsubscribed from more easily.</p>
590
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">addAbortListener</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">example</span><span class="hl-1">(</span><span class="hl-7">signal</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-3">let</span><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">signal</span><span class="hl-1">.</span><span class="hl-0">addEventListener</span><span class="hl-1">(</span><span class="hl-2">&#39;abort&#39;</span><span class="hl-1">, (</span><span class="hl-7">e</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">e</span><span class="hl-1">.</span><span class="hl-0">stopImmediatePropagation</span><span class="hl-1">());</span><br/><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1"> = </span><span class="hl-0">addAbortListener</span><span class="hl-1">(</span><span class="hl-7">signal</span><span class="hl-1">, (</span><span class="hl-7">e</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">// Do something when signal is aborted.</span><br/><span class="hl-1"> });</span><br/><span class="hl-1"> } </span><span class="hl-6">finally</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">disposable</span><span class="hl-1">?.[</span><span class="hl-7">Symbol</span><span class="hl-1">.</span><span class="hl-7">dispose</span><span class="hl-1">]();</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
591
- </code><button>Copy</button></pre>
592
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">signal</span>: <span class="tsd-signature-type">AbortSignal</span></span></li><li><span><span class="tsd-kind-parameter">resource</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</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><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><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">Event</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.Disposable.html" class="tsd-signature-type tsd-kind-interface">Disposable</a></h4><p>Disposable that removes the <code>abort</code> listener.</p>
593
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v20.5.0</p>
594
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#addAbortListener">addAbortListener</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:415</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="from" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="from.from-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">iterable</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#from.from-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>A utility method for creating Readable Streams out of iterators.</p>
595
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">iterable</span>: <a href="../interfaces/_internal_.Iterable.html" class="tsd-signature-type tsd-kind-interface">Iterable</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.AsyncIterable.html" class="tsd-signature-type tsd-kind-interface">AsyncIterable</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>Object implementing the <code>Symbol.asyncIterator</code> or <code>Symbol.iterator</code> iterable protocol. Emits an &#39;error&#39; event if a null value is passed.</p>
596
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.ReadableOptions.html" class="tsd-signature-type tsd-kind-interface">ReadableOptions</a></span><div class="tsd-comment tsd-typography"><p>Options provided to <code>new stream.Readable([options])</code>. By default, <code>Readable.from()</code> will set <code>options.objectMode</code> to <code>true</code>, unless this is explicitly opted out by setting <code>options.objectMode</code> to <code>false</code>.</p>
597
- </div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v12.3.0, v10.17.0</p>
598
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#from">from</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:60</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="fromWeb" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from<wbr/>Web</span><a href="#fromWeb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="fromWeb.fromWeb-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">from<wbr/>Web</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">readableStream</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><a href="#fromWeb.fromWeb-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><code class="tsd-tag ts-flagExperimental">Experimental</code> <div class="tsd-comment tsd-typography"><p>A utility method for creating a <code>Readable</code> from a web <code>ReadableStream</code>.</p>
599
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">readableStream</span>: <a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.ReadableOptions.html" class="tsd-signature-type tsd-kind-interface">ReadableOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;encoding&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;highWaterMark&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;objectMode&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.0.0</p>
600
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#fromWeb">fromWeb</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:975</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getEventListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>get<wbr/>Event<wbr/>Listeners</span><a href="#getEventListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getEventListeners.getEventListeners-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Event<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">name</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="#getEventListeners.getEventListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li 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>
601
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.listeners</code> on
602
- the emitter.</p>
603
- <p>For <code>EventTarget</code>s this is the only way to get the event listeners for the
604
- event target. This is useful for debugging and diagnostic purposes.</p>
605
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">getEventListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Events are fun&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">listener</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getEventListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-5">// [ [Function: listener] ]</span><br/><span class="hl-1">}</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">et</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-0">listener</span><span class="hl-1"> = () </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;Events are fun&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">et</span><span class="hl-1">.</span><span class="hl-0">addEventListener</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">listener</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getEventListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)); </span><span class="hl-5">// [ [Function: listener] ]</span><br/><span class="hl-1">}</span>
606
- </code><button>Copy</button></pre>
607
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">name</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"><h4>Since</h4><p>v15.2.0, v14.17.0</p>
608
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#getEventListeners">getEventListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:336</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="getMaxListeners-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>get<wbr/>Max<wbr/>Listeners</span><a href="#getMaxListeners-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="getMaxListeners-2.getMaxListeners-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getMaxListeners-2.getMaxListeners-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the currently set max amount of listeners.</p>
609
- <p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.getMaxListeners</code> on
610
- the emitter.</p>
611
- <p>For <code>EventTarget</code>s this is the only way to get the max event listeners for the
612
- event target. If the number of event handlers on a single EventTarget exceeds
613
- the max set, the EventTarget will print a warning.</p>
614
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">getMaxListeners</span><span class="hl-1">, </span><span class="hl-7">setMaxListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">)); </span><span class="hl-5">// 10</span><br/><span class="hl-1"> </span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">11</span><span class="hl-1">, </span><span class="hl-7">ee</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">)); </span><span class="hl-5">// 11</span><br/><span class="hl-1">}</span><br/><span class="hl-1">{</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">et</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">)); </span><span class="hl-5">// 10</span><br/><span class="hl-1"> </span><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">11</span><span class="hl-1">, </span><span class="hl-7">et</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">getMaxListeners</span><span class="hl-1">(</span><span class="hl-7">et</span><span class="hl-1">)); </span><span class="hl-5">// 11</span><br/><span class="hl-1">}</span>
615
- </code><button>Copy</button></pre>
616
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v19.9.0</p>
617
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#getMaxListeners-2">getMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:365</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="isDisturbed" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>is<wbr/>Disturbed</span><a href="#isDisturbed" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="isDisturbed.isDisturbed-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Disturbed</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">stream</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isDisturbed.isDisturbed-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns whether the stream has been read from or cancelled.</p>
618
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">stream</span>: <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a><span class="tsd-signature-symbol"> | </span><a href="../interfaces/_internal_.ReadableStream-1.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v16.8.0</p>
619
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#isDisturbed">isDisturbed</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:65</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="listenerCount-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span class="deprecated">listener<wbr/>Count</span><a href="#listenerCount-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="listenerCount-2.listenerCount-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">listener<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#listenerCount-2.listenerCount-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>A class method that returns the number of listeners for the given <code>eventName</code> registered on the given <code>emitter</code>.</p>
620
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">listenerCount</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">myEmitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">myEmitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">, () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {});</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-0">listenerCount</span><span class="hl-1">(</span><span class="hl-7">myEmitter</span><span class="hl-1">, </span><span class="hl-2">&#39;event&#39;</span><span class="hl-1">));</span><br/><span class="hl-5">// Prints: 2</span>
621
- </code><button>Copy</button></pre>
622
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The emitter to query</p>
623
- </div><div class="tsd-comment tsd-typography"></div></li><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 event name</p>
624
- </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"><h4>Since</h4><p>v0.9.12</p>
625
- <h4>Deprecated</h4><p>Since v3.2.0 - Use <code>listenerCount</code> instead.</p>
626
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#listenerCount-2">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:308</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="on-9" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>on</span><a href="#on-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="on-9.on-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#on-9.on-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">on</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// Emit later on</span><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">for</span><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">event</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// The execution of this inner block is synchronous and it</span><br/><span class="hl-1"> </span><span class="hl-5">// processes one event at a time (even with await). Do not use</span><br/><span class="hl-1"> </span><span class="hl-5">// if concurrent execution is required.</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">event</span><span class="hl-1">); </span><span class="hl-5">// prints [&#39;bar&#39;] [42]</span><br/><span class="hl-1">}</span><br/><span class="hl-5">// Unreachable here</span>
627
- </code><button>Copy</button></pre>
628
- <p>Returns an <code>AsyncIterator</code> that iterates <code>eventName</code> events. It will throw
629
- if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code>. It removes all listeners when
630
- exiting the loop. The <code>value</code> returned by each iteration is an array
631
- composed of the emitted event arguments.</p>
632
- <p>An <code>AbortSignal</code> can be used to cancel waiting on events:</p>
633
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">on</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ac</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AbortController</span><span class="hl-1">();</span><br/><br/><span class="hl-1">(</span><span class="hl-3">async</span><span class="hl-1"> () </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-1"> </span><span class="hl-5">// Emit later on</span><br/><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;bar&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1"> });</span><br/><br/><span class="hl-1"> </span><span class="hl-6">for</span><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> (</span><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">event</span><span class="hl-1"> </span><span class="hl-3">of</span><span class="hl-1"> </span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, { </span><span class="hl-7">signal:</span><span class="hl-1"> </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-7">signal</span><span class="hl-1"> })) {</span><br/><span class="hl-1"> </span><span class="hl-5">// The execution of this inner block is synchronous and it</span><br/><span class="hl-1"> </span><span class="hl-5">// processes one event at a time (even with await). Do not use</span><br/><span class="hl-1"> </span><span class="hl-5">// if concurrent execution is required.</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">event</span><span class="hl-1">); </span><span class="hl-5">// prints [&#39;bar&#39;] [42]</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> </span><span class="hl-5">// Unreachable here</span><br/><span class="hl-1">})();</span><br/><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-0">abort</span><span class="hl-1">());</span>
634
- </code><button>Copy</button></pre>
635
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span></li><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>
636
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p>An <code>AsyncIterator</code> that iterates <code>eventName</code> events emitted by the <code>emitter</code></p>
637
- <div class="tsd-comment tsd-typography"><h4>Since</h4><p>v13.6.0, v12.16.0</p>
638
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on-9">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:281</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="on-9.on-11" class="tsd-anchor"></a><span class="tsd-kind-call-signature">on</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#on-9.on-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.AsyncIterableIterator.html" class="tsd-signature-type tsd-kind-interface">AsyncIterableIterator</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#on-9">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:286</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="once-9" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>once</span><a href="#once-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="once-9.once-10" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#once-9.once-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a <code>Promise</code> that is fulfilled when the <code>EventEmitter</code> emits the given
639
- event or that is rejected if the <code>EventEmitter</code> emits <code>&#39;error&#39;</code> while waiting.
640
- The <code>Promise</code> will resolve with an array of all the arguments emitted to the
641
- given event.</p>
642
- <p>This method is intentionally generic and works with the web platform <a href="https://dom.spec.whatwg.org/#interface-eventtarget">EventTarget</a> interface, which has no special<code>&#39;error&#39;</code> event
643
- semantics and does not listen to the <code>&#39;error&#39;</code> event.</p>
644
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">once</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">import</span><span class="hl-1"> </span><span class="hl-7">process</span><span class="hl-1"> </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:process&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">, </span><span class="hl-9">42</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> [</span><span class="hl-4">value</span><span class="hl-1">] = </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-7">value</span><span class="hl-1">);</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">err</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">&#39;kaboom&#39;</span><span class="hl-1">);</span><br/><span class="hl-7">process</span><span class="hl-1">.</span><span class="hl-0">nextTick</span><span class="hl-1">(() </span><span class="hl-3">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">);</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;myevent&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">} </span><span class="hl-6">catch</span><span class="hl-1"> (</span><span class="hl-7">err</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;error happened&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">);</span><br/><span class="hl-1">}</span>
645
- </code><button>Copy</button></pre>
646
- <p>The special handling of the <code>&#39;error&#39;</code> event is only used when <code>events.once()</code> is used to wait for another event. If <code>events.once()</code> is used to wait for the
647
- &#39;<code>error&#39;</code> event itself, then it is treated as any other kind of event without
648
- special handling:</p>
649
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">once</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">)</span><br/><span class="hl-1"> .</span><span class="hl-0">then</span><span class="hl-1">(([</span><span class="hl-7">err</span><span class="hl-1">]) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;ok&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">))</span><br/><span class="hl-1"> .</span><span class="hl-0">catch</span><span class="hl-1">((</span><span class="hl-7">err</span><span class="hl-1">) </span><span class="hl-3">=&gt;</span><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-7">err</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">));</span><br/><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;error&#39;</span><span class="hl-1">, </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">&#39;boom&#39;</span><span class="hl-1">));</span><br/><br/><span class="hl-5">// Prints: ok boom</span>
650
- </code><button>Copy</button></pre>
651
- <p>An <code>AbortSignal</code> can be used to cancel waiting for the event:</p>
652
- <pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">EventEmitter</span><span class="hl-1">, </span><span class="hl-7">once</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ee</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">ac</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">AbortController</span><span class="hl-1">();</span><br/><br/><span class="hl-3">async</span><span class="hl-1"> </span><span class="hl-3">function</span><span class="hl-1"> </span><span class="hl-0">foo</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">, </span><span class="hl-7">event</span><span class="hl-1">, </span><span class="hl-7">signal</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-6">await</span><span class="hl-1"> </span><span class="hl-0">once</span><span class="hl-1">(</span><span class="hl-7">emitter</span><span class="hl-1">, </span><span class="hl-7">event</span><span class="hl-1">, { </span><span class="hl-7">signal</span><span class="hl-1"> });</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;event emitted!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-6">catch</span><span class="hl-1"> (</span><span class="hl-7">error</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-6">if</span><span class="hl-1"> (</span><span class="hl-7">error</span><span class="hl-1">.</span><span class="hl-7">name</span><span class="hl-1"> === </span><span class="hl-2">&#39;AbortError&#39;</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;Waiting for the event was canceled!&#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> } </span><span class="hl-6">else</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-7">console</span><span class="hl-1">.</span><span class="hl-0">error</span><span class="hl-1">(</span><span class="hl-2">&#39;There was an error&#39;</span><span class="hl-1">, </span><span class="hl-7">error</span><span class="hl-1">.</span><span class="hl-7">message</span><span class="hl-1">);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-0">foo</span><span class="hl-1">(</span><span class="hl-7">ee</span><span class="hl-1">, </span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">, </span><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-7">signal</span><span class="hl-1">);</span><br/><span class="hl-7">ac</span><span class="hl-1">.</span><span class="hl-0">abort</span><span class="hl-1">(); </span><span class="hl-5">// Abort waiting for the event</span><br/><span class="hl-7">ee</span><span class="hl-1">.</span><span class="hl-0">emit</span><span class="hl-1">(</span><span class="hl-2">&#39;foo&#39;</span><span class="hl-1">); </span><span class="hl-5">// Prints: Waiting for the event was canceled!</span>
653
- </code><button>Copy</button></pre>
654
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span></span></li><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><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/_internal_.Pick.html" class="tsd-signature-type tsd-kind-type-alias">Pick</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">&quot;signal&quot;</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v11.13.0, v10.16.0</p>
655
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once-9">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:216</li></ul></aside></li><li class="tsd-signature tsd-anchor-link"><a id="once-9.once-11" class="tsd-anchor"></a><span class="tsd-kind-call-signature">once</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">emitter</span>, <span class="tsd-kind-parameter">eventName</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#once-9.once-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">emitter</span>: <span class="tsd-signature-type">EventTarget</span></span></li><li><span><span class="tsd-kind-parameter">eventName</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../interfaces/_internal_.StaticEventEmitterOptions.html" class="tsd-signature-type tsd-kind-interface">StaticEventEmitterOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#once-9">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:221</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="setMaxListeners-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>set<wbr/>Max<wbr/>Listeners</span><a href="#setMaxListeners-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="setMaxListeners-2.setMaxListeners-3" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Max<wbr/>Listeners</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">n</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">eventTargets</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setMaxListeners-2.setMaxListeners-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-6">import</span><span class="hl-1"> { </span><span class="hl-7">setMaxListeners</span><span class="hl-1">, </span><span class="hl-7">EventEmitter</span><span class="hl-1"> } </span><span class="hl-6">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:events&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">target</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventTarget</span><span class="hl-1">();</span><br/><span class="hl-3">const</span><span class="hl-1"> </span><span class="hl-4">emitter</span><span class="hl-1"> = </span><span class="hl-3">new</span><span class="hl-1"> </span><span class="hl-0">EventEmitter</span><span class="hl-1">();</span><br/><br/><span class="hl-0">setMaxListeners</span><span class="hl-1">(</span><span class="hl-9">5</span><span class="hl-1">, </span><span class="hl-7">target</span><span class="hl-1">, </span><span class="hl-7">emitter</span><span class="hl-1">);</span>
656
- </code><button>Copy</button></pre>
657
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">n</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>A non-negative number. The maximum number of listeners per <code>EventTarget</code> event.</p>
658
- </div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">eventTargets</span>: <span class="tsd-signature-symbol">(</span><a href="../interfaces/_internal_.EventEmitter-2.html" class="tsd-signature-type tsd-kind-interface">EventEmitter</a><span class="tsd-signature-symbol">&lt;</span><a href="../types/_internal_.DefaultEventMap.html" class="tsd-signature-type tsd-kind-type-alias">DefaultEventMap</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v15.4.0</p>
659
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#setMaxListeners-2">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:380</li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="toWeb" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>to<wbr/>Web</span><a href="#toWeb" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures tsd-is-inherited tsd-is-external"><li class="tsd-signature tsd-anchor-link"><a id="toWeb.toWeb-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">to<wbr/>Web</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">streamReadable</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#toWeb.toWeb-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><code class="tsd-tag ts-flagExperimental">Experimental</code> <div class="tsd-comment tsd-typography"><p>A utility method for creating a web <code>ReadableStream</code> from a <code>Readable</code>.</p>
660
- </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">streamReadable</span>: <a href="_internal_.Readable.html" class="tsd-signature-type tsd-kind-class">Readable</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../interfaces/_internal_.ReadableStream.html" class="tsd-signature-type tsd-kind-interface">ReadableStream</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4>Since</h4><p>v17.0.0</p>
661
- </div><aside class="tsd-sources"><p>Inherited from <a href="_internal_.Readable.html">Readable</a>.<a href="_internal_.Readable.html#toWeb">toWeb</a></p><ul><li>Defined in node_modules/@types/node/stream.d.ts:984</li></ul></aside></li></ul></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><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-private" name="private"/><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>Private</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></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><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-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#constructor" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a><a href="#aborted" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>aborted</span></a><a href="#closed" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>closed</span></a><a href="#complete" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>complete</span></a><a href="#connection" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>connection</span></a><a href="#destroyed" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>destroyed</span></a><a href="#errored" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>errored</span></a><a href="#headers" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>headers</span></a><a href="#headersDistinct" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>headers<wbr/>Distinct</span></a><a href="#httpVersion" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version</span></a><a href="#httpVersionMajor" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version<wbr/>Major</span></a><a href="#httpVersionMinor" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Version<wbr/>Minor</span></a><a href="#method" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>method</span></a><a href="#rawHeaders" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>raw<wbr/>Headers</span></a><a href="#rawTrailers" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>raw<wbr/>Trailers</span></a><a href="#readable" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable</span></a><a href="#readableAborted" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Aborted</span></a><a href="#readableDidRead" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Did<wbr/>Read</span></a><a href="#readableEncoding" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Encoding</span></a><a href="#readableEnded" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Ended</span></a><a href="#readableFlowing" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Flowing</span></a><a href="#readableHighWaterMark" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>High<wbr/>Water<wbr/>Mark</span></a><a href="#readableLength" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Length</span></a><a href="#readableObjectMode" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>readable<wbr/>Object<wbr/>Mode</span></a><a href="#socket" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>socket</span></a><a href="#statusCode" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>status<wbr/>Code</span></a><a href="#statusMessage" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>status<wbr/>Message</span></a><a href="#trailers" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trailers</span></a><a href="#trailersDistinct" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>trailers<wbr/>Distinct</span></a><a href="#url" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>url</span></a><a href="#captureRejectionSymbol" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejection<wbr/>Symbol</span></a><a href="#captureRejections" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>capture<wbr/>Rejections</span></a><a href="#defaultMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>default<wbr/>Max<wbr/>Listeners</span></a><a href="#errorMonitor" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error<wbr/>Monitor</span></a><a href="#_asyncDispose_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Dispose]</span></a><a href="#_asyncIterator_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[async<wbr/>Iterator]</span></a><a href="#_captureRejectionSymbol_" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>[capture<wbr/>Rejection<wbr/>Symbol]</span></a><a href="#_construct" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_construct</span></a><a href="#_destroy" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_destroy</span></a><a href="#_read" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>_read</span></a><a href="#addListener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Listener</span></a><a href="#asIndexedPairs" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>as<wbr/>Indexed<wbr/>Pairs</span></a><a href="#compose" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compose</span></a><a href="#destroy" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a><a href="#drop" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>drop</span></a><a href="#emit" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><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"><use href="../assets/icons.svg#icon-2048"></use></svg><span>event<wbr/>Names</span></a><a href="#every" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>every</span></a><a href="#filter" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>filter</span></a><a href="#find" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>find</span></a><a href="#flatMap" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flat<wbr/>Map</span></a><a href="#forEach" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>for<wbr/>Each</span></a><a href="#getMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a><a href="#isPaused" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Paused</span></a><a href="#iterator" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>iterator</span></a><a href="#listenerCount" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><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"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listeners</span></a><a href="#map" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map</span></a><a href="#off" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>off</span></a><a href="#on" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><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"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a><a href="#pause" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause</span></a><a href="#pipe" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pipe</span></a><a href="#prependListener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><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"><use href="../assets/icons.svg#icon-2048"></use></svg><span>prepend<wbr/>Once<wbr/>Listener</span></a><a href="#push" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>push</span></a><a href="#rawListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>raw<wbr/>Listeners</span></a><a href="#read" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>read</span></a><a href="#reduce" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reduce</span></a><a href="#removeAllListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><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"><use href="../assets/icons.svg#icon-2048"></use></svg><span>remove<wbr/>Listener</span></a><a href="#resume" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume</span></a><a href="#setEncoding" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Encoding</span></a><a href="#setMaxListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a><a href="#setTimeout" class="tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Timeout</span></a><a href="#some" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>some</span></a><a href="#take" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>take</span></a><a href="#toArray" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Array</span></a><a href="#unpipe" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unpipe</span></a><a href="#unshift" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>unshift</span></a><a href="#wrap" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>wrap</span></a><a href="#addAbortListener" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Abort<wbr/>Listener</span></a><a href="#from" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from</span></a><a href="#fromWeb" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>from<wbr/>Web</span></a><a href="#getEventListeners" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Event<wbr/>Listeners</span></a><a href="#getMaxListeners-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Max<wbr/>Listeners</span></a><a href="#isDisturbed" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Disturbed</span></a><a href="#listenerCount-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>listener<wbr/>Count</span></a><a href="#on-9" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>on</span></a><a href="#once-9" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>once</span></a><a href="#setMaxListeners-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Max<wbr/>Listeners</span></a><a href="#toWeb" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>to<wbr/>Web</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@codebolt/codeboltjs</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><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>