@openclaw/slack 2026.10.1 → 2026.10.5-beta.1

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 (195) hide show
  1. package/dist/.setup/account-configured-zcR9TJJN.mjs +35 -0
  2. package/dist/.setup/{account-inspect-Cs-7DXXW.mjs → account-inspect-D58VVDjk.mjs} +15 -35
  3. package/dist/.setup/{accounts-CDgkV7Cm.mjs → accounts-BMg9YLIv.mjs} +44 -53
  4. package/dist/.setup/{action-runtime-DJ1daRAZ.mjs → action-runtime-BiRZNsIG.mjs} +20 -22
  5. package/dist/.setup/action-runtime.runtime-C5xceJoS.mjs +2 -0
  6. package/dist/.setup/{actions-DDoAJnrH.mjs → actions-KGKwTAKO.mjs} +34 -43
  7. package/dist/.setup/{approval-handler.runtime-BcE_shWc.mjs → approval-handler.runtime-DYrsG2Ox.mjs} +44 -70
  8. package/dist/.setup/{approval-message-updates-EgKGmFXx.mjs → approval-message-updates-CwdDew9i.mjs} +1 -1
  9. package/dist/.setup/{channel-DgKSu8Iv.mjs → channel-C7MY-Hhg.mjs} +138 -97
  10. package/dist/.setup/{channel-type-B9zYYzBU.mjs → channel-type-NjX2SwvS.mjs} +3 -3
  11. package/dist/.setup/{channel.setup-BYIlwbQ7.mjs → channel.setup-BFpQowO3.mjs} +7 -14
  12. package/dist/.setup/{directory-config-B_by7zrc.mjs → directory-config-BEDZPfDn.mjs} +1 -1
  13. package/dist/.setup/{directory-live-C48wazJt.mjs → directory-live-FipfeCwt.mjs} +33 -36
  14. package/dist/.setup/{message-tool-api-CcjLPN3v.mjs → message-tool-api-C7im5ETh.mjs} +2 -2
  15. package/dist/.setup/{monitor-BuYBDmm7.mjs → monitor-BnN2px0N.mjs} +609 -801
  16. package/dist/.setup/{outbound-adapter-BZFkK-mw.mjs → outbound-adapter-4HdGq-8r.mjs} +4 -4
  17. package/dist/.setup/{pipeline.runtime-CIepKmZt.mjs → pipeline.runtime-ByPbC6MN.mjs} +287 -365
  18. package/dist/.setup/{policy-KKTqEiDv.mjs → policy-BaY9_eh1.mjs} +2 -2
  19. package/dist/.setup/{probe-BVlJ3dp0.mjs → probe-CyX52GtD.mjs} +54 -61
  20. package/dist/.setup/{relay-source-CC3h6M7y.mjs → relay-source-CVfH-fBO.mjs} +28 -45
  21. package/dist/.setup/{replies-DHbuthIR.mjs → replies-WmfwvQxc.mjs} +38 -49
  22. package/dist/.setup/{reply-blocks-CKnO4BSG.mjs → reply-blocks-rqHQ_3pr.mjs} +87 -138
  23. package/dist/.setup/{resolve-channels-HR0TgArR.mjs → resolve-channels-B96cgprw.mjs} +17 -41
  24. package/dist/.setup/{resolve-users-BNYBhF0q.mjs → resolve-users-Xz9aPdns.mjs} +22 -58
  25. package/dist/.setup/{scopes-DrDbyUH2.mjs → scopes-aMcMHhXk.mjs} +1 -1
  26. package/dist/.setup/{send-CgPI3Zj8.mjs → send-CLmsR42r.mjs} +157 -284
  27. package/dist/.setup/{session-status-D46GHwOV.mjs → session-status-CcXe10zN.mjs} +181 -238
  28. package/dist/.setup/{setup-plugin-api-ZrHs0N4U.mjs → setup-plugin-api-D92P5p51.mjs} +1 -1
  29. package/dist/.setup/{setup-surface-83lxvE2y.mjs → setup-surface-368jx6Uc.mjs} +6 -6
  30. package/dist/.setup/{shared-VtmYNj-v.mjs → shared-CtprVh_G.mjs} +5 -5
  31. package/dist/.setup/{slash-dispatch.runtime-gBj_uaLM.mjs → slash-dispatch.runtime-Dzwj6TPI.mjs} +1 -1
  32. package/dist/account-inspect-api.js +1 -1
  33. package/dist/api.js +12 -12
  34. package/dist/channel-plugin-api.js +1 -1
  35. package/dist/configured-state.js +6 -13
  36. package/dist/directory-contract-api.js +1 -1
  37. package/dist/message-tool-api.js +1 -1
  38. package/dist/runtime-api.js +10 -10
  39. package/dist/setup-entry.js +1 -1
  40. package/dist/setup-plugin-api.js +1 -1
  41. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts +1 -1
  42. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts.map +1 -1
  43. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts +79 -4
  44. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -1
  45. package/node_modules/@slack/types/dist/block-kit/composition-objects.d.ts +17 -0
  46. package/node_modules/@slack/types/dist/block-kit/composition-objects.d.ts.map +1 -1
  47. package/node_modules/@slack/types/package.json +1 -1
  48. package/node_modules/@slack/web-api/dist/methods.d.ts +49 -2
  49. package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
  50. package/node_modules/@slack/web-api/dist/methods.js +47 -0
  51. package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
  52. package/node_modules/@slack/web-api/dist/types/request/agents.d.ts +186 -0
  53. package/node_modules/@slack/web-api/dist/types/request/agents.d.ts.map +1 -1
  54. package/node_modules/@slack/web-api/dist/types/request/index.d.ts +1 -1
  55. package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
  56. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsArchiveResponse.d.ts +9 -0
  57. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsArchiveResponse.d.ts.map +1 -0
  58. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsArchiveResponse.js +11 -0
  59. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsArchiveResponse.js.map +1 -0
  60. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsCreateResponse.d.ts +10 -0
  61. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsCreateResponse.d.ts.map +1 -0
  62. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsCreateResponse.js +11 -0
  63. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsCreateResponse.js.map +1 -0
  64. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsGetCanvasResponse.d.ts +29 -0
  65. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsGetCanvasResponse.d.ts.map +1 -0
  66. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsGetCanvasResponse.js +11 -0
  67. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsGetCanvasResponse.js.map +1 -0
  68. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsListViewsResponse.d.ts +18 -0
  69. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsListViewsResponse.d.ts.map +1 -0
  70. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsListViewsResponse.js +11 -0
  71. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsListViewsResponse.js.map +1 -0
  72. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsRemoveViewResponse.d.ts +11 -0
  73. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsRemoveViewResponse.d.ts.map +1 -0
  74. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsRemoveViewResponse.js +11 -0
  75. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsRemoveViewResponse.js.map +1 -0
  76. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCanvasContentResponse.d.ts +11 -0
  77. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCanvasContentResponse.d.ts.map +1 -0
  78. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCanvasContentResponse.js +11 -0
  79. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCanvasContentResponse.js.map +1 -0
  80. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCommandsResponse.d.ts +11 -0
  81. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCommandsResponse.d.ts.map +1 -0
  82. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCommandsResponse.js +11 -0
  83. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetCommandsResponse.js.map +1 -0
  84. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetPropertiesResponse.d.ts +10 -0
  85. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetPropertiesResponse.d.ts.map +1 -0
  86. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetPropertiesResponse.js +11 -0
  87. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetPropertiesResponse.js.map +1 -0
  88. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetViewResponse.d.ts +15 -0
  89. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetViewResponse.d.ts.map +1 -0
  90. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetViewResponse.js +11 -0
  91. package/node_modules/@slack/web-api/dist/types/response/AgentsConversationsSetViewResponse.js.map +1 -0
  92. package/node_modules/@slack/web-api/dist/types/response/ConversationsInfoResponse.d.ts +31 -0
  93. package/node_modules/@slack/web-api/dist/types/response/ConversationsInfoResponse.d.ts.map +1 -1
  94. package/node_modules/@slack/web-api/dist/types/response/index.d.ts +9 -0
  95. package/node_modules/@slack/web-api/dist/types/response/index.d.ts.map +1 -1
  96. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/LICENSE +21 -0
  97. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/README.md +15 -0
  98. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/assert/strict.d.ts +68 -0
  99. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +1077 -0
  100. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +711 -0
  101. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/buffer.buffer.d.ts +471 -0
  102. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1800 -0
  103. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +1361 -0
  104. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +432 -0
  105. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +93 -0
  106. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/constants.d.ts +14 -0
  107. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +3964 -0
  108. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +652 -0
  109. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +794 -0
  110. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +497 -0
  111. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +876 -0
  112. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +150 -0
  113. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +1008 -0
  114. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ffi.d.ts +500 -0
  115. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +1477 -0
  116. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +4803 -0
  117. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +150 -0
  118. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  119. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +2218 -0
  120. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +2498 -0
  121. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +400 -0
  122. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +116 -0
  123. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector/promises.d.ts +35 -0
  124. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +265 -0
  125. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/inspector.generated.d.ts +4406 -0
  126. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/module.d.ts +726 -0
  127. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +1074 -0
  128. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +498 -0
  129. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/package.json +155 -0
  130. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path/posix.d.ts +8 -0
  131. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path/win32.d.ts +8 -0
  132. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +178 -0
  133. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +617 -0
  134. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +2269 -0
  135. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +89 -0
  136. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +139 -0
  137. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/quic.d.ts +2191 -0
  138. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/readline/promises.d.ts +158 -0
  139. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +508 -0
  140. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +420 -0
  141. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/sea.d.ts +47 -0
  142. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/sqlite.d.ts +1140 -0
  143. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/consumers.d.ts +114 -0
  144. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/iter.d.ts +449 -0
  145. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/promises.d.ts +211 -0
  146. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +320 -0
  147. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +1806 -0
  148. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +27 -0
  149. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/test/reporters.d.ts +60 -0
  150. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +2558 -0
  151. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/timers/promises.d.ts +93 -0
  152. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +149 -0
  153. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +1232 -0
  154. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +103 -0
  155. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +467 -0
  156. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  157. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  158. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.6/index.d.ts +118 -0
  159. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  160. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/ts5.7/index.d.ts +118 -0
  161. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +226 -0
  162. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +556 -0
  163. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/util/types.d.ts +558 -0
  164. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +1677 -0
  165. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +1059 -0
  166. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/vfs.d.ts +211 -0
  167. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +1137 -0
  168. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +131 -0
  169. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  170. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  171. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/console.d.ts +9 -0
  172. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  173. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/domexception.d.ts +83 -0
  174. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  175. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/events.d.ts +106 -0
  176. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  177. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  178. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  179. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  180. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  181. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  182. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/streams.d.ts +119 -0
  183. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  184. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/web-globals/url.d.ts +24 -0
  185. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +672 -0
  186. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/zlib/iter.d.ts +131 -0
  187. package/node_modules/@slack/web-api/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +606 -0
  188. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  189. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -17
  190. package/node_modules/@slack/web-api/package.json +2 -2
  191. package/openclaw.plugin.json +0 -3
  192. package/package.json +6 -14
  193. package/dist/.setup/account-configured-sUohAxZr.mjs +0 -33
  194. package/dist/.setup/action-runtime.runtime-CdWL2mLC.mjs +0 -2
  195. package/dist/control-ui/2f4b1e827be6b68ced2ea0d8b7da8529a4eafbe72be27ee37e1064bdd530ec10/index.js +0 -1
@@ -0,0 +1,2269 @@
1
+ declare module "node:process" {
2
+ import { Control, MessageOptions, SendHandle } from "node:child_process";
3
+ import { PathLike } from "node:fs";
4
+ import * as tty from "node:tty";
5
+ import { Worker } from "node:worker_threads";
6
+ interface BuiltInModule {
7
+ "assert": typeof import("assert");
8
+ "node:assert": typeof import("node:assert");
9
+ "assert/strict": typeof import("assert/strict");
10
+ "node:assert/strict": typeof import("node:assert/strict");
11
+ "async_hooks": typeof import("async_hooks");
12
+ "node:async_hooks": typeof import("node:async_hooks");
13
+ "buffer": typeof import("buffer");
14
+ "node:buffer": typeof import("node:buffer");
15
+ "child_process": typeof import("child_process");
16
+ "node:child_process": typeof import("node:child_process");
17
+ "cluster": typeof import("cluster");
18
+ "node:cluster": typeof import("node:cluster");
19
+ "console": typeof import("console");
20
+ "node:console": typeof import("node:console");
21
+ "constants": typeof import("constants");
22
+ "node:constants": typeof import("node:constants");
23
+ "crypto": typeof import("crypto");
24
+ "node:crypto": typeof import("node:crypto");
25
+ "dgram": typeof import("dgram");
26
+ "node:dgram": typeof import("node:dgram");
27
+ "diagnostics_channel": typeof import("diagnostics_channel");
28
+ "node:diagnostics_channel": typeof import("node:diagnostics_channel");
29
+ "dns": typeof import("dns");
30
+ "node:dns": typeof import("node:dns");
31
+ "dns/promises": typeof import("dns/promises");
32
+ "node:dns/promises": typeof import("node:dns/promises");
33
+ "domain": typeof import("domain");
34
+ "node:domain": typeof import("node:domain");
35
+ "events": typeof import("events");
36
+ "node:events": typeof import("node:events");
37
+ "node:ffi": typeof import("node:ffi");
38
+ "fs": typeof import("fs");
39
+ "node:fs": typeof import("node:fs");
40
+ "fs/promises": typeof import("fs/promises");
41
+ "node:fs/promises": typeof import("node:fs/promises");
42
+ "http": typeof import("http");
43
+ "node:http": typeof import("node:http");
44
+ "http2": typeof import("http2");
45
+ "node:http2": typeof import("node:http2");
46
+ "https": typeof import("https");
47
+ "node:https": typeof import("node:https");
48
+ "inspector": typeof import("inspector");
49
+ "node:inspector": typeof import("node:inspector");
50
+ "inspector/promises": typeof import("inspector/promises");
51
+ "node:inspector/promises": typeof import("node:inspector/promises");
52
+ "module": typeof import("module");
53
+ "node:module": typeof import("node:module");
54
+ "net": typeof import("net");
55
+ "node:net": typeof import("node:net");
56
+ "os": typeof import("os");
57
+ "node:os": typeof import("node:os");
58
+ "path": typeof import("path");
59
+ "node:path": typeof import("node:path");
60
+ "path/posix": typeof import("path/posix");
61
+ "node:path/posix": typeof import("node:path/posix");
62
+ "path/win32": typeof import("path/win32");
63
+ "node:path/win32": typeof import("node:path/win32");
64
+ "perf_hooks": typeof import("perf_hooks");
65
+ "node:perf_hooks": typeof import("node:perf_hooks");
66
+ "process": typeof import("process");
67
+ "node:process": typeof import("node:process");
68
+ "punycode": typeof import("punycode");
69
+ "node:punycode": typeof import("node:punycode");
70
+ "querystring": typeof import("querystring");
71
+ "node:querystring": typeof import("node:querystring");
72
+ "node:quic": typeof import("node:quic");
73
+ "readline": typeof import("readline");
74
+ "node:readline": typeof import("node:readline");
75
+ "readline/promises": typeof import("readline/promises");
76
+ "node:readline/promises": typeof import("node:readline/promises");
77
+ "repl": typeof import("repl");
78
+ "node:repl": typeof import("node:repl");
79
+ "node:sea": typeof import("node:sea");
80
+ "node:sqlite": typeof import("node:sqlite");
81
+ "stream": typeof import("stream");
82
+ "node:stream": typeof import("node:stream");
83
+ "stream/consumers": typeof import("stream/consumers");
84
+ "node:stream/consumers": typeof import("node:stream/consumers");
85
+ "stream/iter": typeof import("stream/iter");
86
+ "node:stream/iter": typeof import("node:stream/iter");
87
+ "stream/promises": typeof import("stream/promises");
88
+ "node:stream/promises": typeof import("node:stream/promises");
89
+ "stream/web": typeof import("stream/web");
90
+ "node:stream/web": typeof import("node:stream/web");
91
+ "string_decoder": typeof import("string_decoder");
92
+ "node:string_decoder": typeof import("node:string_decoder");
93
+ "node:test": typeof import("node:test");
94
+ "node:test/reporters": typeof import("node:test/reporters");
95
+ "timers": typeof import("timers");
96
+ "node:timers": typeof import("node:timers");
97
+ "timers/promises": typeof import("timers/promises");
98
+ "node:timers/promises": typeof import("node:timers/promises");
99
+ "tls": typeof import("tls");
100
+ "node:tls": typeof import("node:tls");
101
+ "trace_events": typeof import("trace_events");
102
+ "node:trace_events": typeof import("node:trace_events");
103
+ "tty": typeof import("tty");
104
+ "node:tty": typeof import("node:tty");
105
+ "url": typeof import("url");
106
+ "node:url": typeof import("node:url");
107
+ "util": typeof import("util");
108
+ "node:util": typeof import("node:util");
109
+ "util/types": typeof import("util/types");
110
+ "node:util/types": typeof import("node:util/types");
111
+ "v8": typeof import("v8");
112
+ "node:v8": typeof import("node:v8");
113
+ "node:vfs": typeof import("node:vfs");
114
+ "vm": typeof import("vm");
115
+ "node:vm": typeof import("node:vm");
116
+ "wasi": typeof import("wasi");
117
+ "node:wasi": typeof import("node:wasi");
118
+ "worker_threads": typeof import("worker_threads");
119
+ "node:worker_threads": typeof import("node:worker_threads");
120
+ "zlib": typeof import("zlib");
121
+ "node:zlib": typeof import("node:zlib");
122
+ }
123
+ type SignalsEventMap = { [S in NodeJS.Signals]: [signal: S] };
124
+ interface ProcessEventMap extends SignalsEventMap {
125
+ "beforeExit": [code: number];
126
+ "disconnect": [];
127
+ "exit": [code: number];
128
+ "message": [
129
+ message: object | boolean | number | string | null,
130
+ sendHandle: SendHandle | undefined,
131
+ ];
132
+ "rejectionHandled": [promise: Promise<unknown>];
133
+ "uncaughtException": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
134
+ "uncaughtExceptionMonitor": [error: Error, origin: NodeJS.UncaughtExceptionOrigin];
135
+ "unhandledRejection": [reason: unknown, promise: Promise<unknown>];
136
+ "warning": [warning: Error];
137
+ "worker": [worker: Worker];
138
+ "workerMessage": [value: any, source: number];
139
+ }
140
+ global {
141
+ var process: NodeJS.Process;
142
+ namespace process {
143
+ export { ProcessEventMap };
144
+ }
145
+ namespace NodeJS {
146
+ // this namespace merge is here because these are specifically used
147
+ // as the type for process.stdin, process.stdout, and process.stderr.
148
+ // they can't live in tty.d.ts because we need to disambiguate the imported name.
149
+ interface ReadStream extends tty.ReadStream {}
150
+ interface WriteStream extends tty.WriteStream {}
151
+ interface MemoryUsageFn {
152
+ /**
153
+ * The `process.memoryUsage()` method iterate over each page to gather informations about memory
154
+ * usage which can be slow depending on the program memory allocations.
155
+ */
156
+ (): MemoryUsage;
157
+ /**
158
+ * method returns an integer representing the Resident Set Size (RSS) in bytes.
159
+ */
160
+ rss(): number;
161
+ }
162
+ interface MemoryUsage {
163
+ /**
164
+ * Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the
165
+ * process, including all C++ and JavaScript objects and code.
166
+ */
167
+ rss: number;
168
+ /**
169
+ * Refers to V8's memory usage.
170
+ */
171
+ heapTotal: number;
172
+ /**
173
+ * Refers to V8's memory usage.
174
+ */
175
+ heapUsed: number;
176
+ external: number;
177
+ /**
178
+ * Refers to memory allocated for `ArrayBuffer`s and `SharedArrayBuffer`s, including all Node.js Buffers. This is also included
179
+ * in the external value. When Node.js is used as an embedded library, this value may be `0` because allocations for `ArrayBuffer`s
180
+ * may not be tracked in that case.
181
+ */
182
+ arrayBuffers: number;
183
+ }
184
+ interface CpuUsage {
185
+ user: number;
186
+ system: number;
187
+ }
188
+ interface ProcessRelease {
189
+ name: string;
190
+ sourceUrl?: string | undefined;
191
+ headersUrl?: string | undefined;
192
+ libUrl?: string | undefined;
193
+ lts?: string | undefined;
194
+ }
195
+ interface ProcessFeatures {
196
+ /**
197
+ * A boolean value that is `true` if the current Node.js build is caching builtin modules.
198
+ * @since v12.0.0
199
+ */
200
+ readonly cached_builtins: boolean;
201
+ /**
202
+ * A boolean value that is `true` if the current Node.js build is a debug build.
203
+ * @since v0.5.5
204
+ */
205
+ readonly debug: boolean;
206
+ /**
207
+ * A boolean value that is `true` if the current Node.js build includes the inspector.
208
+ * @since v11.10.0
209
+ */
210
+ readonly inspector: boolean;
211
+ /**
212
+ * A boolean value that is `true` if the current Node.js build includes support for IPv6.
213
+ *
214
+ * Since all Node.js builds have IPv6 support, this value is always `true`.
215
+ * @since v0.5.3
216
+ * @deprecated This property is always true, and any checks based on it are redundant.
217
+ */
218
+ readonly ipv6: boolean;
219
+ /**
220
+ * A boolean value that is `true` if the current Node.js build supports
221
+ * [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v26.x/api/modules.md#loading-ecmascript-modules-using-require).
222
+ * @since v22.10.0
223
+ */
224
+ readonly require_module: boolean;
225
+ /**
226
+ * A boolean value that is `true` if the current Node.js build includes support for TLS.
227
+ * @since v0.5.3
228
+ */
229
+ readonly tls: boolean;
230
+ /**
231
+ * A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS.
232
+ *
233
+ * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional ALPN support.
234
+ * This value is therefore identical to that of `process.features.tls`.
235
+ * @since v4.8.0
236
+ * @deprecated Use `process.features.tls` instead.
237
+ */
238
+ readonly tls_alpn: boolean;
239
+ /**
240
+ * A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS.
241
+ *
242
+ * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional OCSP support.
243
+ * This value is therefore identical to that of `process.features.tls`.
244
+ * @since v0.11.13
245
+ * @deprecated Use `process.features.tls` instead.
246
+ */
247
+ readonly tls_ocsp: boolean;
248
+ /**
249
+ * A boolean value that is `true` if the current Node.js build includes support for SNI in TLS.
250
+ *
251
+ * In Node.js 11.0.0 and later versions, the OpenSSL dependencies feature unconditional SNI support.
252
+ * This value is therefore identical to that of `process.features.tls`.
253
+ * @since v0.5.3
254
+ * @deprecated Use `process.features.tls` instead.
255
+ */
256
+ readonly tls_sni: boolean;
257
+ /**
258
+ * A value that is `"strip"` by default, and `false` if
259
+ * Node.js is run with `--no-strip-types`.
260
+ * @since v22.10.0
261
+ */
262
+ readonly typescript: "strip" | false;
263
+ /**
264
+ * A boolean value that is `true` if the current Node.js build includes support for libuv.
265
+ *
266
+ * Since it's not possible to build Node.js without libuv, this value is always `true`.
267
+ * @since v0.5.3
268
+ * @deprecated This property is always true, and any checks based on it are redundant.
269
+ */
270
+ readonly uv: boolean;
271
+ }
272
+ interface ProcessVersions extends Dict<string> {
273
+ http_parser: string;
274
+ node: string;
275
+ v8: string;
276
+ ares: string;
277
+ uv: string;
278
+ zlib: string;
279
+ modules: string;
280
+ openssl: string;
281
+ }
282
+ type Platform =
283
+ | "aix"
284
+ | "android"
285
+ | "darwin"
286
+ | "freebsd"
287
+ | "haiku"
288
+ | "linux"
289
+ | "openbsd"
290
+ | "sunos"
291
+ | "win32"
292
+ | "cygwin"
293
+ | "netbsd";
294
+ type Architecture =
295
+ | "arm"
296
+ | "arm64"
297
+ | "ia32"
298
+ | "loong64"
299
+ | "mips"
300
+ | "mipsel"
301
+ | "ppc64"
302
+ | "riscv64"
303
+ | "s390x"
304
+ | "x64";
305
+ type Signals =
306
+ | "SIGABRT"
307
+ | "SIGALRM"
308
+ | "SIGBUS"
309
+ | "SIGCHLD"
310
+ | "SIGCONT"
311
+ | "SIGFPE"
312
+ | "SIGHUP"
313
+ | "SIGILL"
314
+ | "SIGINT"
315
+ | "SIGIO"
316
+ | "SIGIOT"
317
+ | "SIGKILL"
318
+ | "SIGPIPE"
319
+ | "SIGPOLL"
320
+ | "SIGPROF"
321
+ | "SIGPWR"
322
+ | "SIGQUIT"
323
+ | "SIGSEGV"
324
+ | "SIGSTKFLT"
325
+ | "SIGSTOP"
326
+ | "SIGSYS"
327
+ | "SIGTERM"
328
+ | "SIGTRAP"
329
+ | "SIGTSTP"
330
+ | "SIGTTIN"
331
+ | "SIGTTOU"
332
+ | "SIGUNUSED"
333
+ | "SIGURG"
334
+ | "SIGUSR1"
335
+ | "SIGUSR2"
336
+ | "SIGVTALRM"
337
+ | "SIGWINCH"
338
+ | "SIGXCPU"
339
+ | "SIGXFSZ"
340
+ | "SIGBREAK"
341
+ | "SIGLOST"
342
+ | "SIGINFO";
343
+ type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
344
+ /**
345
+ * @deprecated Global listener types will be removed in a future version.
346
+ * Callbacks passed directly to `process`'s EventEmitter methods
347
+ * have their parameter types inferred automatically.
348
+ *
349
+ * `process` event types are also available via `ProcessEventMap`:
350
+ *
351
+ * ```ts
352
+ * import type { ProcessEventMap } from 'node:process';
353
+ * const listener = (...args: ProcessEventMap['beforeExit']) => { ... };
354
+ * ```
355
+ */
356
+ type BeforeExitListener = (...args: ProcessEventMap["beforeExit"]) => void;
357
+ /**
358
+ * @deprecated Global listener types will be removed in a future version.
359
+ * Callbacks passed directly to `process`'s EventEmitter methods
360
+ * have their parameter types inferred automatically.
361
+ *
362
+ * `process` event types are also available via `ProcessEventMap`:
363
+ *
364
+ * ```ts
365
+ * import type { ProcessEventMap } from 'node:process';
366
+ * const listener = (...args: ProcessEventMap['disconnect']) => { ... };
367
+ * ```
368
+ */
369
+ type DisconnectListener = (...args: ProcessEventMap["disconnect"]) => void;
370
+ /**
371
+ * @deprecated Global listener types will be removed in a future version.
372
+ * Callbacks passed directly to `process`'s EventEmitter methods
373
+ * have their parameter types inferred automatically.
374
+ *
375
+ * `process` event types are also available via `ProcessEventMap`:
376
+ *
377
+ * ```ts
378
+ * import type { ProcessEventMap } from 'node:process';
379
+ * const listener = (...args: ProcessEventMap['exit']) => { ... };
380
+ * ```
381
+ */
382
+ type ExitListener = (...args: ProcessEventMap["exit"]) => void;
383
+ /**
384
+ * @deprecated Global listener types will be removed in a future version.
385
+ * Callbacks passed directly to `process`'s EventEmitter methods
386
+ * have their parameter types inferred automatically.
387
+ *
388
+ * `process` event types are also available via `ProcessEventMap`:
389
+ *
390
+ * ```ts
391
+ * import type { ProcessEventMap } from 'node:process';
392
+ * const listener = (...args: ProcessEventMap['message']) => { ... };
393
+ * ```
394
+ */
395
+ type MessageListener = (...args: ProcessEventMap["message"]) => void;
396
+ /**
397
+ * @deprecated Global listener types will be removed in a future version.
398
+ * Callbacks passed directly to `process`'s EventEmitter methods
399
+ * have their parameter types inferred automatically.
400
+ *
401
+ * `process` event types are also available via `ProcessEventMap`:
402
+ *
403
+ * ```ts
404
+ * import type { ProcessEventMap } from 'node:process';
405
+ * const listener = (...args: ProcessEventMap['rejectionHandled']) => { ... };
406
+ * ```
407
+ */
408
+ type RejectionHandledListener = (...args: ProcessEventMap["rejectionHandled"]) => void;
409
+ /**
410
+ * @deprecated Global listener types will be removed in a future version.
411
+ * Callbacks passed directly to `process`'s EventEmitter methods
412
+ * have their parameter types inferred automatically.
413
+ */
414
+ type SignalsListener = (signal: Signals) => void;
415
+ /**
416
+ * @deprecated Global listener types will be removed in a future version.
417
+ * Callbacks passed directly to `process`'s EventEmitter methods
418
+ * have their parameter types inferred automatically.
419
+ *
420
+ * `process` event types are also available via `ProcessEventMap`:
421
+ *
422
+ * ```ts
423
+ * import type { ProcessEventMap } from 'node:process';
424
+ * const listener = (...args: ProcessEventMap['uncaughtException']) => { ... };
425
+ * ```
426
+ */
427
+ type UncaughtExceptionListener = (...args: ProcessEventMap["uncaughtException"]) => void;
428
+ /**
429
+ * @deprecated Global listener types will be removed in a future version.
430
+ * Callbacks passed directly to `process`'s EventEmitter methods
431
+ * have their parameter types inferred automatically.
432
+ *
433
+ * `process` event types are also available via `ProcessEventMap`:
434
+ *
435
+ * ```ts
436
+ * import type { ProcessEventMap } from 'node:process';
437
+ * const listener = (...args: ProcessEventMap['unhandledRejection']) => { ... };
438
+ * ```
439
+ */
440
+ type UnhandledRejectionListener = (...args: ProcessEventMap["unhandledRejection"]) => void;
441
+ /**
442
+ * @deprecated Global listener types will be removed in a future version.
443
+ * Callbacks passed directly to `process`'s EventEmitter methods
444
+ * have their parameter types inferred automatically.
445
+ *
446
+ * `process` event types are also available via `ProcessEventMap`:
447
+ *
448
+ * ```ts
449
+ * import type { ProcessEventMap } from 'node:process';
450
+ * const listener = (...args: ProcessEventMap['warning']) => { ... };
451
+ * ```
452
+ */
453
+ type WarningListener = (...args: ProcessEventMap["warning"]) => void;
454
+ /**
455
+ * @deprecated Global listener types will be removed in a future version.
456
+ * Callbacks passed directly to `process`'s EventEmitter methods
457
+ * have their parameter types inferred automatically.
458
+ *
459
+ * `process` event types are also available via `ProcessEventMap`:
460
+ *
461
+ * ```ts
462
+ * import type { ProcessEventMap } from 'node:process';
463
+ * const listener = (...args: ProcessEventMap['worker']) => { ... };
464
+ * ```
465
+ */
466
+ type WorkerListener = (...args: ProcessEventMap["worker"]) => void;
467
+ interface Socket extends ReadWriteStream {
468
+ isTTY?: true | undefined;
469
+ }
470
+ // Alias for compatibility
471
+ interface ProcessEnv extends Dict<string> {}
472
+ interface HRTime {
473
+ /**
474
+ * This is the legacy version of {@link process.hrtime.bigint()}
475
+ * before bigint was introduced in JavaScript.
476
+ *
477
+ * The `process.hrtime()` method returns the current high-resolution real time in a `[seconds, nanoseconds]` tuple `Array`,
478
+ * where `nanoseconds` is the remaining part of the real time that can't be represented in second precision.
479
+ *
480
+ * `time` is an optional parameter that must be the result of a previous `process.hrtime()` call to diff with the current time.
481
+ * If the parameter passed in is not a tuple `Array`, a TypeError will be thrown.
482
+ * Passing in a user-defined array instead of the result of a previous call to `process.hrtime()` will lead to undefined behavior.
483
+ *
484
+ * These times are relative to an arbitrary time in the past,
485
+ * and not related to the time of day and therefore not subject to clock drift.
486
+ * The primary use is for measuring performance between intervals:
487
+ * ```js
488
+ * const { hrtime } = require('node:process');
489
+ * const NS_PER_SEC = 1e9;
490
+ * const time = hrtime();
491
+ * // [ 1800216, 25 ]
492
+ *
493
+ * setTimeout(() => {
494
+ * const diff = hrtime(time);
495
+ * // [ 1, 552 ]
496
+ *
497
+ * console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`);
498
+ * // Benchmark took 1000000552 nanoseconds
499
+ * }, 1000);
500
+ * ```
501
+ * @since 0.7.6
502
+ * @legacy Use {@link process.hrtime.bigint()} instead.
503
+ * @param time The result of a previous call to `process.hrtime()`
504
+ */
505
+ (time?: [number, number]): [number, number];
506
+ /**
507
+ * The `bigint` version of the {@link process.hrtime()} method returning the current high-resolution real time in nanoseconds as a `bigint`.
508
+ *
509
+ * Unlike {@link process.hrtime()}, it does not support an additional time argument since the difference can just be computed directly by subtraction of the two `bigint`s.
510
+ * ```js
511
+ * import { hrtime } from 'node:process';
512
+ *
513
+ * const start = hrtime.bigint();
514
+ * // 191051479007711n
515
+ *
516
+ * setTimeout(() => {
517
+ * const end = hrtime.bigint();
518
+ * // 191052633396993n
519
+ *
520
+ * console.log(`Benchmark took ${end - start} nanoseconds`);
521
+ * // Benchmark took 1154389282 nanoseconds
522
+ * }, 1000);
523
+ * ```
524
+ * @since v10.7.0
525
+ */
526
+ bigint(): bigint;
527
+ }
528
+ interface ProcessPermission {
529
+ /**
530
+ * Verifies that the process is able to access the given scope and reference.
531
+ * If no reference is provided, a global scope is assumed, for instance, `process.permission.has('fs.read')`
532
+ * will check if the process has ALL file system read permissions.
533
+ *
534
+ * The reference has a meaning based on the provided scope. For example, the reference when the scope is File System means files and folders.
535
+ *
536
+ * The available scopes are:
537
+ *
538
+ * * `fs` - All File System
539
+ * * `fs.read` - File System read operations
540
+ * * `fs.write` - File System write operations
541
+ * * `child` - Child process spawning operations
542
+ * * `worker` - Worker thread spawning operation
543
+ *
544
+ * ```js
545
+ * // Check if the process has permission to read the README file
546
+ * process.permission.has('fs.read', './README.md');
547
+ * // Check if the process has read permission operations
548
+ * process.permission.has('fs.read');
549
+ * ```
550
+ * @since v20.0.0
551
+ */
552
+ has(scope: string, reference?: string): boolean;
553
+ /**
554
+ * Drops the specified permission from the current process. This operation is
555
+ * **irreversible** — once a permission is dropped, it cannot be restored through
556
+ * any Node.js API.
557
+ *
558
+ * If no reference is provided, the entire scope is dropped. For example,
559
+ * `process.permission.drop('fs.read')` will revoke ALL file system read
560
+ * permissions.
561
+ *
562
+ * When a reference is provided, only the permission for that specific resource
563
+ * is dropped. For example, `process.permission.drop('fs.read', '/etc/myapp')`
564
+ * will revoke read access to that directory while keeping other read
565
+ * permissions intact.
566
+ *
567
+ * **Important:** You can only drop the exact resource that was explicitly
568
+ * granted. The reference passed to `drop()` must match the original grant:
569
+ *
570
+ * * If a permission was granted using a wildcard (`*`), such as
571
+ * `--allow-fs-read=*`, individual paths cannot be dropped - only the entire
572
+ * scope can be dropped (by calling `drop()` without a reference).
573
+ * * If a directory was granted (e.g. `--allow-fs-read=/my/folder`), you cannot
574
+ * drop access to individual files inside it. You must drop the same directory
575
+ * that was granted. Any remaining grants continue to apply.
576
+ *
577
+ * The available scopes are the same as [`process.permission.has()`][]:
578
+ *
579
+ * `fs` - All File System (drops both read and write)
580
+ * * `fs.read` - File System read operations
581
+ * * `fs.write` - File System write operations
582
+ * * `child` - Child process spawning operations
583
+ * * `worker` - Worker thread spawning operation
584
+ * * `net` - Network operations
585
+ * * `inspector` - Inspector operations
586
+ * * `wasi` - WASI operations
587
+ * * `addon` - Native addon operations
588
+ *
589
+ * ```js
590
+ * const fs = require('node:fs');
591
+ *
592
+ * // Read configuration during startup
593
+ * const config = fs.readFileSync('/etc/myapp/config.json', 'utf8');
594
+ *
595
+ * // Drop read access to the config directory after initialization
596
+ * process.permission.drop('fs.read', '/etc/myapp');
597
+ *
598
+ * // This will now throw ERR_ACCESS_DENIED
599
+ * fs.readFileSync('/etc/myapp/config.json');
600
+ * ```
601
+ * @since v26.3.0
602
+ * @experimental
603
+ */
604
+ drop(scope: string, reference?: string): void;
605
+ }
606
+ interface ProcessReport {
607
+ /**
608
+ * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems
609
+ * than the default multi-line format designed for human consumption.
610
+ * @since v13.12.0, v12.17.0
611
+ */
612
+ compact: boolean;
613
+ /**
614
+ * Directory where the report is written.
615
+ * The default value is the empty string, indicating that reports are written to the current
616
+ * working directory of the Node.js process.
617
+ */
618
+ directory: string;
619
+ /**
620
+ * Filename where the report is written. If set to the empty string, the output filename will be comprised
621
+ * of a timestamp, PID, and sequence number. The default value is the empty string.
622
+ */
623
+ filename: string;
624
+ /**
625
+ * Returns a JavaScript Object representation of a diagnostic report for the running process.
626
+ * The report's JavaScript stack trace is taken from `err`, if present.
627
+ */
628
+ getReport(err?: Error): object;
629
+ /**
630
+ * If true, a diagnostic report is generated on fatal errors,
631
+ * such as out of memory errors or failed C++ assertions.
632
+ * @default false
633
+ */
634
+ reportOnFatalError: boolean;
635
+ /**
636
+ * If true, a diagnostic report is generated when the process
637
+ * receives the signal specified by process.report.signal.
638
+ * @default false
639
+ */
640
+ reportOnSignal: boolean;
641
+ /**
642
+ * If true, a diagnostic report is generated on uncaught exception.
643
+ * @default false
644
+ */
645
+ reportOnUncaughtException: boolean;
646
+ /**
647
+ * If true, a diagnostic report is generated without the environment variables.
648
+ * @default false
649
+ */
650
+ excludeEnv: boolean;
651
+ /**
652
+ * The signal used to trigger the creation of a diagnostic report.
653
+ * @default 'SIGUSR2'
654
+ */
655
+ signal: Signals;
656
+ /**
657
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
658
+ * includes the date, time, PID, and a sequence number.
659
+ * The report's JavaScript stack trace is taken from `err`, if present.
660
+ *
661
+ * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written
662
+ * to the stdout or stderr of the process respectively.
663
+ * @param fileName Name of the file where the report is written.
664
+ * This should be a relative path, that will be appended to the directory specified in
665
+ * `process.report.directory`, or the current working directory of the Node.js process,
666
+ * if unspecified.
667
+ * @param err A custom error used for reporting the JavaScript stack.
668
+ * @return Filename of the generated report.
669
+ */
670
+ writeReport(fileName?: string, err?: Error): string;
671
+ writeReport(err?: Error): string;
672
+ }
673
+ interface ResourceUsage {
674
+ fsRead: number;
675
+ fsWrite: number;
676
+ involuntaryContextSwitches: number;
677
+ ipcReceived: number;
678
+ ipcSent: number;
679
+ majorPageFault: number;
680
+ maxRSS: number;
681
+ minorPageFault: number;
682
+ sharedMemorySize: number;
683
+ signalsCount: number;
684
+ swappedOut: number;
685
+ systemCPUTime: number;
686
+ unsharedDataSize: number;
687
+ unsharedStackSize: number;
688
+ userCPUTime: number;
689
+ voluntaryContextSwitches: number;
690
+ }
691
+ interface EmitWarningOptions {
692
+ /**
693
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
694
+ *
695
+ * @default 'Warning'
696
+ */
697
+ type?: string | undefined;
698
+ /**
699
+ * A unique identifier for the warning instance being emitted.
700
+ */
701
+ code?: string | undefined;
702
+ /**
703
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
704
+ *
705
+ * @default process.emitWarning
706
+ */
707
+ ctor?: Function | undefined;
708
+ /**
709
+ * Additional text to include with the error.
710
+ */
711
+ detail?: string | undefined;
712
+ }
713
+ interface ProcessConfig {
714
+ readonly target_defaults: {
715
+ readonly cflags: any[];
716
+ readonly default_configuration: string;
717
+ readonly defines: string[];
718
+ readonly include_dirs: string[];
719
+ readonly libraries: string[];
720
+ };
721
+ readonly variables: {
722
+ readonly clang: number;
723
+ readonly host_arch: string;
724
+ readonly node_install_npm: boolean;
725
+ readonly node_install_waf: boolean;
726
+ readonly node_prefix: string;
727
+ readonly node_shared_openssl: boolean;
728
+ readonly node_shared_v8: boolean;
729
+ readonly node_shared_zlib: boolean;
730
+ readonly node_use_dtrace: boolean;
731
+ readonly node_use_etw: boolean;
732
+ readonly node_use_openssl: boolean;
733
+ readonly target_arch: string;
734
+ readonly v8_no_strict_aliasing: number;
735
+ readonly v8_use_snapshot: boolean;
736
+ readonly visibility: string;
737
+ };
738
+ }
739
+ interface Process extends EventEmitter {
740
+ /**
741
+ * The `process.stdout` property returns a stream connected to`stdout` (fd `1`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `1` refers to a file, in which case it is
742
+ * a `Writable` stream.
743
+ *
744
+ * For example, to copy `process.stdin` to `process.stdout`:
745
+ *
746
+ * ```js
747
+ * import { stdin, stdout } from 'node:process';
748
+ *
749
+ * stdin.pipe(stdout);
750
+ * ```
751
+ *
752
+ * `process.stdout` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
753
+ */
754
+ stdout: WriteStream & {
755
+ fd: 1;
756
+ };
757
+ /**
758
+ * The `process.stderr` property returns a stream connected to`stderr` (fd `2`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `2` refers to a file, in which case it is
759
+ * a `Writable` stream.
760
+ *
761
+ * `process.stderr` differs from other Node.js streams in important ways. See `note on process I/O` for more information.
762
+ */
763
+ stderr: WriteStream & {
764
+ fd: 2;
765
+ };
766
+ /**
767
+ * The `process.stdin` property returns a stream connected to`stdin` (fd `0`). It is a `net.Socket` (which is a `Duplex` stream) unless fd `0` refers to a file, in which case it is
768
+ * a `Readable` stream.
769
+ *
770
+ * For details of how to read from `stdin` see `readable.read()`.
771
+ *
772
+ * As a `Duplex` stream, `process.stdin` can also be used in "old" mode that
773
+ * is compatible with scripts written for Node.js prior to v0.10\.
774
+ * For more information see `Stream compatibility`.
775
+ *
776
+ * In "old" streams mode the `stdin` stream is paused by default, so one
777
+ * must call `process.stdin.resume()` to read from it. Note also that calling `process.stdin.resume()` itself would switch stream to "old" mode.
778
+ */
779
+ stdin: ReadStream & {
780
+ fd: 0;
781
+ };
782
+ /**
783
+ * The `process.argv` property returns an array containing the command-line
784
+ * arguments passed when the Node.js process was launched. The first element will
785
+ * be {@link execPath}. See `process.argv0` if access to the original value
786
+ * of `argv[0]` is needed. The second element will be the path to the JavaScript
787
+ * file being executed. If a [program entry point](https://nodejs.org/docs/latest-v26.x/api/cli.html#program-entry-point) was provided, the second element
788
+ * will be the absolute path to it. The remaining elements are additional command-line
789
+ * arguments.
790
+ *
791
+ * For example, assuming the following script for `process-args.js`:
792
+ *
793
+ * ```js
794
+ * import { argv } from 'node:process';
795
+ *
796
+ * // print process.argv
797
+ * argv.forEach((val, index) => {
798
+ * console.log(`${index}: ${val}`);
799
+ * });
800
+ * ```
801
+ *
802
+ * Launching the Node.js process as:
803
+ *
804
+ * ```bash
805
+ * node process-args.js one two=three four
806
+ * ```
807
+ *
808
+ * Would generate the output:
809
+ *
810
+ * ```text
811
+ * 0: /usr/local/bin/node
812
+ * 1: /Users/mjr/work/node/process-args.js
813
+ * 2: one
814
+ * 3: two=three
815
+ * 4: four
816
+ * ```
817
+ * @since v0.1.27
818
+ */
819
+ argv: string[];
820
+ /**
821
+ * The `process.argv0` property stores a read-only copy of the original value of`argv[0]` passed when Node.js starts.
822
+ *
823
+ * ```console
824
+ * $ bash -c 'exec -a customArgv0 ./node'
825
+ * > process.argv[0]
826
+ * '/Volumes/code/external/node/out/Release/node'
827
+ * > process.argv0
828
+ * 'customArgv0'
829
+ * ```
830
+ * @since v6.4.0
831
+ */
832
+ argv0: string;
833
+ /**
834
+ * The `process.execArgv` property returns the set of Node.js-specific command-line
835
+ * options passed when the Node.js process was launched. These options do not
836
+ * appear in the array returned by the {@link argv} property, and do not
837
+ * include the Node.js executable, the name of the script, or any options following
838
+ * the script name. These options are useful in order to spawn child processes with
839
+ * the same execution environment as the parent.
840
+ *
841
+ * ```bash
842
+ * node --icu-data-dir=./foo --require ./bar.js script.js --version
843
+ * ```
844
+ *
845
+ * Results in `process.execArgv`:
846
+ *
847
+ * ```json
848
+ * ["--icu-data-dir=./foo", "--require", "./bar.js"]
849
+ * ```
850
+ *
851
+ * And `process.argv`:
852
+ *
853
+ * ```json
854
+ * ["/usr/local/bin/node", "script.js", "--version"]
855
+ * ```
856
+ *
857
+ * Refer to `Worker constructor` for the detailed behavior of worker
858
+ * threads with this property.
859
+ * @since v0.7.7
860
+ */
861
+ execArgv: string[];
862
+ /**
863
+ * The `process.execPath` property returns the absolute pathname of the executable
864
+ * that started the Node.js process. Symbolic links, if any, are resolved.
865
+ *
866
+ * ```json
867
+ * "/usr/local/bin/node"
868
+ * ```
869
+ * @since v0.1.100
870
+ */
871
+ execPath: string;
872
+ /**
873
+ * The `process.abort()` method causes the Node.js process to exit immediately and
874
+ * generate a core file.
875
+ *
876
+ * This feature is not available in `Worker` threads.
877
+ * @since v0.7.0
878
+ */
879
+ abort(): never;
880
+ /**
881
+ * The `process.addUncaughtExceptionCaptureCallback()` function adds a callback
882
+ * that will be invoked when an uncaught exception occurs, receiving the exception
883
+ * value as its first argument.
884
+ *
885
+ * Unlike `process.setUncaughtExceptionCaptureCallback()`, this function allows
886
+ * multiple callbacks to be registered and does not conflict with the
887
+ * [`domain`](https://nodejs.org/docs/latest-v26.x/api/domain.html) module. Callbacks are called in reverse order of registration
888
+ * (most recent first). If a callback returns `true`, subsequent callbacks
889
+ * and the default uncaught exception handling are skipped.
890
+ *
891
+ * ```js
892
+ * import process from 'node:process';
893
+ *
894
+ * process.addUncaughtExceptionCaptureCallback((err) => {
895
+ * console.error('Caught exception:', err.message);
896
+ * return true; // Indicates exception was handled
897
+ * });
898
+ * ```
899
+ * @since v25.9.0
900
+ */
901
+ addUncaughtExceptionCaptureCallback(fn: (err: unknown) => boolean): void;
902
+ /**
903
+ * The `process.chdir()` method changes the current working directory of the
904
+ * Node.js process or throws an exception if doing so fails (for instance, if
905
+ * the specified `directory` does not exist).
906
+ *
907
+ * ```js
908
+ * import { chdir, cwd } from 'node:process';
909
+ *
910
+ * console.log(`Starting directory: ${cwd()}`);
911
+ * try {
912
+ * chdir('/tmp');
913
+ * console.log(`New directory: ${cwd()}`);
914
+ * } catch (err) {
915
+ * console.error(`chdir: ${err}`);
916
+ * }
917
+ * ```
918
+ *
919
+ * This feature is not available in `Worker` threads.
920
+ * @since v0.1.17
921
+ */
922
+ chdir(directory: string): void;
923
+ /**
924
+ * The `process.cwd()` method returns the current working directory of the Node.js
925
+ * process.
926
+ *
927
+ * ```js
928
+ * import { cwd } from 'node:process';
929
+ *
930
+ * console.log(`Current directory: ${cwd()}`);
931
+ * ```
932
+ * @since v0.1.8
933
+ */
934
+ cwd(): string;
935
+ /**
936
+ * The port used by the Node.js debugger when enabled.
937
+ *
938
+ * ```js
939
+ * import process from 'node:process';
940
+ *
941
+ * process.debugPort = 5858;
942
+ * ```
943
+ * @since v0.7.2
944
+ */
945
+ debugPort: number;
946
+ /**
947
+ * The `process.dlopen()` method allows dynamically loading shared objects. It is primarily used by `require()` to load C++ Addons, and
948
+ * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
949
+ * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
950
+ *
951
+ * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v26.x/api/os.html#dlopen-constants)`
952
+ * documentation for details.
953
+ *
954
+ * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
955
+ * are then accessible via `module.exports`.
956
+ *
957
+ * The example below shows how to load a C++ Addon, named `local.node`, that exports a `foo` function. All the symbols are loaded before the call returns, by passing the `RTLD_NOW` constant.
958
+ * In this example the constant is assumed to be available.
959
+ *
960
+ * ```js
961
+ * import { dlopen } from 'node:process';
962
+ * import { constants } from 'node:os';
963
+ * import { fileURLToPath } from 'node:url';
964
+ *
965
+ * const module = { exports: {} };
966
+ * dlopen(module, fileURLToPath(new URL('local.node', import.meta.url)),
967
+ * constants.dlopen.RTLD_NOW);
968
+ * module.exports.foo();
969
+ * ```
970
+ */
971
+ dlopen(module: object, filename: string, flags?: number): void;
972
+ /**
973
+ * The `process.emitWarning()` method can be used to emit custom or application
974
+ * specific process warnings. These can be listened for by adding a handler to the `'warning'` event.
975
+ *
976
+ * ```js
977
+ * import { emitWarning } from 'node:process';
978
+ *
979
+ * // Emit a warning using a string.
980
+ * emitWarning('Something happened!');
981
+ * // Emits: (node: 56338) Warning: Something happened!
982
+ * ```
983
+ *
984
+ * ```js
985
+ * import { emitWarning } from 'node:process';
986
+ *
987
+ * // Emit a warning using a string and a type.
988
+ * emitWarning('Something Happened!', 'CustomWarning');
989
+ * // Emits: (node:56338) CustomWarning: Something Happened!
990
+ * ```
991
+ *
992
+ * ```js
993
+ * import { emitWarning } from 'node:process';
994
+ *
995
+ * emitWarning('Something happened!', 'CustomWarning', 'WARN001');
996
+ * // Emits: (node:56338) [WARN001] CustomWarning: Something happened!
997
+ * ```js
998
+ *
999
+ * In each of the previous examples, an `Error` object is generated internally by `process.emitWarning()` and passed through to the `'warning'` handler.
1000
+ *
1001
+ * ```js
1002
+ * import process from 'node:process';
1003
+ *
1004
+ * process.on('warning', (warning) => {
1005
+ * console.warn(warning.name); // 'Warning'
1006
+ * console.warn(warning.message); // 'Something happened!'
1007
+ * console.warn(warning.code); // 'MY_WARNING'
1008
+ * console.warn(warning.stack); // Stack trace
1009
+ * console.warn(warning.detail); // 'This is some additional information'
1010
+ * });
1011
+ * ```
1012
+ *
1013
+ * If `warning` is passed as an `Error` object, it will be passed through to the `'warning'` event handler
1014
+ * unmodified (and the optional `type`, `code` and `ctor` arguments will be ignored):
1015
+ *
1016
+ * ```js
1017
+ * import { emitWarning } from 'node:process';
1018
+ *
1019
+ * // Emit a warning using an Error object.
1020
+ * const myWarning = new Error('Something happened!');
1021
+ * // Use the Error name property to specify the type name
1022
+ * myWarning.name = 'CustomWarning';
1023
+ * myWarning.code = 'WARN001';
1024
+ *
1025
+ * emitWarning(myWarning);
1026
+ * // Emits: (node:56338) [WARN001] CustomWarning: Something happened!
1027
+ * ```
1028
+ *
1029
+ * A `TypeError` is thrown if `warning` is anything other than a string or `Error` object.
1030
+ *
1031
+ * While process warnings use `Error` objects, the process warning mechanism is not a replacement for normal error handling mechanisms.
1032
+ *
1033
+ * The following additional handling is implemented if the warning `type` is `'DeprecationWarning'`:
1034
+ * * If the `--throw-deprecation` command-line flag is used, the deprecation warning is thrown as an exception rather than being emitted as an event.
1035
+ * * If the `--no-deprecation` command-line flag is used, the deprecation warning is suppressed.
1036
+ * * If the `--trace-deprecation` command-line flag is used, the deprecation warning is printed to `stderr` along with the full stack trace.
1037
+ * @since v8.0.0
1038
+ * @param warning The warning to emit.
1039
+ */
1040
+ emitWarning(warning: string | Error, ctor?: Function): void;
1041
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
1042
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
1043
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
1044
+ /**
1045
+ * The `process.env` property returns an object containing the user environment.
1046
+ * See [`environ(7)`](http://man7.org/linux/man-pages/man7/environ.7.html).
1047
+ *
1048
+ * An example of this object looks like:
1049
+ *
1050
+ * ```json
1051
+ * {
1052
+ * "TERM": "xterm-256color",
1053
+ * "SHELL": "/usr/local/bin/bash",
1054
+ * "USER": "maciej",
1055
+ * "PATH": "~/.bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin",
1056
+ * "PWD": "/Users/maciej",
1057
+ * "EDITOR": "vim",
1058
+ * "SHLVL": "1",
1059
+ * "HOME": "/Users/maciej",
1060
+ * "LOGNAME": "maciej",
1061
+ * "_": "/usr/local/bin/node"
1062
+ * }
1063
+ * ```
1064
+ *
1065
+ * It is possible to modify this object, but such modifications will not be
1066
+ * reflected outside the Node.js process, or (unless explicitly requested)
1067
+ * to other `Worker` threads.
1068
+ * In other words, the following example would not work:
1069
+ *
1070
+ * ```bash
1071
+ * node -e 'process.env.foo = "bar"' &#x26;&#x26; echo $foo
1072
+ * ```
1073
+ *
1074
+ * While the following will:
1075
+ *
1076
+ * ```js
1077
+ * import { env } from 'node:process';
1078
+ *
1079
+ * env.foo = 'bar';
1080
+ * console.log(env.foo);
1081
+ * ```
1082
+ *
1083
+ * Assigning a property on `process.env` will implicitly convert the value
1084
+ * to a string. **This behavior is deprecated.** Future versions of Node.js may
1085
+ * throw an error when the value is not a string, number, or boolean.
1086
+ *
1087
+ * ```js
1088
+ * import { env } from 'node:process';
1089
+ *
1090
+ * env.test = null;
1091
+ * console.log(env.test);
1092
+ * // => 'null'
1093
+ * env.test = undefined;
1094
+ * console.log(env.test);
1095
+ * // => 'undefined'
1096
+ * ```
1097
+ *
1098
+ * Use `delete` to delete a property from `process.env`.
1099
+ *
1100
+ * ```js
1101
+ * import { env } from 'node:process';
1102
+ *
1103
+ * env.TEST = 1;
1104
+ * delete env.TEST;
1105
+ * console.log(env.TEST);
1106
+ * // => undefined
1107
+ * ```
1108
+ *
1109
+ * On Windows operating systems, environment variables are case-insensitive.
1110
+ *
1111
+ * ```js
1112
+ * import { env } from 'node:process';
1113
+ *
1114
+ * env.TEST = 1;
1115
+ * console.log(env.test);
1116
+ * // => 1
1117
+ * ```
1118
+ *
1119
+ * Unless explicitly specified when creating a `Worker` instance,
1120
+ * each `Worker` thread has its own copy of `process.env`, based on its
1121
+ * parent thread's `process.env`, or whatever was specified as the `env` option
1122
+ * to the `Worker` constructor. Changes to `process.env` will not be visible
1123
+ * across `Worker` threads, and only the main thread can make changes that
1124
+ * are visible to the operating system or to native add-ons. On Windows, a copy of `process.env` on a `Worker` instance operates in a case-sensitive manner
1125
+ * unlike the main thread.
1126
+ * @since v0.1.27
1127
+ */
1128
+ env: ProcessEnv;
1129
+ /**
1130
+ * The `process.exit()` method instructs Node.js to terminate the process
1131
+ * synchronously with an exit status of `code`. If `code` is omitted, exit uses
1132
+ * either the 'success' code `0` or the value of `process.exitCode` if it has been
1133
+ * set. Node.js will not terminate until all the `'exit'` event listeners are
1134
+ * called.
1135
+ *
1136
+ * To exit with a 'failure' code:
1137
+ *
1138
+ * ```js
1139
+ * import { exit } from 'node:process';
1140
+ *
1141
+ * exit(1);
1142
+ * ```
1143
+ *
1144
+ * The shell that executed Node.js should see the exit code as `1`.
1145
+ *
1146
+ * Calling `process.exit()` will force the process to exit as quickly as possible
1147
+ * even if there are still asynchronous operations pending that have not yet
1148
+ * completed fully, including I/O operations to `process.stdout` and `process.stderr`.
1149
+ *
1150
+ * In most situations, it is not actually necessary to call `process.exit()` explicitly. The Node.js process will exit on its own _if there is no additional_
1151
+ * _work pending_ in the event loop. The `process.exitCode` property can be set to
1152
+ * tell the process which exit code to use when the process exits gracefully.
1153
+ *
1154
+ * For instance, the following example illustrates a _misuse_ of the `process.exit()` method that could lead to data printed to stdout being
1155
+ * truncated and lost:
1156
+ *
1157
+ * ```js
1158
+ * import { exit } from 'node:process';
1159
+ *
1160
+ * // This is an example of what *not* to do:
1161
+ * if (someConditionNotMet()) {
1162
+ * printUsageToStdout();
1163
+ * exit(1);
1164
+ * }
1165
+ * ```
1166
+ *
1167
+ * The reason this is problematic is because writes to `process.stdout` in Node.js
1168
+ * are sometimes _asynchronous_ and may occur over multiple ticks of the Node.js
1169
+ * event loop. Calling `process.exit()`, however, forces the process to exit _before_ those additional writes to `stdout` can be performed.
1170
+ *
1171
+ * Rather than calling `process.exit()` directly, the code _should_ set the `process.exitCode` and allow the process to exit naturally by avoiding
1172
+ * scheduling any additional work for the event loop:
1173
+ *
1174
+ * ```js
1175
+ * import process from 'node:process';
1176
+ *
1177
+ * // How to properly set the exit code while letting
1178
+ * // the process exit gracefully.
1179
+ * if (someConditionNotMet()) {
1180
+ * printUsageToStdout();
1181
+ * process.exitCode = 1;
1182
+ * }
1183
+ * ```
1184
+ *
1185
+ * If it is necessary to terminate the Node.js process due to an error condition,
1186
+ * throwing an _uncaught_ error and allowing the process to terminate accordingly
1187
+ * is safer than calling `process.exit()`.
1188
+ *
1189
+ * In `Worker` threads, this function stops the current thread rather
1190
+ * than the current process.
1191
+ * @since v0.1.13
1192
+ * @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
1193
+ */
1194
+ exit(code?: number | string | null): never;
1195
+ /**
1196
+ * A number which will be the process exit code, when the process either
1197
+ * exits gracefully, or is exited via {@link exit} without specifying
1198
+ * a code.
1199
+ *
1200
+ * Specifying a code to {@link exit} will override any
1201
+ * previous setting of `process.exitCode`.
1202
+ * @default undefined
1203
+ * @since v0.11.8
1204
+ */
1205
+ exitCode: number | string | null | undefined;
1206
+ finalization: {
1207
+ /**
1208
+ * This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
1209
+ * If the object `ref` was garbage collected before the `exit` event is emitted, the callback will be removed from the finalization registry, and it will not be called on process exit.
1210
+ *
1211
+ * Inside the callback you can release the resources allocated by the `ref` object.
1212
+ * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function,
1213
+ * this means that there is a possibility that the callback will not be called under special circumstances.
1214
+ *
1215
+ * The idea of ​​this function is to help you free up resources when the starts process exiting, but also let the object be garbage collected if it is no longer being used.
1216
+ * @param ref The reference to the resource that is being tracked.
1217
+ * @param callback The callback function to be called when the resource is finalized.
1218
+ * @since v22.5.0
1219
+ * @experimental
1220
+ */
1221
+ register<T extends object>(ref: T, callback: (ref: T, event: "exit") => void): void;
1222
+ /**
1223
+ * This function behaves exactly like the `register`, except that the callback will be called when the process emits the `beforeExit` event if `ref` object was not garbage collected.
1224
+ *
1225
+ * Be aware that all limitations applied to the `beforeExit` event are also applied to the callback function, this means that there is a possibility that the callback will not be called under special circumstances.
1226
+ * @param ref The reference to the resource that is being tracked.
1227
+ * @param callback The callback function to be called when the resource is finalized.
1228
+ * @since v22.5.0
1229
+ * @experimental
1230
+ */
1231
+ registerBeforeExit<T extends object>(ref: T, callback: (ref: T, event: "beforeExit") => void): void;
1232
+ /**
1233
+ * This function remove the register of the object from the finalization registry, so the callback will not be called anymore.
1234
+ * @param ref The reference to the resource that was registered previously.
1235
+ * @since v22.5.0
1236
+ * @experimental
1237
+ */
1238
+ unregister(ref: object): void;
1239
+ };
1240
+ /**
1241
+ * The `process.getActiveResourcesInfo()` method returns an array of strings containing
1242
+ * the types of the active resources that are currently keeping the event loop alive.
1243
+ *
1244
+ * ```js
1245
+ * import { getActiveResourcesInfo } from 'node:process';
1246
+ * import { setTimeout } from 'node:timers';
1247
+
1248
+ * console.log('Before:', getActiveResourcesInfo());
1249
+ * setTimeout(() => {}, 1000);
1250
+ * console.log('After:', getActiveResourcesInfo());
1251
+ * // Prints:
1252
+ * // Before: [ 'TTYWrap', 'TTYWrap', 'TTYWrap' ]
1253
+ * // After: [ 'TTYWrap', 'TTYWrap', 'TTYWrap', 'Timeout' ]
1254
+ * ```
1255
+ * @since v17.3.0, v16.14.0
1256
+ */
1257
+ getActiveResourcesInfo(): string[];
1258
+ /**
1259
+ * Provides a way to load built-in modules in a globally available function.
1260
+ * @param id ID of the built-in module being requested.
1261
+ */
1262
+ getBuiltinModule<ID extends keyof BuiltInModule>(id: ID): BuiltInModule[ID];
1263
+ getBuiltinModule(id: string): object | undefined;
1264
+ /**
1265
+ * The `process.getgid()` method returns the numerical group identity of the
1266
+ * process. (See [`getgid(2)`](http://man7.org/linux/man-pages/man2/getgid.2.html).)
1267
+ *
1268
+ * ```js
1269
+ * import process from 'node:process';
1270
+ *
1271
+ * if (process.getgid) {
1272
+ * console.log(`Current gid: ${process.getgid()}`);
1273
+ * }
1274
+ * ```
1275
+ *
1276
+ * This function is only available on POSIX platforms (i.e. not Windows or
1277
+ * Android).
1278
+ * @since v0.1.31
1279
+ */
1280
+ getgid?: () => number;
1281
+ /**
1282
+ * The `process.setgid()` method sets the group identity of the process. (See [`setgid(2)`](http://man7.org/linux/man-pages/man2/setgid.2.html).) The `id` can be passed as either a
1283
+ * numeric ID or a group name
1284
+ * string. If a group name is specified, this method blocks while resolving the
1285
+ * associated numeric ID.
1286
+ *
1287
+ * ```js
1288
+ * import process from 'node:process';
1289
+ *
1290
+ * if (process.getgid &#x26;&#x26; process.setgid) {
1291
+ * console.log(`Current gid: ${process.getgid()}`);
1292
+ * try {
1293
+ * process.setgid(501);
1294
+ * console.log(`New gid: ${process.getgid()}`);
1295
+ * } catch (err) {
1296
+ * console.log(`Failed to set gid: ${err}`);
1297
+ * }
1298
+ * }
1299
+ * ```
1300
+ *
1301
+ * This function is only available on POSIX platforms (i.e. not Windows or
1302
+ * Android).
1303
+ * This feature is not available in `Worker` threads.
1304
+ * @since v0.1.31
1305
+ * @param id The group name or ID
1306
+ */
1307
+ setgid?: (id: number | string) => void;
1308
+ /**
1309
+ * The `process.getuid()` method returns the numeric user identity of the process.
1310
+ * (See [`getuid(2)`](http://man7.org/linux/man-pages/man2/getuid.2.html).)
1311
+ *
1312
+ * ```js
1313
+ * import process from 'node:process';
1314
+ *
1315
+ * if (process.getuid) {
1316
+ * console.log(`Current uid: ${process.getuid()}`);
1317
+ * }
1318
+ * ```
1319
+ *
1320
+ * This function is only available on POSIX platforms (i.e. not Windows or
1321
+ * Android).
1322
+ * @since v0.1.28
1323
+ */
1324
+ getuid?: () => number;
1325
+ /**
1326
+ * The `process.setuid(id)` method sets the user identity of the process. (See [`setuid(2)`](http://man7.org/linux/man-pages/man2/setuid.2.html).) The `id` can be passed as either a
1327
+ * numeric ID or a username string.
1328
+ * If a username is specified, the method blocks while resolving the associated
1329
+ * numeric ID.
1330
+ *
1331
+ * ```js
1332
+ * import process from 'node:process';
1333
+ *
1334
+ * if (process.getuid &#x26;&#x26; process.setuid) {
1335
+ * console.log(`Current uid: ${process.getuid()}`);
1336
+ * try {
1337
+ * process.setuid(501);
1338
+ * console.log(`New uid: ${process.getuid()}`);
1339
+ * } catch (err) {
1340
+ * console.log(`Failed to set uid: ${err}`);
1341
+ * }
1342
+ * }
1343
+ * ```
1344
+ *
1345
+ * This function is only available on POSIX platforms (i.e. not Windows or
1346
+ * Android).
1347
+ * This feature is not available in `Worker` threads.
1348
+ * @since v0.1.28
1349
+ */
1350
+ setuid?: (id: number | string) => void;
1351
+ /**
1352
+ * The `process.geteuid()` method returns the numerical effective user identity of
1353
+ * the process. (See [`geteuid(2)`](http://man7.org/linux/man-pages/man2/geteuid.2.html).)
1354
+ *
1355
+ * ```js
1356
+ * import process from 'node:process';
1357
+ *
1358
+ * if (process.geteuid) {
1359
+ * console.log(`Current uid: ${process.geteuid()}`);
1360
+ * }
1361
+ * ```
1362
+ *
1363
+ * This function is only available on POSIX platforms (i.e. not Windows or
1364
+ * Android).
1365
+ * @since v2.0.0
1366
+ */
1367
+ geteuid?: () => number;
1368
+ /**
1369
+ * The `process.seteuid()` method sets the effective user identity of the process.
1370
+ * (See [`seteuid(2)`](http://man7.org/linux/man-pages/man2/seteuid.2.html).) The `id` can be passed as either a numeric ID or a username
1371
+ * string. If a username is specified, the method blocks while resolving the
1372
+ * associated numeric ID.
1373
+ *
1374
+ * ```js
1375
+ * import process from 'node:process';
1376
+ *
1377
+ * if (process.geteuid &#x26;&#x26; process.seteuid) {
1378
+ * console.log(`Current uid: ${process.geteuid()}`);
1379
+ * try {
1380
+ * process.seteuid(501);
1381
+ * console.log(`New uid: ${process.geteuid()}`);
1382
+ * } catch (err) {
1383
+ * console.log(`Failed to set uid: ${err}`);
1384
+ * }
1385
+ * }
1386
+ * ```
1387
+ *
1388
+ * This function is only available on POSIX platforms (i.e. not Windows or
1389
+ * Android).
1390
+ * This feature is not available in `Worker` threads.
1391
+ * @since v2.0.0
1392
+ * @param id A user name or ID
1393
+ */
1394
+ seteuid?: (id: number | string) => void;
1395
+ /**
1396
+ * The `process.getegid()` method returns the numerical effective group identity
1397
+ * of the Node.js process. (See [`getegid(2)`](http://man7.org/linux/man-pages/man2/getegid.2.html).)
1398
+ *
1399
+ * ```js
1400
+ * import process from 'node:process';
1401
+ *
1402
+ * if (process.getegid) {
1403
+ * console.log(`Current gid: ${process.getegid()}`);
1404
+ * }
1405
+ * ```
1406
+ *
1407
+ * This function is only available on POSIX platforms (i.e. not Windows or
1408
+ * Android).
1409
+ * @since v2.0.0
1410
+ */
1411
+ getegid?: () => number;
1412
+ /**
1413
+ * The `process.setegid()` method sets the effective group identity of the process.
1414
+ * (See [`setegid(2)`](http://man7.org/linux/man-pages/man2/setegid.2.html).) The `id` can be passed as either a numeric ID or a group
1415
+ * name string. If a group name is specified, this method blocks while resolving
1416
+ * the associated a numeric ID.
1417
+ *
1418
+ * ```js
1419
+ * import process from 'node:process';
1420
+ *
1421
+ * if (process.getegid &#x26;&#x26; process.setegid) {
1422
+ * console.log(`Current gid: ${process.getegid()}`);
1423
+ * try {
1424
+ * process.setegid(501);
1425
+ * console.log(`New gid: ${process.getegid()}`);
1426
+ * } catch (err) {
1427
+ * console.log(`Failed to set gid: ${err}`);
1428
+ * }
1429
+ * }
1430
+ * ```
1431
+ *
1432
+ * This function is only available on POSIX platforms (i.e. not Windows or
1433
+ * Android).
1434
+ * This feature is not available in `Worker` threads.
1435
+ * @since v2.0.0
1436
+ * @param id A group name or ID
1437
+ */
1438
+ setegid?: (id: number | string) => void;
1439
+ /**
1440
+ * The `process.getgroups()` method returns an array with the supplementary group
1441
+ * IDs. POSIX leaves it unspecified if the effective group ID is included but
1442
+ * Node.js ensures it always is.
1443
+ *
1444
+ * ```js
1445
+ * import process from 'node:process';
1446
+ *
1447
+ * if (process.getgroups) {
1448
+ * console.log(process.getgroups()); // [ 16, 21, 297 ]
1449
+ * }
1450
+ * ```
1451
+ *
1452
+ * This function is only available on POSIX platforms (i.e. not Windows or
1453
+ * Android).
1454
+ * @since v0.9.4
1455
+ */
1456
+ getgroups?: () => number[];
1457
+ /**
1458
+ * The `process.setgroups()` method sets the supplementary group IDs for the
1459
+ * Node.js process. This is a privileged operation that requires the Node.js
1460
+ * process to have `root` or the `CAP_SETGID` capability.
1461
+ *
1462
+ * The `groups` array can contain numeric group IDs, group names, or both.
1463
+ *
1464
+ * ```js
1465
+ * import process from 'node:process';
1466
+ *
1467
+ * if (process.getgroups &#x26;&#x26; process.setgroups) {
1468
+ * try {
1469
+ * process.setgroups([501]);
1470
+ * console.log(process.getgroups()); // new groups
1471
+ * } catch (err) {
1472
+ * console.log(`Failed to set groups: ${err}`);
1473
+ * }
1474
+ * }
1475
+ * ```
1476
+ *
1477
+ * This function is only available on POSIX platforms (i.e. not Windows or
1478
+ * Android).
1479
+ * This feature is not available in `Worker` threads.
1480
+ * @since v0.9.4
1481
+ */
1482
+ setgroups?: (groups: ReadonlyArray<string | number>) => void;
1483
+ /**
1484
+ * The `process.setUncaughtExceptionCaptureCallback()` function sets a function
1485
+ * that will be invoked when an uncaught exception occurs, which will receive the
1486
+ * exception value itself as its first argument.
1487
+ *
1488
+ * If such a function is set, the `'uncaughtException'` event will
1489
+ * not be emitted. If `--abort-on-uncaught-exception` was passed from the
1490
+ * command line or set through `v8.setFlagsFromString()`, the process will
1491
+ * not abort. Actions configured to take place on exceptions such as report
1492
+ * generations will be affected too
1493
+ *
1494
+ * To unset the capture function, `process.setUncaughtExceptionCaptureCallback(null)` may be used. Calling this
1495
+ * method with a non-`null` argument while another capture function is set will
1496
+ * throw an error.
1497
+ *
1498
+ * To register multiple callbacks that can coexist, use
1499
+ * `process.addUncaughtExceptionCaptureCallback()` instead.
1500
+ * @since v9.3.0
1501
+ */
1502
+ setUncaughtExceptionCaptureCallback(cb: ((err: unknown) => void) | null): void;
1503
+ /**
1504
+ * Indicates whether a callback has been set using {@link setUncaughtExceptionCaptureCallback}.
1505
+ * @since v9.3.0
1506
+ */
1507
+ hasUncaughtExceptionCaptureCallback(): boolean;
1508
+ /**
1509
+ * The `process.sourceMapsEnabled` property returns whether the [Source Map v3](https://sourcemaps.info/spec.html) support for stack traces is enabled.
1510
+ * @since v20.7.0
1511
+ * @experimental
1512
+ */
1513
+ readonly sourceMapsEnabled: boolean;
1514
+ /**
1515
+ * This function enables or disables the [Source Map v3](https://sourcemaps.info/spec.html) support for
1516
+ * stack traces.
1517
+ *
1518
+ * It provides same features as launching Node.js process with commandline options `--enable-source-maps`.
1519
+ *
1520
+ * Only source maps in JavaScript files that are loaded after source maps has been
1521
+ * enabled will be parsed and loaded.
1522
+ * @since v16.6.0, v14.18.0
1523
+ * @experimental
1524
+ */
1525
+ setSourceMapsEnabled(value: boolean): void;
1526
+ /**
1527
+ * The `process.version` property contains the Node.js version string.
1528
+ *
1529
+ * ```js
1530
+ * import { version } from 'node:process';
1531
+ *
1532
+ * console.log(`Version: ${version}`);
1533
+ * // Version: v14.8.0
1534
+ * ```
1535
+ *
1536
+ * To get the version string without the prepended _v_, use`process.versions.node`.
1537
+ * @since v0.1.3
1538
+ */
1539
+ readonly version: string;
1540
+ /**
1541
+ * The `process.versions` property returns an object listing the version strings of
1542
+ * Node.js and its dependencies. `process.versions.modules` indicates the current
1543
+ * ABI version, which is increased whenever a C++ API changes. Node.js will refuse
1544
+ * to load modules that were compiled against a different module ABI version.
1545
+ *
1546
+ * ```js
1547
+ * import { versions } from 'node:process';
1548
+ *
1549
+ * console.log(versions);
1550
+ * ```
1551
+ *
1552
+ * Will generate an object similar to:
1553
+ *
1554
+ * ```console
1555
+ * { node: '26.0.0-pre',
1556
+ * acorn: '8.15.0',
1557
+ * ada: '3.4.1',
1558
+ * amaro: '1.1.5',
1559
+ * ares: '1.34.6',
1560
+ * brotli: '1.2.0',
1561
+ * merve: '1.0.0',
1562
+ * cldr: '48.0',
1563
+ * icu: '78.2',
1564
+ * llhttp: '9.3.0',
1565
+ * modules: '144',
1566
+ * napi: '10',
1567
+ * nbytes: '0.1.1',
1568
+ * ncrypto: '0.0.1',
1569
+ * nghttp2: '1.68.0',
1570
+ * nghttp3: '',
1571
+ * ngtcp2: '',
1572
+ * openssl: '3.5.4',
1573
+ * simdjson: '4.2.4',
1574
+ * simdutf: '7.3.3',
1575
+ * sqlite: '3.51.2',
1576
+ * tz: '2025c',
1577
+ * undici: '7.18.2',
1578
+ * unicode: '17.0',
1579
+ * uv: '1.51.0',
1580
+ * uvwasi: '0.0.23',
1581
+ * v8: '14.3.127.18-node.10',
1582
+ * zlib: '1.3.1-e00f703',
1583
+ * zstd: '1.5.7' }
1584
+ * ```
1585
+ * @since v0.2.0
1586
+ */
1587
+ readonly versions: ProcessVersions;
1588
+ /**
1589
+ * The `process.config` property returns a frozen `Object` containing the
1590
+ * JavaScript representation of the configure options used to compile the current
1591
+ * Node.js executable. This is the same as the `config.gypi` file that was produced
1592
+ * when running the `./configure` script.
1593
+ *
1594
+ * An example of the possible output looks like:
1595
+ *
1596
+ * ```json
1597
+ * {
1598
+ * "target_defaults":
1599
+ * { "cflags": [],
1600
+ * "default_configuration": "Release",
1601
+ * "defines": [],
1602
+ * "include_dirs": [],
1603
+ * "libraries": [] },
1604
+ * "variables":
1605
+ * {
1606
+ * "host_arch": "x64",
1607
+ * "napi_build_version": 5,
1608
+ * "node_install_npm": "true",
1609
+ * "node_prefix": "",
1610
+ * "node_shared_cares": "false",
1611
+ * "node_shared_http_parser": "false",
1612
+ * "node_shared_libuv": "false",
1613
+ * "node_shared_zlib": "false",
1614
+ * "node_use_openssl": "true",
1615
+ * "node_shared_openssl": "false",
1616
+ * "target_arch": "x64",
1617
+ * "v8_use_snapshot": 1
1618
+ * }
1619
+ * }
1620
+ * ```
1621
+ * @since v0.7.7
1622
+ */
1623
+ readonly config: ProcessConfig;
1624
+ /**
1625
+ * The `process.kill()` method sends the `signal` to the process identified by`pid`.
1626
+ *
1627
+ * Signal names are strings such as `'SIGINT'` or `'SIGHUP'`. See `Signal Events` and [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for more information.
1628
+ *
1629
+ * This method will throw an error if the target `pid` does not exist. As a special
1630
+ * case, a signal of `0` can be used to test for the existence of a process.
1631
+ * Windows platforms will throw an error if the `pid` is used to kill a process
1632
+ * group.
1633
+ *
1634
+ * Even though the name of this function is `process.kill()`, it is really just a
1635
+ * signal sender, like the `kill` system call. The signal sent may do something
1636
+ * other than kill the target process.
1637
+ *
1638
+ * ```js
1639
+ * import process, { kill } from 'node:process';
1640
+ *
1641
+ * process.on('SIGHUP', () => {
1642
+ * console.log('Got SIGHUP signal.');
1643
+ * });
1644
+ *
1645
+ * setTimeout(() => {
1646
+ * console.log('Exiting.');
1647
+ * process.exit(0);
1648
+ * }, 100);
1649
+ *
1650
+ * kill(process.pid, 'SIGHUP');
1651
+ * ```
1652
+ *
1653
+ * When `SIGUSR1` is received by a Node.js process, Node.js will start the
1654
+ * debugger. See `Signal Events`.
1655
+ * @since v0.0.6
1656
+ * @param pid A process ID
1657
+ * @param [signal='SIGTERM'] The signal to send, either as a string or number.
1658
+ */
1659
+ kill(pid: number, signal?: string | number): true;
1660
+ /**
1661
+ * Loads the environment configuration from a `.env` file into `process.env`. If
1662
+ * the file is not found, error will be thrown.
1663
+ *
1664
+ * To load a specific .env file by specifying its path, use the following code:
1665
+ *
1666
+ * ```js
1667
+ * import { loadEnvFile } from 'node:process';
1668
+ *
1669
+ * loadEnvFile('./development.env')
1670
+ * ```
1671
+ * @since v20.12.0
1672
+ * @param path The path to the .env file
1673
+ */
1674
+ loadEnvFile(path?: PathLike): void;
1675
+ /**
1676
+ * The `process.pid` property returns the PID of the process.
1677
+ *
1678
+ * ```js
1679
+ * import { pid } from 'node:process';
1680
+ *
1681
+ * console.log(`This process is pid ${pid}`);
1682
+ * ```
1683
+ * @since v0.1.15
1684
+ */
1685
+ readonly pid: number;
1686
+ /**
1687
+ * The `process.ppid` property returns the PID of the parent of the
1688
+ * current process.
1689
+ *
1690
+ * ```js
1691
+ * import { ppid } from 'node:process';
1692
+ *
1693
+ * console.log(`The parent process is pid ${ppid}`);
1694
+ * ```
1695
+ * @since v9.2.0, v8.10.0, v6.13.0
1696
+ */
1697
+ readonly ppid: number;
1698
+ /**
1699
+ * The `process.threadCpuUsage()` method returns the user and system CPU time usage of
1700
+ * the current worker thread, in an object with properties `user` and `system`, whose
1701
+ * values are microsecond values (millionth of a second).
1702
+ *
1703
+ * The result of a previous call to `process.threadCpuUsage()` can be passed as the
1704
+ * argument to the function, to get a diff reading.
1705
+ * @since v23.9.0
1706
+ * @param previousValue A previous return value from calling
1707
+ * `process.threadCpuUsage()`
1708
+ */
1709
+ threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
1710
+ /**
1711
+ * The `process.title` property returns the current process title (i.e. returns
1712
+ * the current value of `ps`). Assigning a new value to `process.title` modifies
1713
+ * the current value of `ps`.
1714
+ *
1715
+ * When a new value is assigned, different platforms will impose different maximum
1716
+ * length restrictions on the title. Usually such restrictions are quite limited.
1717
+ * For instance, on Linux and macOS, `process.title` is limited to the size of the
1718
+ * binary name plus the length of the command-line arguments because setting the `process.title` overwrites the `argv` memory of the process. Node.js v0.8
1719
+ * allowed for longer process title strings by also overwriting the `environ` memory but that was potentially insecure and confusing in some (rather obscure)
1720
+ * cases.
1721
+ *
1722
+ * Assigning a value to `process.title` might not result in an accurate label
1723
+ * within process manager applications such as macOS Activity Monitor or Windows
1724
+ * Services Manager.
1725
+ * @since v0.1.104
1726
+ */
1727
+ title: string;
1728
+ /**
1729
+ * The operating system CPU architecture for which the Node.js binary was compiled.
1730
+ * Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
1731
+ * `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
1732
+ *
1733
+ * ```js
1734
+ * import { arch } from 'node:process';
1735
+ *
1736
+ * console.log(`This processor architecture is ${arch}`);
1737
+ * ```
1738
+ * @since v0.5.0
1739
+ */
1740
+ readonly arch: Architecture;
1741
+ /**
1742
+ * The `process.platform` property returns a string identifying the operating
1743
+ * system platform for which the Node.js binary was compiled.
1744
+ *
1745
+ * Currently possible values are:
1746
+ *
1747
+ * * `'aix'`
1748
+ * * `'darwin'`
1749
+ * * `'freebsd'`
1750
+ * * `'linux'`
1751
+ * * `'openbsd'`
1752
+ * * `'sunos'`
1753
+ * * `'win32'`
1754
+ *
1755
+ * ```js
1756
+ * import { platform } from 'node:process';
1757
+ *
1758
+ * console.log(`This platform is ${platform}`);
1759
+ * ```
1760
+ *
1761
+ * The value `'android'` may also be returned if the Node.js is built on the
1762
+ * Android operating system. However, Android support in Node.js [is experimental](https://github.com/nodejs/node/blob/HEAD/BUILDING.md#androidandroid-based-devices-eg-firefox-os).
1763
+ * @since v0.1.16
1764
+ */
1765
+ readonly platform: Platform;
1766
+ /**
1767
+ * The `process.mainModule` property provides an alternative way of retrieving `require.main`. The difference is that if the main module changes at
1768
+ * runtime, `require.main` may still refer to the original main module in
1769
+ * modules that were required before the change occurred. Generally, it's
1770
+ * safe to assume that the two refer to the same module.
1771
+ *
1772
+ * As with `require.main`, `process.mainModule` will be `undefined` if there
1773
+ * is no entry script.
1774
+ * @since v0.1.17
1775
+ * @deprecated Since v14.0.0 - Use `main` instead.
1776
+ */
1777
+ mainModule?: Module;
1778
+ memoryUsage: MemoryUsageFn;
1779
+ /**
1780
+ * Gets the amount of memory available to the process (in bytes) based on
1781
+ * limits imposed by the OS. If there is no such constraint, or the constraint
1782
+ * is unknown, `0` is returned.
1783
+ *
1784
+ * See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
1785
+ * information.
1786
+ * @since v19.6.0, v18.15.0
1787
+ */
1788
+ constrainedMemory(): number;
1789
+ /**
1790
+ * Gets the amount of free memory that is still available to the process (in bytes).
1791
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v26.x/api/process.html#processavailablememory) for more information.
1792
+ * @since v20.13.0
1793
+ */
1794
+ availableMemory(): number;
1795
+ /**
1796
+ * The `process.cpuUsage()` method returns the user and system CPU time usage of
1797
+ * the current process, in an object with properties `user` and `system`, whose
1798
+ * values are microsecond values (millionth of a second). These values measure time
1799
+ * spent in user and system code respectively, and may end up being greater than
1800
+ * actual elapsed time if multiple CPU cores are performing work for this process.
1801
+ *
1802
+ * The result of a previous call to `process.cpuUsage()` can be passed as the
1803
+ * argument to the function, to get a diff reading.
1804
+ *
1805
+ * ```js
1806
+ * import { cpuUsage } from 'node:process';
1807
+ *
1808
+ * const startUsage = cpuUsage();
1809
+ * // { user: 38579, system: 6986 }
1810
+ *
1811
+ * // spin the CPU for 500 milliseconds
1812
+ * const now = Date.now();
1813
+ * while (Date.now() - now < 500);
1814
+ *
1815
+ * console.log(cpuUsage(startUsage));
1816
+ * // { user: 514883, system: 11226 }
1817
+ * ```
1818
+ * @since v6.1.0
1819
+ * @param previousValue A previous return value from calling `process.cpuUsage()`
1820
+ */
1821
+ cpuUsage(previousValue?: CpuUsage): CpuUsage;
1822
+ /**
1823
+ * `process.nextTick()` adds `callback` to the "next tick queue". This queue is
1824
+ * fully drained after the current operation on the JavaScript stack runs to
1825
+ * completion and before the event loop is allowed to continue. It's possible to
1826
+ * create an infinite loop if one were to recursively call `process.nextTick()`.
1827
+ * See the [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick) guide for more background.
1828
+ *
1829
+ * ```js
1830
+ * import { nextTick } from 'node:process';
1831
+ *
1832
+ * console.log('start');
1833
+ * nextTick(() => {
1834
+ * console.log('nextTick callback');
1835
+ * });
1836
+ * console.log('scheduled');
1837
+ * // Output:
1838
+ * // start
1839
+ * // scheduled
1840
+ * // nextTick callback
1841
+ * ```
1842
+ *
1843
+ * This is important when developing APIs in order to give users the opportunity
1844
+ * to assign event handlers _after_ an object has been constructed but before any
1845
+ * I/O has occurred:
1846
+ *
1847
+ * ```js
1848
+ * import { nextTick } from 'node:process';
1849
+ *
1850
+ * function MyThing(options) {
1851
+ * this.setupOptions(options);
1852
+ *
1853
+ * nextTick(() => {
1854
+ * this.startDoingStuff();
1855
+ * });
1856
+ * }
1857
+ *
1858
+ * const thing = new MyThing();
1859
+ * thing.getReadyForStuff();
1860
+ *
1861
+ * // thing.startDoingStuff() gets called now, not before.
1862
+ * ```
1863
+ *
1864
+ * It is very important for APIs to be either 100% synchronous or 100%
1865
+ * asynchronous. Consider this example:
1866
+ *
1867
+ * ```js
1868
+ * // WARNING! DO NOT USE! BAD UNSAFE HAZARD!
1869
+ * function maybeSync(arg, cb) {
1870
+ * if (arg) {
1871
+ * cb();
1872
+ * return;
1873
+ * }
1874
+ *
1875
+ * fs.stat('file', cb);
1876
+ * }
1877
+ * ```
1878
+ *
1879
+ * This API is hazardous because in the following case:
1880
+ *
1881
+ * ```js
1882
+ * const maybeTrue = Math.random() > 0.5;
1883
+ *
1884
+ * maybeSync(maybeTrue, () => {
1885
+ * foo();
1886
+ * });
1887
+ *
1888
+ * bar();
1889
+ * ```
1890
+ *
1891
+ * It is not clear whether `foo()` or `bar()` will be called first.
1892
+ *
1893
+ * The following approach is much better:
1894
+ *
1895
+ * ```js
1896
+ * import { nextTick } from 'node:process';
1897
+ *
1898
+ * function definitelyAsync(arg, cb) {
1899
+ * if (arg) {
1900
+ * nextTick(cb);
1901
+ * return;
1902
+ * }
1903
+ *
1904
+ * fs.stat('file', cb);
1905
+ * }
1906
+ * ```
1907
+ * @since v0.1.26
1908
+ * @param args Additional arguments to pass when invoking the `callback`
1909
+ */
1910
+ nextTick(callback: Function, ...args: any[]): void;
1911
+ /**
1912
+ * The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
1913
+ * See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
1914
+ */
1915
+ noDeprecation?: boolean;
1916
+ /**
1917
+ * This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
1918
+ *
1919
+ * `process.permission` is an object whose methods are used to manage permissions for the current process.
1920
+ * Additional documentation is available in the [Permission Model](https://nodejs.org/api/permissions.html#permission-model).
1921
+ * @since v20.0.0
1922
+ */
1923
+ permission: ProcessPermission;
1924
+ /**
1925
+ * The `process.release` property returns an `Object` containing metadata related
1926
+ * to the current release, including URLs for the source tarball and headers-only
1927
+ * tarball.
1928
+ *
1929
+ * `process.release` contains the following properties:
1930
+ *
1931
+ * ```json
1932
+ * {
1933
+ * "name": "node",
1934
+ * "lts": "Hydrogen",
1935
+ * "sourceUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0.tar.gz",
1936
+ * "headersUrl": "https://nodejs.org/download/release/v18.12.0/node-v18.12.0-headers.tar.gz",
1937
+ * "libUrl": "https://nodejs.org/download/release/v18.12.0/win-x64/node.lib"
1938
+ * }
1939
+ * ```
1940
+ *
1941
+ * In custom builds from non-release versions of the source tree, only the `name` property may be present. The additional properties should not be
1942
+ * relied upon to exist.
1943
+ * @since v3.0.0
1944
+ */
1945
+ readonly release: ProcessRelease;
1946
+ readonly features: ProcessFeatures;
1947
+ /**
1948
+ * The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
1949
+ * is set on the current Node.js process. This property allows programmatic control over the
1950
+ * tracing of warnings, enabling or disabling stack traces for warnings at runtime.
1951
+ *
1952
+ * ```js
1953
+ * // Enable trace warnings
1954
+ * process.traceProcessWarnings = true;
1955
+ *
1956
+ * // Emit a warning with a stack trace
1957
+ * process.emitWarning('Warning with stack trace');
1958
+ *
1959
+ * // Disable trace warnings
1960
+ * process.traceProcessWarnings = false;
1961
+ * ```
1962
+ * @since v6.10.0
1963
+ */
1964
+ traceProcessWarnings: boolean;
1965
+ /**
1966
+ * `process.umask()` returns the Node.js process's file mode creation mask. Child
1967
+ * processes inherit the mask from the parent process.
1968
+ * @since v0.1.19
1969
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential
1970
+ * security vulnerability. There is no safe, cross-platform alternative API.
1971
+ */
1972
+ umask(): number;
1973
+ /**
1974
+ * Can only be set if not in worker thread.
1975
+ */
1976
+ umask(mask: string | number): number;
1977
+ /**
1978
+ * The `process.uptime()` method returns the number of seconds the current Node.js
1979
+ * process has been running.
1980
+ *
1981
+ * The return value includes fractions of a second. Use `Math.floor()` to get whole
1982
+ * seconds.
1983
+ * @since v0.5.0
1984
+ */
1985
+ uptime(): number;
1986
+ hrtime: HRTime;
1987
+ /**
1988
+ * If the Node.js process was spawned with an IPC channel, the process.channel property is a reference to the IPC channel.
1989
+ * If no IPC channel exists, this property is undefined.
1990
+ * @since v7.1.0
1991
+ */
1992
+ channel?: Control;
1993
+ /**
1994
+ * If Node.js is spawned with an IPC channel, the `process.send()` method can be
1995
+ * used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
1996
+ *
1997
+ * If Node.js was not spawned with an IPC channel, `process.send` will be `undefined`.
1998
+ *
1999
+ * The message goes through serialization and parsing. The resulting message might
2000
+ * not be the same as what is originally sent.
2001
+ * @since v0.5.9
2002
+ * @param options used to parameterize the sending of certain types of handles. `options` supports the following properties:
2003
+ */
2004
+ send?(
2005
+ message: any,
2006
+ sendHandle?: SendHandle,
2007
+ options?: MessageOptions,
2008
+ callback?: (error: Error | null) => void,
2009
+ ): boolean;
2010
+ send?(
2011
+ message: any,
2012
+ sendHandle: SendHandle,
2013
+ callback?: (error: Error | null) => void,
2014
+ ): boolean;
2015
+ send?(
2016
+ message: any,
2017
+ callback: (error: Error | null) => void,
2018
+ ): boolean;
2019
+ /**
2020
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
2021
+ * IPC channel to the parent process, allowing the child process to exit gracefully
2022
+ * once there are no other connections keeping it alive.
2023
+ *
2024
+ * The effect of calling `process.disconnect()` is the same as calling `ChildProcess.disconnect()` from the parent process.
2025
+ *
2026
+ * If the Node.js process was not spawned with an IPC channel, `process.disconnect()` will be `undefined`.
2027
+ * @since v0.7.2
2028
+ */
2029
+ disconnect?(): void;
2030
+ /**
2031
+ * If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.connected` property will return `true` so long as the IPC
2032
+ * channel is connected and will return `false` after `process.disconnect()` is called.
2033
+ *
2034
+ * Once `process.connected` is `false`, it is no longer possible to send messages
2035
+ * over the IPC channel using `process.send()`.
2036
+ * @since v0.7.2
2037
+ */
2038
+ connected: boolean;
2039
+ /**
2040
+ * The `process.allowedNodeEnvironmentFlags` property is a special,
2041
+ * read-only `Set` of flags allowable within the `NODE_OPTIONS` environment variable.
2042
+ *
2043
+ * `process.allowedNodeEnvironmentFlags` extends `Set`, but overrides `Set.prototype.has` to recognize several different possible flag
2044
+ * representations. `process.allowedNodeEnvironmentFlags.has()` will
2045
+ * return `true` in the following cases:
2046
+ *
2047
+ * * Flags may omit leading single (`-`) or double (`--`) dashes; e.g., `inspect-brk` for `--inspect-brk`, or `r` for `-r`.
2048
+ * * Flags passed through to V8 (as listed in `--v8-options`) may replace
2049
+ * one or more _non-leading_ dashes for an underscore, or vice-versa;
2050
+ * e.g., `--perf_basic_prof`, `--perf-basic-prof`, `--perf_basic-prof`,
2051
+ * etc.
2052
+ * * Flags may contain one or more equals (`=`) characters; all
2053
+ * characters after and including the first equals will be ignored;
2054
+ * e.g., `--stack-trace-limit=100`.
2055
+ * * Flags _must_ be allowable within `NODE_OPTIONS`.
2056
+ *
2057
+ * When iterating over `process.allowedNodeEnvironmentFlags`, flags will
2058
+ * appear only _once_; each will begin with one or more dashes. Flags
2059
+ * passed through to V8 will contain underscores instead of non-leading
2060
+ * dashes:
2061
+ *
2062
+ * ```js
2063
+ * import { allowedNodeEnvironmentFlags } from 'node:process';
2064
+ *
2065
+ * allowedNodeEnvironmentFlags.forEach((flag) => {
2066
+ * // -r
2067
+ * // --inspect-brk
2068
+ * // --abort_on_uncaught_exception
2069
+ * // ...
2070
+ * });
2071
+ * ```
2072
+ *
2073
+ * The methods `add()`, `clear()`, and `delete()` of`process.allowedNodeEnvironmentFlags` do nothing, and will fail
2074
+ * silently.
2075
+ *
2076
+ * If Node.js was compiled _without_ `NODE_OPTIONS` support (shown in {@link config}), `process.allowedNodeEnvironmentFlags` will
2077
+ * contain what _would have_ been allowable.
2078
+ * @since v10.10.0
2079
+ */
2080
+ allowedNodeEnvironmentFlags: ReadonlySet<string>;
2081
+ /**
2082
+ * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
2083
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v26.x/api/report.html).
2084
+ * @since v11.8.0
2085
+ */
2086
+ report: ProcessReport;
2087
+ /**
2088
+ * ```js
2089
+ * import { resourceUsage } from 'node:process';
2090
+ *
2091
+ * console.log(resourceUsage());
2092
+ * /*
2093
+ * Will output:
2094
+ * {
2095
+ * userCPUTime: 82872,
2096
+ * systemCPUTime: 4143,
2097
+ * maxRSS: 33164,
2098
+ * sharedMemorySize: 0,
2099
+ * unsharedDataSize: 0,
2100
+ * unsharedStackSize: 0,
2101
+ * minorPageFault: 2469,
2102
+ * majorPageFault: 0,
2103
+ * swappedOut: 0,
2104
+ * fsRead: 0,
2105
+ * fsWrite: 8,
2106
+ * ipcSent: 0,
2107
+ * ipcReceived: 0,
2108
+ * signalsCount: 0,
2109
+ * voluntaryContextSwitches: 79,
2110
+ * involuntaryContextSwitches: 1
2111
+ * }
2112
+ *
2113
+ * ```
2114
+ * @since v12.6.0
2115
+ * @return the resource usage for the current process. All of these values come from the `uv_getrusage` call which returns a [`uv_rusage_t` struct][uv_rusage_t].
2116
+ */
2117
+ resourceUsage(): ResourceUsage;
2118
+ /**
2119
+ * The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. `process.throwDeprecation`
2120
+ * is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the 'warning' event and the emitWarning()
2121
+ * method for more information.
2122
+ *
2123
+ * ```bash
2124
+ * $ node --throw-deprecation -p "process.throwDeprecation"
2125
+ * true
2126
+ * $ node -p "process.throwDeprecation"
2127
+ * undefined
2128
+ * $ node
2129
+ * > process.emitWarning('test', 'DeprecationWarning');
2130
+ * undefined
2131
+ * > (node:26598) DeprecationWarning: test
2132
+ * > process.throwDeprecation = true;
2133
+ * true
2134
+ * > process.emitWarning('test', 'DeprecationWarning');
2135
+ * Thrown:
2136
+ * [DeprecationWarning: test] { name: 'DeprecationWarning' }
2137
+ * ```
2138
+ * @since v0.9.12
2139
+ */
2140
+ throwDeprecation: boolean;
2141
+ /**
2142
+ * The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the
2143
+ * documentation for the `'warning' event` and the `emitWarning() method` for more information about this
2144
+ * flag's behavior.
2145
+ * @since v0.8.0
2146
+ */
2147
+ traceDeprecation: boolean;
2148
+ /**
2149
+ * An object is "refable" if it implements the Node.js "Refable protocol".
2150
+ * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
2151
+ * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
2152
+ * event loop alive, while "unref'd" objects will not. Historically, this was
2153
+ * implemented by using `ref()` and `unref()` methods directly on the objects.
2154
+ * This pattern, however, is being deprecated in favor of the "Refable protocol"
2155
+ * in order to better support Web Platform API types whose APIs cannot be modified
2156
+ * to add `ref()` and `unref()` methods but still need to support that behavior.
2157
+ * @since v22.14.0
2158
+ * @experimental
2159
+ * @param maybeRefable An object that may be "refable".
2160
+ */
2161
+ ref(maybeRefable: any): void;
2162
+ /**
2163
+ * An object is "unrefable" if it implements the Node.js "Refable protocol".
2164
+ * Specifically, this means that the object implements the `Symbol.for('nodejs.ref')`
2165
+ * and `Symbol.for('nodejs.unref')` methods. "Ref'd" objects will keep the Node.js
2166
+ * event loop alive, while "unref'd" objects will not. Historically, this was
2167
+ * implemented by using `ref()` and `unref()` methods directly on the objects.
2168
+ * This pattern, however, is being deprecated in favor of the "Refable protocol"
2169
+ * in order to better support Web Platform API types whose APIs cannot be modified
2170
+ * to add `ref()` and `unref()` methods but still need to support that behavior.
2171
+ * @since v22.14.0
2172
+ * @experimental
2173
+ * @param maybeRefable An object that may be "unref'd".
2174
+ */
2175
+ unref(maybeRefable: any): void;
2176
+ /**
2177
+ * Replaces the current process with a new process.
2178
+ *
2179
+ * This is achieved by using the `execve` POSIX function and therefore no memory or other
2180
+ * resources from the current process are preserved, except for the standard input,
2181
+ * standard output and standard error file descriptor.
2182
+ *
2183
+ * All other resources are discarded by the system when the processes are swapped, without triggering
2184
+ * any exit or close events and without running any cleanup handler.
2185
+ *
2186
+ * On success, all other resources are discarded by the system when the
2187
+ * processes are swapped, without triggering any exit or close events, without
2188
+ * running any JavaScript cleanup handler (for example `process.on('exit')`),
2189
+ * and without invoking native `AtExit` callbacks registered through the
2190
+ * embedder API. Callers that need to run cleanup logic should do so before
2191
+ * calling `process.execve()`.
2192
+ *
2193
+ * This function does not return on success. If the underlying `execve(2)`
2194
+ * system call fails, an `Error` is thrown whose `code` property is set to the
2195
+ * corresponding `errno` string (for example, `'ENOENT'` when `file` does not
2196
+ * exist), with `syscall` set to `'execve'` and `path` set to `file`. When
2197
+ * `execve(2)` fails the current process continues to run with its state
2198
+ * unchanged, so a caller may handle the error and take another action.
2199
+ *
2200
+ * This function is not available on Windows or IBM i.
2201
+ * @since v22.15.0
2202
+ * @experimental
2203
+ * @param file The name or path of the executable file to run.
2204
+ * @param args List of string arguments. No argument can contain a null-byte (`\u0000`).
2205
+ * @param env Environment key-value pairs.
2206
+ * No key or value can contain a null-byte (`\u0000`).
2207
+ * **Default:** `process.env`.
2208
+ */
2209
+ execve?(file: string, args?: readonly string[], env?: ProcessEnv): never;
2210
+ // #region InternalEventEmitter
2211
+ addListener<E extends keyof ProcessEventMap>(
2212
+ eventName: E,
2213
+ listener: (...args: ProcessEventMap[E]) => void,
2214
+ ): this;
2215
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2216
+ emit<E extends keyof ProcessEventMap>(eventName: E, ...args: ProcessEventMap[E]): boolean;
2217
+ emit(eventName: string | symbol, ...args: any[]): boolean;
2218
+ listenerCount<E extends keyof ProcessEventMap>(
2219
+ eventName: E,
2220
+ listener?: (...args: ProcessEventMap[E]) => void,
2221
+ ): number;
2222
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
2223
+ listeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2224
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
2225
+ off<E extends keyof ProcessEventMap>(
2226
+ eventName: E,
2227
+ listener: (...args: ProcessEventMap[E]) => void,
2228
+ ): this;
2229
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
2230
+ on<E extends keyof ProcessEventMap>(
2231
+ eventName: E,
2232
+ listener: (...args: ProcessEventMap[E]) => void,
2233
+ ): this;
2234
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
2235
+ once<E extends keyof ProcessEventMap>(
2236
+ eventName: E,
2237
+ listener: (...args: ProcessEventMap[E]) => void,
2238
+ ): this;
2239
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
2240
+ prependListener<E extends keyof ProcessEventMap>(
2241
+ eventName: E,
2242
+ listener: (...args: ProcessEventMap[E]) => void,
2243
+ ): this;
2244
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2245
+ prependOnceListener<E extends keyof ProcessEventMap>(
2246
+ eventName: E,
2247
+ listener: (...args: ProcessEventMap[E]) => void,
2248
+ ): this;
2249
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2250
+ rawListeners<E extends keyof ProcessEventMap>(eventName: E): ((...args: ProcessEventMap[E]) => void)[];
2251
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
2252
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
2253
+ removeAllListeners<E extends keyof ProcessEventMap>(eventName?: E): this;
2254
+ removeAllListeners(eventName?: string | symbol): this;
2255
+ removeListener<E extends keyof ProcessEventMap>(
2256
+ eventName: E,
2257
+ listener: (...args: ProcessEventMap[E]) => void,
2258
+ ): this;
2259
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
2260
+ // #endregion
2261
+ }
2262
+ }
2263
+ }
2264
+ export = process;
2265
+ }
2266
+ declare module "process" {
2267
+ import process = require("node:process");
2268
+ export = process;
2269
+ }