cloudstructs 0.6.37 → 0.6.39

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 (233) hide show
  1. package/.jsii +3 -3
  2. package/assets/slack-app/provider.lambda/index.js +12 -12
  3. package/assets/slack-textract/detect.lambda/index.js +24 -24
  4. package/assets/ssl-server-test/analyze.lambda/index.js +12 -12
  5. package/lib/codecommit-mirror/index.js +2 -2
  6. package/lib/dmarc/index.js +1 -1
  7. package/lib/ecs-service-roller/index.js +2 -2
  8. package/lib/email-receiver/receiver.js +1 -1
  9. package/lib/saml-identity-provider/index.js +2 -2
  10. package/lib/slack-app/manifest.js +1 -1
  11. package/lib/slack-app/slack-app.js +2 -2
  12. package/lib/slack-events/index.js +1 -1
  13. package/lib/slack-textract/index.js +1 -1
  14. package/lib/ssl-server-test/index.js +1 -1
  15. package/lib/state-machine-cr-provider/index.js +1 -1
  16. package/lib/static-website/index.js +1 -1
  17. package/lib/toolkit-cleaner/index.js +1 -1
  18. package/lib/url-shortener/index.js +1 -1
  19. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  20. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1 -1
  21. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +5 -0
  22. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +9 -1
  23. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +5 -0
  24. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +64 -0
  25. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +13 -1
  26. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +22 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +1 -1
  28. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -2
  29. package/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +17 -4
  30. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +6 -1
  31. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -7
  32. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +1 -1
  33. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +9 -0
  34. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +554 -144
  35. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +12 -2
  36. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +11 -0
  37. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  38. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  39. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  40. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  41. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  42. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  43. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  44. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  45. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  46. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  47. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  48. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  49. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  50. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  51. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  52. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +14 -0
  53. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +75 -11
  54. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  55. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1 -1
  56. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +5 -0
  57. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +9 -1
  58. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +5 -0
  59. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +64 -0
  60. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +13 -1
  61. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +22 -0
  62. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +1 -1
  63. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -2
  64. package/node_modules/@slack/web-api/node_modules/@types/node/module.d.ts +17 -4
  65. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +6 -1
  66. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -7
  67. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +1 -1
  68. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +9 -0
  69. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +554 -144
  70. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +12 -2
  71. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +11 -0
  72. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  73. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  74. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  75. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  76. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  77. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  78. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  79. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  80. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  81. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  82. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  83. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  84. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  85. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  86. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  87. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +14 -0
  88. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +75 -11
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1 -1
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +5 -0
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +9 -1
  93. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +5 -0
  94. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +64 -0
  95. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +13 -1
  96. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +22 -0
  97. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +1 -1
  98. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +1 -2
  99. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +17 -4
  100. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +6 -1
  101. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -7
  102. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +1 -1
  103. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +9 -0
  104. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +554 -144
  105. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +12 -2
  106. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +11 -0
  107. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  108. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  109. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  110. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  111. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  112. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  113. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  114. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  115. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  116. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  117. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  118. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  119. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  120. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  121. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  122. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +14 -0
  123. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +75 -11
  124. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  125. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1 -1
  126. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +5 -0
  127. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +9 -1
  128. package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +5 -0
  129. package/node_modules/@types/is-stream/node_modules/@types/node/events.d.ts +64 -0
  130. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +13 -1
  131. package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +22 -0
  132. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +1 -1
  133. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +1 -2
  134. package/node_modules/@types/is-stream/node_modules/@types/node/module.d.ts +17 -4
  135. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +6 -1
  136. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -7
  137. package/node_modules/@types/is-stream/node_modules/@types/node/perf_hooks.d.ts +1 -1
  138. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +9 -0
  139. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +554 -144
  140. package/node_modules/@types/is-stream/node_modules/@types/node/timers.d.ts +12 -2
  141. package/node_modules/@types/is-stream/node_modules/@types/node/tls.d.ts +11 -0
  142. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  143. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  144. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  145. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  146. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  147. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  148. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  149. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  150. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  151. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  152. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  153. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  154. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  155. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  156. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  157. package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +14 -0
  158. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +75 -11
  159. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  160. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +1 -1
  161. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +5 -0
  162. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +9 -1
  163. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +5 -0
  164. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +64 -0
  165. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +13 -1
  166. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +22 -0
  167. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +1 -1
  168. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +1 -2
  169. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +17 -4
  170. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +6 -1
  171. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -7
  172. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +1 -1
  173. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +9 -0
  174. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +554 -144
  175. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +12 -2
  176. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +11 -0
  177. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  178. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  179. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  180. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  181. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  182. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  183. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  184. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  185. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  186. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  187. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  188. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  189. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  190. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  191. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  192. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +14 -0
  193. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +75 -11
  194. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  195. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +1 -1
  196. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +5 -0
  197. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +9 -1
  198. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +5 -0
  199. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +64 -0
  200. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +13 -1
  201. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +22 -0
  202. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +1 -1
  203. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +1 -2
  204. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +17 -4
  205. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +6 -1
  206. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -7
  207. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +1 -1
  208. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +9 -0
  209. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +554 -144
  210. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +12 -2
  211. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +11 -0
  212. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/child_process.d.ts +5 -0
  213. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/crypto.d.ts +9 -1
  214. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dgram.d.ts +5 -0
  215. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/events.d.ts +64 -0
  216. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/fs/promises.d.ts +15 -2
  217. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/globals.d.ts +22 -0
  218. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +1 -1
  219. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/module.d.ts +17 -4
  220. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/net.d.ts +6 -1
  221. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +766 -728
  222. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +553 -143
  223. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/timers.d.ts +12 -2
  224. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/tls.d.ts +11 -0
  225. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/url.d.ts +14 -0
  226. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/util.d.ts +75 -11
  227. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +14 -0
  228. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +75 -11
  229. package/node_modules/keyv/README.md +2 -0
  230. package/node_modules/keyv/package.json +12 -13
  231. package/node_modules/keyv/src/index.d.ts +6 -10
  232. package/node_modules/keyv/src/index.js +1 -1
  233. package/package.json +23 -22
@@ -68,6 +68,11 @@ declare module 'timers' {
68
68
  */
69
69
  hasRef(): boolean;
70
70
  _onImmediate: Function; // to distinguish it from the Timeout class
71
+ /**
72
+ * Cancels the immediate. This is similar to calling `clearImmediate()`.
73
+ * @since v20.5.0
74
+ */
75
+ [Symbol.dispose](): void;
71
76
  }
72
77
  /**
73
78
  * This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the
@@ -114,6 +119,11 @@ declare module 'timers' {
114
119
  */
115
120
  refresh(): this;
116
121
  [Symbol.toPrimitive](): number;
122
+ /**
123
+ * Cancels the timeout.
124
+ * @since v20.5.0
125
+ */
126
+ [Symbol.dispose](): void;
117
127
  }
118
128
  }
119
129
  /**
@@ -163,10 +173,10 @@ declare module 'timers' {
163
173
  * @param args Optional arguments to pass when the `callback` is called.
164
174
  * @return for use with {@link clearInterval}
165
175
  */
166
- function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
176
+ function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
167
177
  // util.promisify no rest args compability
168
178
  // tslint:disable-next-line void-return
169
- function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timer;
179
+ function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;
170
180
  namespace setInterval {
171
181
  const __promisify__: typeof setIntervalPromise;
172
182
  }
@@ -728,6 +728,17 @@ declare module 'tls' {
728
728
  }
729
729
  type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
730
730
  interface SecureContextOptions {
731
+ /**
732
+ * If set, this will be called when a client opens a connection using the ALPN extension.
733
+ * One argument will be passed to the callback: an object containing `servername` and `protocols` fields,
734
+ * respectively containing the server name from the SNI extension (if any) and an array of
735
+ * ALPN protocol name strings. The callback must return either one of the strings listed in `protocols`,
736
+ * which will be returned to the client as the selected ALPN protocol, or `undefined`,
737
+ * to reject the connection with a fatal alert. If a string is returned that does not match one of
738
+ * the client's ALPN protocols, an error will be thrown.
739
+ * This option cannot be used with the `ALPNProtocols` option, and setting both options will throw an error.
740
+ */
741
+ ALPNCallback?: ((arg: { servername: string; protocols: string[] }) => string | undefined) | undefined;
731
742
  /**
732
743
  * Optionally override the trusted CA certificates. Default is to trust
733
744
  * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
@@ -394,6 +394,20 @@ declare module 'url' {
394
394
  * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
395
395
  */
396
396
  static revokeObjectURL(objectUrl: string): void;
397
+ /**
398
+ * Checks if an `input` relative to the `base` can be parsed to a `URL`.
399
+ *
400
+ * ```js
401
+ * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
402
+ *
403
+ * const isNotValid = URL.canParse('/foo'); // false
404
+ * ```
405
+ * @since v19.9.0
406
+ * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
407
+ * `converted to a string` first.
408
+ * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
409
+ */
410
+ static canParse(input: string, base?: string): boolean;
397
411
  constructor(input: string, base?: string | URL);
398
412
  /**
399
413
  * Gets and sets the fragment portion of the URL.
@@ -1460,32 +1460,72 @@ declare module 'util' {
1460
1460
 
1461
1461
  /**
1462
1462
  * Gets and sets the type portion of the MIME.
1463
+ *
1464
+ * ```js
1465
+ * import { MIMEType } from 'node:util';
1466
+ *
1467
+ * const myMIME = new MIMEType('text/javascript');
1468
+ * console.log(myMIME.type);
1469
+ * // Prints: text
1470
+ * myMIME.type = 'application';
1471
+ * console.log(myMIME.type);
1472
+ * // Prints: application
1473
+ * console.log(String(myMIME));
1474
+ * // Prints: application/javascript
1475
+ * ```
1463
1476
  */
1464
1477
  type: string;
1465
1478
  /**
1466
1479
  * Gets and sets the subtype portion of the MIME.
1480
+ *
1481
+ * ```js
1482
+ * import { MIMEType } from 'node:util';
1483
+ *
1484
+ * const myMIME = new MIMEType('text/ecmascript');
1485
+ * console.log(myMIME.subtype);
1486
+ * // Prints: ecmascript
1487
+ * myMIME.subtype = 'javascript';
1488
+ * console.log(myMIME.subtype);
1489
+ * // Prints: javascript
1490
+ * console.log(String(myMIME));
1491
+ * // Prints: text/javascript
1492
+ * ```
1467
1493
  */
1468
1494
  subtype: string;
1469
1495
  /**
1470
- * Gets the essence of the MIME.
1471
- *
1496
+ * Gets the essence of the MIME. This property is read only.
1472
1497
  * Use `mime.type` or `mime.subtype` to alter the MIME.
1498
+ *
1499
+ * ```js
1500
+ * import { MIMEType } from 'node:util';
1501
+ *
1502
+ * const myMIME = new MIMEType('text/javascript;key=value');
1503
+ * console.log(myMIME.essence);
1504
+ * // Prints: text/javascript
1505
+ * myMIME.type = 'application';
1506
+ * console.log(myMIME.essence);
1507
+ * // Prints: application/javascript
1508
+ * console.log(String(myMIME));
1509
+ * // Prints: application/javascript;key=value
1510
+ * ```
1473
1511
  */
1474
1512
  readonly essence: string;
1475
1513
  /**
1476
- * Gets the `MIMEParams` object representing the parameters of the MIME.
1514
+ * Gets the `MIMEParams` object representing the
1515
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
1477
1516
  */
1478
1517
  readonly params: MIMEParams;
1479
1518
  /**
1480
- * Returns the serialized MIME.
1519
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
1481
1520
  *
1482
- * Because of the need for standard compliance, this method
1483
- * does not allow users to customize the serialization process of the MIME.
1521
+ * Because of the need for standard compliance, this method does not allow users
1522
+ * to customize the serialization process of the MIME.
1484
1523
  */
1485
1524
  toString(): string;
1486
1525
  }
1487
1526
  /**
1488
- * @since v18.13.0
1527
+ * The `MIMEParams` API provides read and write access to the parameters of a`MIMEType`.
1528
+ * @since v19.1.0, v18.13.0
1489
1529
  */
1490
1530
  export class MIMEParams {
1491
1531
  /**
@@ -1494,11 +1534,14 @@ declare module 'util' {
1494
1534
  delete(name: string): void;
1495
1535
  /**
1496
1536
  * Returns an iterator over each of the name-value pairs in the parameters.
1537
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
1538
+ * is the `name`, the second item of the array is the `value`.
1497
1539
  */
1498
1540
  entries(): IterableIterator<[string, string]>;
1499
1541
  /**
1500
- * Returns the value of the first name-value pair whose name is `name`.
1501
- * If there are no such pairs, `null` is returned.
1542
+ * Returns the value of the first name-value pair whose name is `name`. If there
1543
+ * are no such pairs, `null` is returned.
1544
+ * @return or `null` if there is no name-value pair with the given `name`.
1502
1545
  */
1503
1546
  get(name: string): string | null;
1504
1547
  /**
@@ -1507,12 +1550,33 @@ declare module 'util' {
1507
1550
  has(name: string): boolean;
1508
1551
  /**
1509
1552
  * Returns an iterator over the names of each name-value pair.
1553
+ *
1554
+ * ```js
1555
+ * import { MIMEType } from 'node:util';
1556
+ *
1557
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1558
+ * for (const name of params.keys()) {
1559
+ * console.log(name);
1560
+ * }
1561
+ * // Prints:
1562
+ * // foo
1563
+ * // bar
1564
+ * ```
1510
1565
  */
1511
1566
  keys(): IterableIterator<string>;
1512
1567
  /**
1513
- * Sets the value in the `MIMEParams` object associated with `name` to `value`.
1514
- * If there are any pre-existing name-value pairs whose names are `name`,
1568
+ * Sets the value in the `MIMEParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
1515
1569
  * set the first such pair's value to `value`.
1570
+ *
1571
+ * ```js
1572
+ * import { MIMEType } from 'node:util';
1573
+ *
1574
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1575
+ * params.set('foo', 'def');
1576
+ * params.set('baz', 'xyz');
1577
+ * console.log(params.toString());
1578
+ * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
1579
+ * ```
1516
1580
  */
1517
1581
  set(name: string, value: string): void;
1518
1582
  /**
@@ -394,6 +394,20 @@ declare module 'url' {
394
394
  * @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
395
395
  */
396
396
  static revokeObjectURL(objectUrl: string): void;
397
+ /**
398
+ * Checks if an `input` relative to the `base` can be parsed to a `URL`.
399
+ *
400
+ * ```js
401
+ * const isValid = URL.canParse('/foo', 'https://example.org/'); // true
402
+ *
403
+ * const isNotValid = URL.canParse('/foo'); // false
404
+ * ```
405
+ * @since v19.9.0
406
+ * @param input The absolute or relative input URL to parse. If `input` is relative, then `base` is required. If `input` is absolute, the `base` is ignored. If `input` is not a string, it is
407
+ * `converted to a string` first.
408
+ * @param base The base URL to resolve against if the `input` is not absolute. If `base` is not a string, it is `converted to a string` first.
409
+ */
410
+ static canParse(input: string, base?: string): boolean;
397
411
  constructor(input: string, base?: string | URL);
398
412
  /**
399
413
  * Gets and sets the fragment portion of the URL.
@@ -1460,32 +1460,72 @@ declare module 'util' {
1460
1460
 
1461
1461
  /**
1462
1462
  * Gets and sets the type portion of the MIME.
1463
+ *
1464
+ * ```js
1465
+ * import { MIMEType } from 'node:util';
1466
+ *
1467
+ * const myMIME = new MIMEType('text/javascript');
1468
+ * console.log(myMIME.type);
1469
+ * // Prints: text
1470
+ * myMIME.type = 'application';
1471
+ * console.log(myMIME.type);
1472
+ * // Prints: application
1473
+ * console.log(String(myMIME));
1474
+ * // Prints: application/javascript
1475
+ * ```
1463
1476
  */
1464
1477
  type: string;
1465
1478
  /**
1466
1479
  * Gets and sets the subtype portion of the MIME.
1480
+ *
1481
+ * ```js
1482
+ * import { MIMEType } from 'node:util';
1483
+ *
1484
+ * const myMIME = new MIMEType('text/ecmascript');
1485
+ * console.log(myMIME.subtype);
1486
+ * // Prints: ecmascript
1487
+ * myMIME.subtype = 'javascript';
1488
+ * console.log(myMIME.subtype);
1489
+ * // Prints: javascript
1490
+ * console.log(String(myMIME));
1491
+ * // Prints: text/javascript
1492
+ * ```
1467
1493
  */
1468
1494
  subtype: string;
1469
1495
  /**
1470
- * Gets the essence of the MIME.
1471
- *
1496
+ * Gets the essence of the MIME. This property is read only.
1472
1497
  * Use `mime.type` or `mime.subtype` to alter the MIME.
1498
+ *
1499
+ * ```js
1500
+ * import { MIMEType } from 'node:util';
1501
+ *
1502
+ * const myMIME = new MIMEType('text/javascript;key=value');
1503
+ * console.log(myMIME.essence);
1504
+ * // Prints: text/javascript
1505
+ * myMIME.type = 'application';
1506
+ * console.log(myMIME.essence);
1507
+ * // Prints: application/javascript
1508
+ * console.log(String(myMIME));
1509
+ * // Prints: application/javascript;key=value
1510
+ * ```
1473
1511
  */
1474
1512
  readonly essence: string;
1475
1513
  /**
1476
- * Gets the `MIMEParams` object representing the parameters of the MIME.
1514
+ * Gets the `MIMEParams` object representing the
1515
+ * parameters of the MIME. This property is read-only. See `MIMEParams` documentation for details.
1477
1516
  */
1478
1517
  readonly params: MIMEParams;
1479
1518
  /**
1480
- * Returns the serialized MIME.
1519
+ * The `toString()` method on the `MIMEType` object returns the serialized MIME.
1481
1520
  *
1482
- * Because of the need for standard compliance, this method
1483
- * does not allow users to customize the serialization process of the MIME.
1521
+ * Because of the need for standard compliance, this method does not allow users
1522
+ * to customize the serialization process of the MIME.
1484
1523
  */
1485
1524
  toString(): string;
1486
1525
  }
1487
1526
  /**
1488
- * @since v18.13.0
1527
+ * The `MIMEParams` API provides read and write access to the parameters of a`MIMEType`.
1528
+ * @since v19.1.0, v18.13.0
1489
1529
  */
1490
1530
  export class MIMEParams {
1491
1531
  /**
@@ -1494,11 +1534,14 @@ declare module 'util' {
1494
1534
  delete(name: string): void;
1495
1535
  /**
1496
1536
  * Returns an iterator over each of the name-value pairs in the parameters.
1537
+ * Each item of the iterator is a JavaScript `Array`. The first item of the array
1538
+ * is the `name`, the second item of the array is the `value`.
1497
1539
  */
1498
1540
  entries(): IterableIterator<[name: string, value: string]>;
1499
1541
  /**
1500
- * Returns the value of the first name-value pair whose name is `name`.
1501
- * If there are no such pairs, `null` is returned.
1542
+ * Returns the value of the first name-value pair whose name is `name`. If there
1543
+ * are no such pairs, `null` is returned.
1544
+ * @return or `null` if there is no name-value pair with the given `name`.
1502
1545
  */
1503
1546
  get(name: string): string | null;
1504
1547
  /**
@@ -1507,12 +1550,33 @@ declare module 'util' {
1507
1550
  has(name: string): boolean;
1508
1551
  /**
1509
1552
  * Returns an iterator over the names of each name-value pair.
1553
+ *
1554
+ * ```js
1555
+ * import { MIMEType } from 'node:util';
1556
+ *
1557
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1558
+ * for (const name of params.keys()) {
1559
+ * console.log(name);
1560
+ * }
1561
+ * // Prints:
1562
+ * // foo
1563
+ * // bar
1564
+ * ```
1510
1565
  */
1511
1566
  keys(): IterableIterator<string>;
1512
1567
  /**
1513
- * Sets the value in the `MIMEParams` object associated with `name` to `value`.
1514
- * If there are any pre-existing name-value pairs whose names are `name`,
1568
+ * Sets the value in the `MIMEParams` object associated with `name` to`value`. If there are any pre-existing name-value pairs whose names are `name`,
1515
1569
  * set the first such pair's value to `value`.
1570
+ *
1571
+ * ```js
1572
+ * import { MIMEType } from 'node:util';
1573
+ *
1574
+ * const { params } = new MIMEType('text/plain;foo=0;bar=1');
1575
+ * params.set('foo', 'def');
1576
+ * params.set('baz', 'xyz');
1577
+ * console.log(params.toString());
1578
+ * // Prints: foo=def&#x26;bar=1&#x26;baz=xyz
1579
+ * ```
1516
1580
  */
1517
1581
  set(name: string, value: string): void;
1518
1582
  /**
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 13 Jun 2023 02:32:48 GMT
11
+ * Last updated: Sun, 13 Aug 2023 19:32:51 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
@@ -530,7 +530,7 @@ declare module 'buffer' {
530
530
  * @param [fill=0] A value to pre-fill the new `Buffer` with.
531
531
  * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
532
532
  */
533
- alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
533
+ alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
534
534
  /**
535
535
  * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
536
536
  *
@@ -302,6 +302,11 @@ declare module 'child_process' {
302
302
  * @since v0.1.90
303
303
  */
304
304
  kill(signal?: NodeJS.Signals | number): boolean;
305
+ /**
306
+ * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
307
+ * @since v20.5.0
308
+ */
309
+ [Symbol.dispose](): void;
305
310
  /**
306
311
  * When an IPC channel has been established between the parent and child (
307
312
  * i.e. when using {@link fork}), the `subprocess.send()` method can
@@ -1516,10 +1516,15 @@ declare module 'crypto' {
1516
1516
  class DiffieHellman {
1517
1517
  private constructor();
1518
1518
  /**
1519
- * Generates private and public Diffie-Hellman key values, and returns
1519
+ * Generates private and public Diffie-Hellman key values unless they have been
1520
+ * generated or computed already, and returns
1520
1521
  * the public key in the specified `encoding`. This key should be
1521
1522
  * transferred to the other party.
1522
1523
  * If `encoding` is provided a string is returned; otherwise a `Buffer` is returned.
1524
+ *
1525
+ * This function is a thin wrapper around [`DH_generate_key()`](https://www.openssl.org/docs/man3.0/man3/DH_generate_key.html). In particular,
1526
+ * once a private key has been generated or set, calling this function only updates
1527
+ * the public key but does not generate a new private key.
1523
1528
  * @since v0.5.0
1524
1529
  * @param encoding The `encoding` of the return value.
1525
1530
  */
@@ -1591,6 +1596,9 @@ declare module 'crypto' {
1591
1596
  * Sets the Diffie-Hellman private key. If the `encoding` argument is provided,`privateKey` is expected
1592
1597
  * to be a string. If no `encoding` is provided, `privateKey` is expected
1593
1598
  * to be a `Buffer`, `TypedArray`, or `DataView`.
1599
+ *
1600
+ * This function does not automatically compute the associated public key. Either `diffieHellman.setPublicKey()` or `diffieHellman.generateKeys()` can be
1601
+ * used to manually provide the public key or to automatically derive it.
1594
1602
  * @since v0.5.0
1595
1603
  * @param encoding The `encoding` of the `privateKey` string.
1596
1604
  */
@@ -538,6 +538,11 @@ declare module 'dgram' {
538
538
  prependOnceListener(event: 'error', listener: (err: Error) => void): this;
539
539
  prependOnceListener(event: 'listening', listener: () => void): this;
540
540
  prependOnceListener(event: 'message', listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
541
+ /**
542
+ * Calls `socket.close()` and returns a promise that fulfills when the socket has closed.
543
+ * @since v20.5.0
544
+ */
545
+ [Symbol.asyncDispose](): Promise<void>;
541
546
  }
542
547
  }
543
548
  declare module 'node:dgram' {
@@ -294,6 +294,35 @@ declare module 'events' {
294
294
  * @since v15.2.0, v14.17.0
295
295
  */
296
296
  static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
297
+ /**
298
+ * Returns the currently set max amount of listeners.
299
+ *
300
+ * For `EventEmitter`s this behaves exactly the same as calling `.getMaxListeners` on
301
+ * the emitter.
302
+ *
303
+ * For `EventTarget`s this is the only way to get the max event listeners for the
304
+ * event target. If the number of event handlers on a single EventTarget exceeds
305
+ * the max set, the EventTarget will print a warning.
306
+ *
307
+ * ```js
308
+ * import { getMaxListeners, setMaxListeners, EventEmitter } from 'node:events';
309
+ *
310
+ * {
311
+ * const ee = new EventEmitter();
312
+ * console.log(getMaxListeners(ee)); // 10
313
+ * setMaxListeners(11, ee);
314
+ * console.log(getMaxListeners(ee)); // 11
315
+ * }
316
+ * {
317
+ * const et = new EventTarget();
318
+ * console.log(getMaxListeners(et)); // 10
319
+ * setMaxListeners(11, et);
320
+ * console.log(getMaxListeners(et)); // 11
321
+ * }
322
+ * ```
323
+ * @since v19.9.0
324
+ */
325
+ static getMaxListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter): number;
297
326
  /**
298
327
  * ```js
299
328
  * import { setMaxListeners, EventEmitter } from 'node:events';
@@ -309,6 +338,41 @@ declare module 'events' {
309
338
  * objects.
310
339
  */
311
340
  static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
341
+ /**
342
+ * Listens once to the `abort` event on the provided `signal`.
343
+ *
344
+ * Listening to the `abort` event on abort signals is unsafe and may
345
+ * lead to resource leaks since another third party with the signal can
346
+ * call `e.stopImmediatePropagation()`. Unfortunately Node.js cannot change
347
+ * this since it would violate the web standard. Additionally, the original
348
+ * API makes it easy to forget to remove listeners.
349
+ *
350
+ * This API allows safely using `AbortSignal`s in Node.js APIs by solving these
351
+ * two issues by listening to the event such that `stopImmediatePropagation` does
352
+ * not prevent the listener from running.
353
+ *
354
+ * Returns a disposable so that it may be unsubscribed from more easily.
355
+ *
356
+ * ```js
357
+ * import { addAbortListener } from 'node:events';
358
+ *
359
+ * function example(signal) {
360
+ * let disposable;
361
+ * try {
362
+ * signal.addEventListener('abort', (e) => e.stopImmediatePropagation());
363
+ * disposable = addAbortListener(signal, (e) => {
364
+ * // Do something when signal is aborted.
365
+ * });
366
+ * } finally {
367
+ * disposable?.[Symbol.dispose]();
368
+ * }
369
+ * }
370
+ * ```
371
+ * @since v20.5.0
372
+ * @experimental
373
+ * @return that removes the `abort` listener.
374
+ */
375
+ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;
312
376
  /**
313
377
  * This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called.
314
378
  *
@@ -82,6 +82,13 @@ declare module 'fs/promises' {
82
82
  emitClose?: boolean | undefined;
83
83
  start?: number | undefined;
84
84
  }
85
+ interface ReadableWebStreamOptions {
86
+ /**
87
+ * Whether to open a normal or a `'bytes'` stream.
88
+ * @since v20.0.0
89
+ */
90
+ type?: 'bytes' | undefined;
91
+ }
85
92
  // TODO: Add `EventEmitter` close
86
93
  interface FileHandle {
87
94
  /**
@@ -240,7 +247,7 @@ declare module 'fs/promises' {
240
247
  * @since v17.0.0
241
248
  * @experimental
242
249
  */
243
- readableWebStream(): ReadableStream;
250
+ readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
244
251
  /**
245
252
  * Asynchronously reads the entire contents of a file.
246
253
  *
@@ -449,6 +456,11 @@ declare module 'fs/promises' {
449
456
  * @return Fulfills with `undefined` upon success.
450
457
  */
451
458
  close(): Promise<void>;
459
+ /**
460
+ * An alias for {@link FileHandle.close()}.
461
+ * @since v20.4.0
462
+ */
463
+ [Symbol.asyncDispose](): Promise<void>;
452
464
  }
453
465
  const constants: typeof fsConstants;
454
466
  /**
@@ -84,6 +84,28 @@ declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal:
84
84
  };
85
85
  //#endregion borrowed
86
86
 
87
+ //#region Disposable
88
+ interface SymbolConstructor {
89
+ /**
90
+ * A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
91
+ */
92
+ readonly dispose: unique symbol;
93
+
94
+ /**
95
+ * A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
96
+ */
97
+ readonly asyncDispose: unique symbol;
98
+ }
99
+
100
+ interface Disposable {
101
+ [Symbol.dispose](): void;
102
+ }
103
+
104
+ interface AsyncDisposable {
105
+ [Symbol.asyncDispose](): PromiseLike<void>;
106
+ }
107
+ //#endregion Disposable
108
+
87
109
  //#region ArrayLike.at()
88
110
  interface RelativeIndexable<T> {
89
111
  /**
@@ -128,7 +128,7 @@ declare module 'http2' {
128
128
  * value will be `undefined` after the `Http2Stream` instance is destroyed.
129
129
  * @since v8.4.0
130
130
  */
131
- readonly session: Http2Session;
131
+ readonly session: Http2Session | undefined;
132
132
  /**
133
133
  * Provides miscellaneous information about the current state of the`Http2Stream`.
134
134
  *
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 20.3
1
+ // Type definitions for non-npm package Node.js 20.5
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -21,7 +21,6 @@
21
21
  // Nikita Galkin <https://github.com/galkin>
22
22
  // Parambir Singh <https://github.com/parambirs>
23
23
  // Sebastian Silbermann <https://github.com/eps1lon>
24
- // Simon Schick <https://github.com/SimonSchick>
25
24
  // Thomas den Hollander <https://github.com/ThomasdenH>
26
25
  // Wilco Bakker <https://github.com/WilcoBakker>
27
26
  // wwwy3y3 <https://github.com/wwwy3y3>
@@ -73,11 +73,24 @@ declare module 'module' {
73
73
  readonly payload: SourceMapPayload;
74
74
  constructor(payload: SourceMapPayload);
75
75
  /**
76
- * Given a line number and column number in the generated source file, returns
77
- * an object representing the position in the original file. The object returned
78
- * consists of the following keys:
76
+ * Given a line offset and column offset in the generated source
77
+ * file, returns an object representing the SourceMap range in the
78
+ * original file if found, or an empty object if not.
79
+ *
80
+ * The object returned contains the following keys:
81
+ *
82
+ * The returned value represents the raw range as it appears in the
83
+ * SourceMap, based on zero-indexed offsets, _not_ 1-indexed line and
84
+ * column numbers as they appear in Error messages and CallSite
85
+ * objects.
86
+ *
87
+ * To get the corresponding 1-indexed line and column numbers from a
88
+ * lineNumber and columnNumber as they are reported by Error stacks
89
+ * and CallSite objects, use `sourceMap.findOrigin(lineNumber, columnNumber)`
90
+ * @param lineOffset The zero-indexed line number offset in the generated source
91
+ * @param columnOffset The zero-indexed column number offset in the generated source
79
92
  */
80
- findEntry(line: number, column: number): SourceMapping;
93
+ findEntry(lineOffset: number, columnOffset: number): SourceMapping;
81
94
  }
82
95
  }
83
96
  interface Module extends NodeModule {}