[add] server:lib:node_modules
Christian Fraß

Christian Fraß commited on 2021-03-08 23:52:07
Zeige 77 geänderte Dateien mit 22597 Einfügungen und 0 Löschungen.

... ...
@@ -0,0 +1 @@
1
+../detect-libc/bin/detect-libc.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../mkdirp/bin/cmd.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../needle/bin/needle
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../node-gyp/bin/node-gyp.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../node-pre-gyp/bin/node-pre-gyp
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../nopt/bin/nopt.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../rc/cli.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../rimraf/bin.js
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../semver/bin/semver
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-conv
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-sign
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../sshpk/bin/sshpk-verify
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../uuid/bin/uuid
0 2
\ No newline at end of file
... ...
@@ -0,0 +1 @@
1
+../which/bin/which
0 2
\ No newline at end of file
... ...
@@ -0,0 +1,1133 @@
1
+{
2
+  "name": "lib",
3
+  "lockfileVersion": 2,
4
+  "requires": true,
5
+  "packages": {
6
+    "node_modules/@types/node": {
7
+      "version": "14.14.31",
8
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz",
9
+      "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g=="
10
+    },
11
+    "node_modules/abbrev": {
12
+      "version": "1.1.1",
13
+      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
14
+      "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
15
+    },
16
+    "node_modules/ajv": {
17
+      "version": "6.12.6",
18
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
19
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
20
+      "optional": true,
21
+      "dependencies": {
22
+        "fast-deep-equal": "^3.1.1",
23
+        "fast-json-stable-stringify": "^2.0.0",
24
+        "json-schema-traverse": "^0.4.1",
25
+        "uri-js": "^4.2.2"
26
+      },
27
+      "funding": {
28
+        "type": "github",
29
+        "url": "https://github.com/sponsors/epoberezkin"
30
+      }
31
+    },
32
+    "node_modules/ansi-regex": {
33
+      "version": "2.1.1",
34
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
35
+      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
36
+      "engines": {
37
+        "node": ">=0.10.0"
38
+      }
39
+    },
40
+    "node_modules/aproba": {
41
+      "version": "1.2.0",
42
+      "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
43
+      "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
44
+    },
45
+    "node_modules/are-we-there-yet": {
46
+      "version": "1.1.5",
47
+      "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
48
+      "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
49
+      "dependencies": {
50
+        "delegates": "^1.0.0",
51
+        "readable-stream": "^2.0.6"
52
+      }
53
+    },
54
+    "node_modules/asn1": {
55
+      "version": "0.2.4",
56
+      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
57
+      "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
58
+      "optional": true,
59
+      "dependencies": {
60
+        "safer-buffer": "~2.1.0"
61
+      }
62
+    },
63
+    "node_modules/assert-plus": {
64
+      "version": "1.0.0",
65
+      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
66
+      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
67
+      "optional": true,
68
+      "engines": {
69
+        "node": ">=0.8"
70
+      }
71
+    },
72
+    "node_modules/asynckit": {
73
+      "version": "0.4.0",
74
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
75
+      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
76
+      "optional": true
77
+    },
78
+    "node_modules/aws-sign2": {
79
+      "version": "0.7.0",
80
+      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
81
+      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
82
+      "optional": true,
83
+      "engines": {
84
+        "node": "*"
85
+      }
86
+    },
87
+    "node_modules/aws4": {
88
+      "version": "1.11.0",
89
+      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
90
+      "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
91
+      "optional": true
92
+    },
93
+    "node_modules/balanced-match": {
94
+      "version": "1.0.0",
95
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
96
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
97
+    },
98
+    "node_modules/bcrypt-pbkdf": {
99
+      "version": "1.0.2",
100
+      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
101
+      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
102
+      "optional": true,
103
+      "dependencies": {
104
+        "tweetnacl": "^0.14.3"
105
+      }
106
+    },
107
+    "node_modules/block-stream": {
108
+      "version": "0.0.9",
109
+      "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz",
110
+      "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=",
111
+      "optional": true,
112
+      "dependencies": {
113
+        "inherits": "~2.0.0"
114
+      },
115
+      "engines": {
116
+        "node": "0.4 || >=0.5.8"
117
+      }
118
+    },
119
+    "node_modules/brace-expansion": {
120
+      "version": "1.1.11",
121
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
122
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
123
+      "dependencies": {
124
+        "balanced-match": "^1.0.0",
125
+        "concat-map": "0.0.1"
126
+      }
127
+    },
128
+    "node_modules/caseless": {
129
+      "version": "0.12.0",
130
+      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
131
+      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
132
+      "optional": true
133
+    },
134
+    "node_modules/chownr": {
135
+      "version": "1.1.4",
136
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
137
+      "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
138
+    },
139
+    "node_modules/code-point-at": {
140
+      "version": "1.1.0",
141
+      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
142
+      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
143
+      "engines": {
144
+        "node": ">=0.10.0"
145
+      }
146
+    },
147
+    "node_modules/combined-stream": {
148
+      "version": "1.0.8",
149
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
150
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
151
+      "optional": true,
152
+      "dependencies": {
153
+        "delayed-stream": "~1.0.0"
154
+      },
155
+      "engines": {
156
+        "node": ">= 0.8"
157
+      }
158
+    },
159
+    "node_modules/concat-map": {
160
+      "version": "0.0.1",
161
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
162
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
163
+    },
164
+    "node_modules/console-control-strings": {
165
+      "version": "1.1.0",
166
+      "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
167
+      "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
168
+    },
169
+    "node_modules/core-util-is": {
170
+      "version": "1.0.2",
171
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
172
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
173
+    },
174
+    "node_modules/dashdash": {
175
+      "version": "1.14.1",
176
+      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
177
+      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
178
+      "optional": true,
179
+      "dependencies": {
180
+        "assert-plus": "^1.0.0"
181
+      },
182
+      "engines": {
183
+        "node": ">=0.10"
184
+      }
185
+    },
186
+    "node_modules/debug": {
187
+      "version": "3.2.7",
188
+      "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
189
+      "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
190
+      "dependencies": {
191
+        "ms": "^2.1.1"
192
+      }
193
+    },
194
+    "node_modules/deep-extend": {
195
+      "version": "0.6.0",
196
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
197
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
198
+      "engines": {
199
+        "node": ">=4.0.0"
200
+      }
201
+    },
202
+    "node_modules/delayed-stream": {
203
+      "version": "1.0.0",
204
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
205
+      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
206
+      "optional": true,
207
+      "engines": {
208
+        "node": ">=0.4.0"
209
+      }
210
+    },
211
+    "node_modules/delegates": {
212
+      "version": "1.0.0",
213
+      "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
214
+      "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
215
+    },
216
+    "node_modules/detect-libc": {
217
+      "version": "1.0.3",
218
+      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
219
+      "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
220
+      "bin": {
221
+        "detect-libc": "bin/detect-libc.js"
222
+      },
223
+      "engines": {
224
+        "node": ">=0.10"
225
+      }
226
+    },
227
+    "node_modules/ecc-jsbn": {
228
+      "version": "0.1.2",
229
+      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
230
+      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
231
+      "optional": true,
232
+      "dependencies": {
233
+        "jsbn": "~0.1.0",
234
+        "safer-buffer": "^2.1.0"
235
+      }
236
+    },
237
+    "node_modules/extend": {
238
+      "version": "3.0.2",
239
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
240
+      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
241
+      "optional": true
242
+    },
243
+    "node_modules/extsprintf": {
244
+      "version": "1.3.0",
245
+      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
246
+      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
247
+      "engines": [
248
+        "node >=0.6.0"
249
+      ],
250
+      "optional": true
251
+    },
252
+    "node_modules/fast-deep-equal": {
253
+      "version": "3.1.3",
254
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
255
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
256
+      "optional": true
257
+    },
258
+    "node_modules/fast-json-stable-stringify": {
259
+      "version": "2.1.0",
260
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
261
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
262
+      "optional": true
263
+    },
264
+    "node_modules/forever-agent": {
265
+      "version": "0.6.1",
266
+      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
267
+      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
268
+      "optional": true,
269
+      "engines": {
270
+        "node": "*"
271
+      }
272
+    },
273
+    "node_modules/form-data": {
274
+      "version": "2.3.3",
275
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
276
+      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
277
+      "optional": true,
278
+      "dependencies": {
279
+        "asynckit": "^0.4.0",
280
+        "combined-stream": "^1.0.6",
281
+        "mime-types": "^2.1.12"
282
+      },
283
+      "engines": {
284
+        "node": ">= 0.12"
285
+      }
286
+    },
287
+    "node_modules/fs-minipass": {
288
+      "version": "1.2.7",
289
+      "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
290
+      "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
291
+      "dependencies": {
292
+        "minipass": "^2.6.0"
293
+      }
294
+    },
295
+    "node_modules/fs.realpath": {
296
+      "version": "1.0.0",
297
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
298
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
299
+    },
300
+    "node_modules/fstream": {
301
+      "version": "1.0.12",
302
+      "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
303
+      "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
304
+      "optional": true,
305
+      "dependencies": {
306
+        "graceful-fs": "^4.1.2",
307
+        "inherits": "~2.0.0",
308
+        "mkdirp": ">=0.5 0",
309
+        "rimraf": "2"
310
+      },
311
+      "engines": {
312
+        "node": ">=0.6"
313
+      }
314
+    },
315
+    "node_modules/gauge": {
316
+      "version": "2.7.4",
317
+      "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
318
+      "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
319
+      "dependencies": {
320
+        "aproba": "^1.0.3",
321
+        "console-control-strings": "^1.0.0",
322
+        "has-unicode": "^2.0.0",
323
+        "object-assign": "^4.1.0",
324
+        "signal-exit": "^3.0.0",
325
+        "string-width": "^1.0.1",
326
+        "strip-ansi": "^3.0.1",
327
+        "wide-align": "^1.1.0"
328
+      }
329
+    },
330
+    "node_modules/getpass": {
331
+      "version": "0.1.7",
332
+      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
333
+      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
334
+      "optional": true,
335
+      "dependencies": {
336
+        "assert-plus": "^1.0.0"
337
+      }
338
+    },
339
+    "node_modules/glob": {
340
+      "version": "7.1.6",
341
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
342
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
343
+      "dependencies": {
344
+        "fs.realpath": "^1.0.0",
345
+        "inflight": "^1.0.4",
346
+        "inherits": "2",
347
+        "minimatch": "^3.0.4",
348
+        "once": "^1.3.0",
349
+        "path-is-absolute": "^1.0.0"
350
+      },
351
+      "engines": {
352
+        "node": "*"
353
+      },
354
+      "funding": {
355
+        "url": "https://github.com/sponsors/isaacs"
356
+      }
357
+    },
358
+    "node_modules/graceful-fs": {
359
+      "version": "4.2.6",
360
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
361
+      "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
362
+      "optional": true
363
+    },
364
+    "node_modules/har-schema": {
365
+      "version": "2.0.0",
366
+      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
367
+      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
368
+      "optional": true,
369
+      "engines": {
370
+        "node": ">=4"
371
+      }
372
+    },
373
+    "node_modules/har-validator": {
374
+      "version": "5.1.5",
375
+      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
376
+      "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
377
+      "deprecated": "this library is no longer supported",
378
+      "optional": true,
379
+      "dependencies": {
380
+        "ajv": "^6.12.3",
381
+        "har-schema": "^2.0.0"
382
+      },
383
+      "engines": {
384
+        "node": ">=6"
385
+      }
386
+    },
387
+    "node_modules/has-unicode": {
388
+      "version": "2.0.1",
389
+      "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
390
+      "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
391
+    },
392
+    "node_modules/http-signature": {
393
+      "version": "1.2.0",
394
+      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
395
+      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
396
+      "optional": true,
397
+      "dependencies": {
398
+        "assert-plus": "^1.0.0",
399
+        "jsprim": "^1.2.2",
400
+        "sshpk": "^1.7.0"
401
+      },
402
+      "engines": {
403
+        "node": ">=0.8",
404
+        "npm": ">=1.3.7"
405
+      }
406
+    },
407
+    "node_modules/iconv-lite": {
408
+      "version": "0.4.24",
409
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
410
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
411
+      "dependencies": {
412
+        "safer-buffer": ">= 2.1.2 < 3"
413
+      },
414
+      "engines": {
415
+        "node": ">=0.10.0"
416
+      }
417
+    },
418
+    "node_modules/ignore-walk": {
419
+      "version": "3.0.3",
420
+      "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
421
+      "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
422
+      "dependencies": {
423
+        "minimatch": "^3.0.4"
424
+      }
425
+    },
426
+    "node_modules/inflight": {
427
+      "version": "1.0.6",
428
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
429
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
430
+      "dependencies": {
431
+        "once": "^1.3.0",
432
+        "wrappy": "1"
433
+      }
434
+    },
435
+    "node_modules/inherits": {
436
+      "version": "2.0.4",
437
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
438
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
439
+    },
440
+    "node_modules/ini": {
441
+      "version": "1.3.8",
442
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
443
+      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
444
+    },
445
+    "node_modules/is-fullwidth-code-point": {
446
+      "version": "1.0.0",
447
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
448
+      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
449
+      "dependencies": {
450
+        "number-is-nan": "^1.0.0"
451
+      },
452
+      "engines": {
453
+        "node": ">=0.10.0"
454
+      }
455
+    },
456
+    "node_modules/is-typedarray": {
457
+      "version": "1.0.0",
458
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
459
+      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
460
+      "optional": true
461
+    },
462
+    "node_modules/isarray": {
463
+      "version": "1.0.0",
464
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
465
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
466
+    },
467
+    "node_modules/isexe": {
468
+      "version": "2.0.0",
469
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
470
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
471
+      "optional": true
472
+    },
473
+    "node_modules/isstream": {
474
+      "version": "0.1.2",
475
+      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
476
+      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
477
+      "optional": true
478
+    },
479
+    "node_modules/jsbn": {
480
+      "version": "0.1.1",
481
+      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
482
+      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
483
+      "optional": true
484
+    },
485
+    "node_modules/json-schema": {
486
+      "version": "0.2.3",
487
+      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
488
+      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
489
+      "optional": true
490
+    },
491
+    "node_modules/json-schema-traverse": {
492
+      "version": "0.4.1",
493
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
494
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
495
+      "optional": true
496
+    },
497
+    "node_modules/json-stringify-safe": {
498
+      "version": "5.0.1",
499
+      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
500
+      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
501
+      "optional": true
502
+    },
503
+    "node_modules/jsprim": {
504
+      "version": "1.4.1",
505
+      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
506
+      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
507
+      "engines": [
508
+        "node >=0.6.0"
509
+      ],
510
+      "optional": true,
511
+      "dependencies": {
512
+        "assert-plus": "1.0.0",
513
+        "extsprintf": "1.3.0",
514
+        "json-schema": "0.2.3",
515
+        "verror": "1.10.0"
516
+      }
517
+    },
518
+    "node_modules/mime-db": {
519
+      "version": "1.46.0",
520
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz",
521
+      "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==",
522
+      "optional": true,
523
+      "engines": {
524
+        "node": ">= 0.6"
525
+      }
526
+    },
527
+    "node_modules/mime-types": {
528
+      "version": "2.1.29",
529
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz",
530
+      "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==",
531
+      "optional": true,
532
+      "dependencies": {
533
+        "mime-db": "1.46.0"
534
+      },
535
+      "engines": {
536
+        "node": ">= 0.6"
537
+      }
538
+    },
539
+    "node_modules/minimatch": {
540
+      "version": "3.0.4",
541
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
542
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
543
+      "dependencies": {
544
+        "brace-expansion": "^1.1.7"
545
+      },
546
+      "engines": {
547
+        "node": "*"
548
+      }
549
+    },
550
+    "node_modules/minimist": {
551
+      "version": "1.2.5",
552
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
553
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
554
+    },
555
+    "node_modules/minipass": {
556
+      "version": "2.9.0",
557
+      "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
558
+      "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
559
+      "dependencies": {
560
+        "safe-buffer": "^5.1.2",
561
+        "yallist": "^3.0.0"
562
+      }
563
+    },
564
+    "node_modules/minizlib": {
565
+      "version": "1.3.3",
566
+      "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
567
+      "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
568
+      "dependencies": {
569
+        "minipass": "^2.9.0"
570
+      }
571
+    },
572
+    "node_modules/mkdirp": {
573
+      "version": "0.5.5",
574
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
575
+      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
576
+      "dependencies": {
577
+        "minimist": "^1.2.5"
578
+      },
579
+      "bin": {
580
+        "mkdirp": "bin/cmd.js"
581
+      }
582
+    },
583
+    "node_modules/ms": {
584
+      "version": "2.1.3",
585
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
586
+      "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
587
+    },
588
+    "node_modules/needle": {
589
+      "version": "2.6.0",
590
+      "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
591
+      "integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
592
+      "dependencies": {
593
+        "debug": "^3.2.6",
594
+        "iconv-lite": "^0.4.4",
595
+        "sax": "^1.2.4"
596
+      },
597
+      "bin": {
598
+        "needle": "bin/needle"
599
+      },
600
+      "engines": {
601
+        "node": ">= 4.4.x"
602
+      }
603
+    },
604
+    "node_modules/node-addon-api": {
605
+      "version": "3.1.0",
606
+      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz",
607
+      "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw=="
608
+    },
609
+    "node_modules/node-gyp": {
610
+      "version": "3.8.0",
611
+      "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
612
+      "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
613
+      "optional": true,
614
+      "dependencies": {
615
+        "fstream": "^1.0.0",
616
+        "glob": "^7.0.3",
617
+        "graceful-fs": "^4.1.2",
618
+        "mkdirp": "^0.5.0",
619
+        "nopt": "2 || 3",
620
+        "npmlog": "0 || 1 || 2 || 3 || 4",
621
+        "osenv": "0",
622
+        "request": "^2.87.0",
623
+        "rimraf": "2",
624
+        "semver": "~5.3.0",
625
+        "tar": "^2.0.0",
626
+        "which": "1"
627
+      },
628
+      "bin": {
629
+        "node-gyp": "bin/node-gyp.js"
630
+      },
631
+      "engines": {
632
+        "node": ">= 0.8.0"
633
+      }
634
+    },
635
+    "node_modules/node-pre-gyp": {
636
+      "version": "0.11.0",
637
+      "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz",
638
+      "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==",
639
+      "deprecated": "Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future",
640
+      "dependencies": {
641
+        "detect-libc": "^1.0.2",
642
+        "mkdirp": "^0.5.1",
643
+        "needle": "^2.2.1",
644
+        "nopt": "^4.0.1",
645
+        "npm-packlist": "^1.1.6",
646
+        "npmlog": "^4.0.2",
647
+        "rc": "^1.2.7",
648
+        "rimraf": "^2.6.1",
649
+        "semver": "^5.3.0",
650
+        "tar": "^4"
651
+      },
652
+      "bin": {
653
+        "node-pre-gyp": "bin/node-pre-gyp"
654
+      }
655
+    },
656
+    "node_modules/node-pre-gyp/node_modules/nopt": {
657
+      "version": "4.0.3",
658
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
659
+      "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
660
+      "dependencies": {
661
+        "abbrev": "1",
662
+        "osenv": "^0.1.4"
663
+      },
664
+      "bin": {
665
+        "nopt": "bin/nopt.js"
666
+      }
667
+    },
668
+    "node_modules/node-pre-gyp/node_modules/tar": {
669
+      "version": "4.4.13",
670
+      "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
671
+      "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
672
+      "dependencies": {
673
+        "chownr": "^1.1.1",
674
+        "fs-minipass": "^1.2.5",
675
+        "minipass": "^2.8.6",
676
+        "minizlib": "^1.2.1",
677
+        "mkdirp": "^0.5.0",
678
+        "safe-buffer": "^5.1.2",
679
+        "yallist": "^3.0.3"
680
+      },
681
+      "engines": {
682
+        "node": ">=4.5"
683
+      }
684
+    },
685
+    "node_modules/nopt": {
686
+      "version": "3.0.6",
687
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
688
+      "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
689
+      "optional": true,
690
+      "dependencies": {
691
+        "abbrev": "1"
692
+      },
693
+      "bin": {
694
+        "nopt": "bin/nopt.js"
695
+      }
696
+    },
697
+    "node_modules/npm-bundled": {
698
+      "version": "1.1.1",
699
+      "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
700
+      "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
701
+      "dependencies": {
702
+        "npm-normalize-package-bin": "^1.0.1"
703
+      }
704
+    },
705
+    "node_modules/npm-normalize-package-bin": {
706
+      "version": "1.0.1",
707
+      "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
708
+      "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
709
+    },
710
+    "node_modules/npm-packlist": {
711
+      "version": "1.4.8",
712
+      "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz",
713
+      "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==",
714
+      "dependencies": {
715
+        "ignore-walk": "^3.0.1",
716
+        "npm-bundled": "^1.0.1",
717
+        "npm-normalize-package-bin": "^1.0.1"
718
+      }
719
+    },
720
+    "node_modules/npmlog": {
721
+      "version": "4.1.2",
722
+      "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
723
+      "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
724
+      "dependencies": {
725
+        "are-we-there-yet": "~1.1.2",
726
+        "console-control-strings": "~1.1.0",
727
+        "gauge": "~2.7.3",
728
+        "set-blocking": "~2.0.0"
729
+      }
730
+    },
731
+    "node_modules/number-is-nan": {
732
+      "version": "1.0.1",
733
+      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
734
+      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
735
+      "engines": {
736
+        "node": ">=0.10.0"
737
+      }
738
+    },
739
+    "node_modules/oauth-sign": {
740
+      "version": "0.9.0",
741
+      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
742
+      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
743
+      "optional": true,
744
+      "engines": {
745
+        "node": "*"
746
+      }
747
+    },
748
+    "node_modules/object-assign": {
749
+      "version": "4.1.1",
750
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
751
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
752
+      "engines": {
753
+        "node": ">=0.10.0"
754
+      }
755
+    },
756
+    "node_modules/once": {
757
+      "version": "1.4.0",
758
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
759
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
760
+      "dependencies": {
761
+        "wrappy": "1"
762
+      }
763
+    },
764
+    "node_modules/os-homedir": {
765
+      "version": "1.0.2",
766
+      "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
767
+      "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
768
+      "engines": {
769
+        "node": ">=0.10.0"
770
+      }
771
+    },
772
+    "node_modules/os-tmpdir": {
773
+      "version": "1.0.2",
774
+      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
775
+      "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
776
+      "engines": {
777
+        "node": ">=0.10.0"
778
+      }
779
+    },
780
+    "node_modules/osenv": {
781
+      "version": "0.1.5",
782
+      "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
783
+      "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
784
+      "dependencies": {
785
+        "os-homedir": "^1.0.0",
786
+        "os-tmpdir": "^1.0.0"
787
+      }
788
+    },
789
+    "node_modules/path-is-absolute": {
790
+      "version": "1.0.1",
791
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
792
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
793
+      "engines": {
794
+        "node": ">=0.10.0"
795
+      }
796
+    },
797
+    "node_modules/performance-now": {
798
+      "version": "2.1.0",
799
+      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
800
+      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
801
+      "optional": true
802
+    },
803
+    "node_modules/process-nextick-args": {
804
+      "version": "2.0.1",
805
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
806
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
807
+    },
808
+    "node_modules/psl": {
809
+      "version": "1.8.0",
810
+      "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
811
+      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
812
+      "optional": true
813
+    },
814
+    "node_modules/punycode": {
815
+      "version": "2.1.1",
816
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
817
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
818
+      "optional": true,
819
+      "engines": {
820
+        "node": ">=6"
821
+      }
822
+    },
823
+    "node_modules/qs": {
824
+      "version": "6.5.2",
825
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
826
+      "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
827
+      "optional": true,
828
+      "engines": {
829
+        "node": ">=0.6"
830
+      }
831
+    },
832
+    "node_modules/rc": {
833
+      "version": "1.2.8",
834
+      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
835
+      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
836
+      "dependencies": {
837
+        "deep-extend": "^0.6.0",
838
+        "ini": "~1.3.0",
839
+        "minimist": "^1.2.0",
840
+        "strip-json-comments": "~2.0.1"
841
+      },
842
+      "bin": {
843
+        "rc": "cli.js"
844
+      }
845
+    },
846
+    "node_modules/readable-stream": {
847
+      "version": "2.3.7",
848
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
849
+      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
850
+      "dependencies": {
851
+        "core-util-is": "~1.0.0",
852
+        "inherits": "~2.0.3",
853
+        "isarray": "~1.0.0",
854
+        "process-nextick-args": "~2.0.0",
855
+        "safe-buffer": "~5.1.1",
856
+        "string_decoder": "~1.1.1",
857
+        "util-deprecate": "~1.0.1"
858
+      }
859
+    },
860
+    "node_modules/request": {
861
+      "version": "2.88.2",
862
+      "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
863
+      "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
864
+      "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
865
+      "optional": true,
866
+      "dependencies": {
867
+        "aws-sign2": "~0.7.0",
868
+        "aws4": "^1.8.0",
869
+        "caseless": "~0.12.0",
870
+        "combined-stream": "~1.0.6",
871
+        "extend": "~3.0.2",
872
+        "forever-agent": "~0.6.1",
873
+        "form-data": "~2.3.2",
874
+        "har-validator": "~5.1.3",
875
+        "http-signature": "~1.2.0",
876
+        "is-typedarray": "~1.0.0",
877
+        "isstream": "~0.1.2",
878
+        "json-stringify-safe": "~5.0.1",
879
+        "mime-types": "~2.1.19",
880
+        "oauth-sign": "~0.9.0",
881
+        "performance-now": "^2.1.0",
882
+        "qs": "~6.5.2",
883
+        "safe-buffer": "^5.1.2",
884
+        "tough-cookie": "~2.5.0",
885
+        "tunnel-agent": "^0.6.0",
886
+        "uuid": "^3.3.2"
887
+      },
888
+      "engines": {
889
+        "node": ">= 6"
890
+      }
891
+    },
892
+    "node_modules/rimraf": {
893
+      "version": "2.7.1",
894
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
895
+      "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
896
+      "dependencies": {
897
+        "glob": "^7.1.3"
898
+      },
899
+      "bin": {
900
+        "rimraf": "bin.js"
901
+      }
902
+    },
903
+    "node_modules/safe-buffer": {
904
+      "version": "5.1.2",
905
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
906
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
907
+    },
908
+    "node_modules/safer-buffer": {
909
+      "version": "2.1.2",
910
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
911
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
912
+    },
913
+    "node_modules/sax": {
914
+      "version": "1.2.4",
915
+      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
916
+      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
917
+    },
918
+    "node_modules/semver": {
919
+      "version": "5.3.0",
920
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
921
+      "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
922
+      "bin": {
923
+        "semver": "bin/semver"
924
+      }
925
+    },
926
+    "node_modules/set-blocking": {
927
+      "version": "2.0.0",
928
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
929
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
930
+    },
931
+    "node_modules/signal-exit": {
932
+      "version": "3.0.3",
933
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
934
+      "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
935
+    },
936
+    "node_modules/sqlite3": {
937
+      "version": "5.0.2",
938
+      "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.2.tgz",
939
+      "integrity": "sha512-1SdTNo+BVU211Xj1csWa8lV6KM0CtucDwRyA0VHl91wEH1Mgh7RxUpI4rVvG7OhHrzCSGaVyW5g8vKvlrk9DJA==",
940
+      "hasInstallScript": true,
941
+      "dependencies": {
942
+        "node-addon-api": "^3.0.0",
943
+        "node-gyp": "3.x",
944
+        "node-pre-gyp": "^0.11.0"
945
+      },
946
+      "optionalDependencies": {
947
+        "node-gyp": "3.x"
948
+      },
949
+      "peerDependencies": {
950
+        "node-gyp": "3.x"
951
+      },
952
+      "peerDependenciesMeta": {
953
+        "node-gyp": {
954
+          "optional": true
955
+        }
956
+      }
957
+    },
958
+    "node_modules/sshpk": {
959
+      "version": "1.16.1",
960
+      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
961
+      "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
962
+      "optional": true,
963
+      "dependencies": {
964
+        "asn1": "~0.2.3",
965
+        "assert-plus": "^1.0.0",
966
+        "bcrypt-pbkdf": "^1.0.0",
967
+        "dashdash": "^1.12.0",
968
+        "ecc-jsbn": "~0.1.1",
969
+        "getpass": "^0.1.1",
970
+        "jsbn": "~0.1.0",
971
+        "safer-buffer": "^2.0.2",
972
+        "tweetnacl": "~0.14.0"
973
+      },
974
+      "bin": {
975
+        "sshpk-conv": "bin/sshpk-conv",
976
+        "sshpk-sign": "bin/sshpk-sign",
977
+        "sshpk-verify": "bin/sshpk-verify"
978
+      },
979
+      "engines": {
980
+        "node": ">=0.10.0"
981
+      }
982
+    },
983
+    "node_modules/string_decoder": {
984
+      "version": "1.1.1",
985
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
986
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
987
+      "dependencies": {
988
+        "safe-buffer": "~5.1.0"
989
+      }
990
+    },
991
+    "node_modules/string-width": {
992
+      "version": "1.0.2",
993
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
994
+      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
995
+      "dependencies": {
996
+        "code-point-at": "^1.0.0",
997
+        "is-fullwidth-code-point": "^1.0.0",
998
+        "strip-ansi": "^3.0.0"
999
+      },
1000
+      "engines": {
1001
+        "node": ">=0.10.0"
1002
+      }
1003
+    },
1004
+    "node_modules/strip-ansi": {
1005
+      "version": "3.0.1",
1006
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
1007
+      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
1008
+      "dependencies": {
1009
+        "ansi-regex": "^2.0.0"
1010
+      },
1011
+      "engines": {
1012
+        "node": ">=0.10.0"
1013
+      }
1014
+    },
1015
+    "node_modules/strip-json-comments": {
1016
+      "version": "2.0.1",
1017
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1018
+      "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1019
+      "engines": {
1020
+        "node": ">=0.10.0"
1021
+      }
1022
+    },
1023
+    "node_modules/tar": {
1024
+      "version": "2.2.2",
1025
+      "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
1026
+      "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
1027
+      "optional": true,
1028
+      "dependencies": {
1029
+        "block-stream": "*",
1030
+        "fstream": "^1.0.12",
1031
+        "inherits": "2"
1032
+      }
1033
+    },
1034
+    "node_modules/tough-cookie": {
1035
+      "version": "2.5.0",
1036
+      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
1037
+      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
1038
+      "optional": true,
1039
+      "dependencies": {
1040
+        "psl": "^1.1.28",
1041
+        "punycode": "^2.1.1"
1042
+      },
1043
+      "engines": {
1044
+        "node": ">=0.8"
1045
+      }
1046
+    },
1047
+    "node_modules/tunnel-agent": {
1048
+      "version": "0.6.0",
1049
+      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
1050
+      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
1051
+      "optional": true,
1052
+      "dependencies": {
1053
+        "safe-buffer": "^5.0.1"
1054
+      },
1055
+      "engines": {
1056
+        "node": "*"
1057
+      }
1058
+    },
1059
+    "node_modules/tweetnacl": {
1060
+      "version": "0.14.5",
1061
+      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
1062
+      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
1063
+      "optional": true
1064
+    },
1065
+    "node_modules/uri-js": {
1066
+      "version": "4.4.1",
1067
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
1068
+      "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
1069
+      "optional": true,
1070
+      "dependencies": {
1071
+        "punycode": "^2.1.0"
1072
+      }
1073
+    },
1074
+    "node_modules/util-deprecate": {
1075
+      "version": "1.0.2",
1076
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1077
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
1078
+    },
1079
+    "node_modules/uuid": {
1080
+      "version": "3.4.0",
1081
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
1082
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
1083
+      "optional": true,
1084
+      "bin": {
1085
+        "uuid": "bin/uuid"
1086
+      }
1087
+    },
1088
+    "node_modules/verror": {
1089
+      "version": "1.10.0",
1090
+      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
1091
+      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
1092
+      "engines": [
1093
+        "node >=0.6.0"
1094
+      ],
1095
+      "optional": true,
1096
+      "dependencies": {
1097
+        "assert-plus": "^1.0.0",
1098
+        "core-util-is": "1.0.2",
1099
+        "extsprintf": "^1.2.0"
1100
+      }
1101
+    },
1102
+    "node_modules/which": {
1103
+      "version": "1.3.1",
1104
+      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1105
+      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1106
+      "optional": true,
1107
+      "dependencies": {
1108
+        "isexe": "^2.0.0"
1109
+      },
1110
+      "bin": {
1111
+        "which": "bin/which"
1112
+      }
1113
+    },
1114
+    "node_modules/wide-align": {
1115
+      "version": "1.1.3",
1116
+      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1117
+      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1118
+      "dependencies": {
1119
+        "string-width": "^1.0.2 || 2"
1120
+      }
1121
+    },
1122
+    "node_modules/wrappy": {
1123
+      "version": "1.0.2",
1124
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1125
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
1126
+    },
1127
+    "node_modules/yallist": {
1128
+      "version": "3.1.1",
1129
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
1130
+      "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
1131
+    }
1132
+  }
1133
+}
... ...
@@ -0,0 +1,21 @@
1
+    MIT License
2
+
3
+    Copyright (c) Microsoft Corporation.
4
+
5
+    Permission is hereby granted, free of charge, to any person obtaining a copy
6
+    of this software and associated documentation files (the "Software"), to deal
7
+    in the Software without restriction, including without limitation the rights
8
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+    copies of the Software, and to permit persons to whom the Software is
10
+    furnished to do so, subject to the following conditions:
11
+
12
+    The above copyright notice and this permission notice shall be included in all
13
+    copies or substantial portions of the Software.
14
+
15
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+    SOFTWARE
... ...
@@ -0,0 +1,16 @@
1
+# Installation
2
+> `npm install --save @types/node`
3
+
4
+# Summary
5
+This package contains type definitions for Node.js (http://nodejs.org/).
6
+
7
+# Details
8
+Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
+
10
+### Additional Details
11
+ * Last updated: Fri, 19 Feb 2021 17:58:40 GMT
12
+ * Dependencies: none
13
+ * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
+
15
+# Credits
16
+These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
... ...
@@ -0,0 +1,129 @@
1
+declare module 'node:assert' {
2
+    import assert = require('assert');
3
+    export = assert;
4
+}
5
+
6
+declare module 'assert' {
7
+    /** An alias of `assert.ok()`. */
8
+    function assert(value: any, message?: string | Error): asserts value;
9
+    namespace assert {
10
+        class AssertionError extends Error {
11
+            actual: any;
12
+            expected: any;
13
+            operator: string;
14
+            generatedMessage: boolean;
15
+            code: 'ERR_ASSERTION';
16
+
17
+            constructor(options?: {
18
+                /** If provided, the error message is set to this value. */
19
+                message?: string;
20
+                /** The `actual` property on the error instance. */
21
+                actual?: any;
22
+                /** The `expected` property on the error instance. */
23
+                expected?: any;
24
+                /** The `operator` property on the error instance. */
25
+                operator?: string;
26
+                /** If provided, the generated stack trace omits frames before this function. */
27
+                // tslint:disable-next-line:ban-types
28
+                stackStartFn?: Function;
29
+            });
30
+        }
31
+
32
+        class CallTracker {
33
+            calls(exact?: number): () => void;
34
+            calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
35
+            report(): CallTrackerReportInformation[];
36
+            verify(): void;
37
+        }
38
+        interface CallTrackerReportInformation {
39
+            message: string;
40
+            /** The actual number of times the function was called. */
41
+            actual: number;
42
+            /** The number of times the function was expected to be called. */
43
+            expected: number;
44
+            /** The name of the function that is wrapped. */
45
+            operator: string;
46
+            /** A stack trace of the function. */
47
+            stack: object;
48
+        }
49
+
50
+        type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
51
+
52
+        function fail(message?: string | Error): never;
53
+        /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
54
+        function fail(
55
+            actual: any,
56
+            expected: any,
57
+            message?: string | Error,
58
+            operator?: string,
59
+            // tslint:disable-next-line:ban-types
60
+            stackStartFn?: Function,
61
+        ): never;
62
+        function ok(value: any, message?: string | Error): asserts value;
63
+        /** @deprecated since v9.9.0 - use strictEqual() instead. */
64
+        function equal(actual: any, expected: any, message?: string | Error): void;
65
+        /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
66
+        function notEqual(actual: any, expected: any, message?: string | Error): void;
67
+        /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
68
+        function deepEqual(actual: any, expected: any, message?: string | Error): void;
69
+        /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
70
+        function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
71
+        function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
72
+        function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
73
+        function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
74
+        function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
75
+
76
+        function throws(block: () => any, message?: string | Error): void;
77
+        function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
78
+        function doesNotThrow(block: () => any, message?: string | Error): void;
79
+        function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
80
+
81
+        function ifError(value: any): asserts value is null | undefined;
82
+
83
+        function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
84
+        function rejects(
85
+            block: (() => Promise<any>) | Promise<any>,
86
+            error: AssertPredicate,
87
+            message?: string | Error,
88
+        ): Promise<void>;
89
+        function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
90
+        function doesNotReject(
91
+            block: (() => Promise<any>) | Promise<any>,
92
+            error: AssertPredicate,
93
+            message?: string | Error,
94
+        ): Promise<void>;
95
+
96
+        function match(value: string, regExp: RegExp, message?: string | Error): void;
97
+        function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
98
+
99
+        const strict: Omit<
100
+            typeof assert,
101
+            | 'equal'
102
+            | 'notEqual'
103
+            | 'deepEqual'
104
+            | 'notDeepEqual'
105
+            | 'ok'
106
+            | 'strictEqual'
107
+            | 'deepStrictEqual'
108
+            | 'ifError'
109
+            | 'strict'
110
+        > & {
111
+            (value: any, message?: string | Error): asserts value;
112
+            equal: typeof strictEqual;
113
+            notEqual: typeof notStrictEqual;
114
+            deepEqual: typeof deepStrictEqual;
115
+            notDeepEqual: typeof notDeepStrictEqual;
116
+
117
+            // Mapped types and assertion functions are incompatible?
118
+            // TS2775: Assertions require every name in the call target
119
+            // to be declared with an explicit type annotation.
120
+            ok: typeof ok;
121
+            strictEqual: typeof strictEqual;
122
+            deepStrictEqual: typeof deepStrictEqual;
123
+            ifError: typeof ifError;
124
+            strict: typeof strict;
125
+        };
126
+    }
127
+
128
+    export = assert;
129
+}
... ...
@@ -0,0 +1,233 @@
1
+/**
2
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
3
+ */
4
+declare module 'node:async_hooks' {
5
+    export * from 'async_hooks';
6
+}
7
+
8
+/**
9
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
10
+ */
11
+declare module 'async_hooks' {
12
+    /**
13
+     * Returns the asyncId of the current execution context.
14
+     */
15
+    function executionAsyncId(): number;
16
+
17
+    /**
18
+     * The resource representing the current execution.
19
+     *  Useful to store data within the resource.
20
+     *
21
+     * Resource objects returned by `executionAsyncResource()` are most often internal
22
+     * Node.js handle objects with undocumented APIs. Using any functions or properties
23
+     * on the object is likely to crash your application and should be avoided.
24
+     *
25
+     * Using `executionAsyncResource()` in the top-level execution context will
26
+     * return an empty object as there is no handle or request object to use,
27
+     * but having an object representing the top-level can be helpful.
28
+     */
29
+    function executionAsyncResource(): object;
30
+
31
+    /**
32
+     * Returns the ID of the resource responsible for calling the callback that is currently being executed.
33
+     */
34
+    function triggerAsyncId(): number;
35
+
36
+    interface HookCallbacks {
37
+        /**
38
+         * Called when a class is constructed that has the possibility to emit an asynchronous event.
39
+         * @param asyncId a unique ID for the async resource
40
+         * @param type the type of the async resource
41
+         * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
42
+         * @param resource reference to the resource representing the async operation, needs to be released during destroy
43
+         */
44
+        init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
45
+
46
+        /**
47
+         * When an asynchronous operation is initiated or completes a callback is called to notify the user.
48
+         * The before callback is called just before said callback is executed.
49
+         * @param asyncId the unique identifier assigned to the resource about to execute the callback.
50
+         */
51
+        before?(asyncId: number): void;
52
+
53
+        /**
54
+         * Called immediately after the callback specified in before is completed.
55
+         * @param asyncId the unique identifier assigned to the resource which has executed the callback.
56
+         */
57
+        after?(asyncId: number): void;
58
+
59
+        /**
60
+         * Called when a promise has resolve() called. This may not be in the same execution id
61
+         * as the promise itself.
62
+         * @param asyncId the unique id for the promise that was resolve()d.
63
+         */
64
+        promiseResolve?(asyncId: number): void;
65
+
66
+        /**
67
+         * Called after the resource corresponding to asyncId is destroyed
68
+         * @param asyncId a unique ID for the async resource
69
+         */
70
+        destroy?(asyncId: number): void;
71
+    }
72
+
73
+    interface AsyncHook {
74
+        /**
75
+         * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
76
+         */
77
+        enable(): this;
78
+
79
+        /**
80
+         * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
81
+         */
82
+        disable(): this;
83
+    }
84
+
85
+    /**
86
+     * Registers functions to be called for different lifetime events of each async operation.
87
+     * @param options the callbacks to register
88
+     * @return an AsyncHooks instance used for disabling and enabling hooks
89
+     */
90
+    function createHook(options: HookCallbacks): AsyncHook;
91
+
92
+    interface AsyncResourceOptions {
93
+      /**
94
+       * The ID of the execution context that created this async event.
95
+       * Default: `executionAsyncId()`
96
+       */
97
+      triggerAsyncId?: number;
98
+
99
+      /**
100
+       * Disables automatic `emitDestroy` when the object is garbage collected.
101
+       * This usually does not need to be set (even if `emitDestroy` is called
102
+       * manually), unless the resource's `asyncId` is retrieved and the
103
+       * sensitive API's `emitDestroy` is called with it.
104
+       * Default: `false`
105
+       */
106
+      requireManualDestroy?: boolean;
107
+    }
108
+
109
+    /**
110
+     * The class AsyncResource was designed to be extended by the embedder's async resources.
111
+     * Using this users can easily trigger the lifetime events of their own resources.
112
+     */
113
+    class AsyncResource {
114
+        /**
115
+         * AsyncResource() is meant to be extended. Instantiating a
116
+         * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
117
+         * async_hook.executionAsyncId() is used.
118
+         * @param type The type of async event.
119
+         * @param triggerAsyncId The ID of the execution context that created
120
+         *   this async event (default: `executionAsyncId()`), or an
121
+         *   AsyncResourceOptions object (since 9.3)
122
+         */
123
+        constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
124
+
125
+        /**
126
+         * Binds the given function to the current execution context.
127
+         * @param fn The function to bind to the current execution context.
128
+         * @param type An optional name to associate with the underlying `AsyncResource`.
129
+         */
130
+        static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
131
+
132
+        /**
133
+         * Binds the given function to execute to this `AsyncResource`'s scope.
134
+         * @param fn The function to bind to the current `AsyncResource`.
135
+         */
136
+        bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
137
+
138
+        /**
139
+         * Call the provided function with the provided arguments in the
140
+         * execution context of the async resource. This will establish the
141
+         * context, trigger the AsyncHooks before callbacks, call the function,
142
+         * trigger the AsyncHooks after callbacks, and then restore the original
143
+         * execution context.
144
+         * @param fn The function to call in the execution context of this
145
+         *   async resource.
146
+         * @param thisArg The receiver to be used for the function call.
147
+         * @param args Optional arguments to pass to the function.
148
+         */
149
+        runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
150
+
151
+        /**
152
+         * Call AsyncHooks destroy callbacks.
153
+         */
154
+        emitDestroy(): void;
155
+
156
+        /**
157
+         * @return the unique ID assigned to this AsyncResource instance.
158
+         */
159
+        asyncId(): number;
160
+
161
+        /**
162
+         * @return the trigger ID for this AsyncResource instance.
163
+         */
164
+        triggerAsyncId(): number;
165
+    }
166
+
167
+    /**
168
+     * When having multiple instances of `AsyncLocalStorage`, they are independent
169
+     * from each other. It is safe to instantiate this class multiple times.
170
+     */
171
+    class AsyncLocalStorage<T> {
172
+        /**
173
+         * This method disables the instance of `AsyncLocalStorage`. All subsequent calls
174
+         * to `asyncLocalStorage.getStore()` will return `undefined` until
175
+         * `asyncLocalStorage.run()` is called again.
176
+         *
177
+         * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
178
+         * instance will be exited.
179
+         *
180
+         * Calling `asyncLocalStorage.disable()` is required before the
181
+         * `asyncLocalStorage` can be garbage collected. This does not apply to stores
182
+         * provided by the `asyncLocalStorage`, as those objects are garbage collected
183
+         * along with the corresponding async resources.
184
+         *
185
+         * This method is to be used when the `asyncLocalStorage` is not in use anymore
186
+         * in the current process.
187
+         */
188
+        disable(): void;
189
+
190
+        /**
191
+         * This method returns the current store. If this method is called outside of an
192
+         * asynchronous context initialized by calling `asyncLocalStorage.run`, it will
193
+         * return `undefined`.
194
+         */
195
+        getStore(): T | undefined;
196
+
197
+        /**
198
+         * This methods runs a function synchronously within a context and return its
199
+         * return value. The store is not accessible outside of the callback function or
200
+         * the asynchronous operations created within the callback.
201
+         *
202
+         * Optionally, arguments can be passed to the function. They will be passed to the
203
+         * callback function.
204
+         *
205
+         * I the callback function throws an error, it will be thrown by `run` too. The
206
+         * stacktrace will not be impacted by this call and the context will be exited.
207
+         */
208
+        // TODO: Apply generic vararg once available
209
+        run<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
210
+
211
+        /**
212
+         * This methods runs a function synchronously outside of a context and return its
213
+         * return value. The store is not accessible within the callback function or the
214
+         * asynchronous operations created within the callback.
215
+         *
216
+         * Optionally, arguments can be passed to the function. They will be passed to the
217
+         * callback function.
218
+         *
219
+         * If the callback function throws an error, it will be thrown by `exit` too. The
220
+         * stacktrace will not be impacted by this call and the context will be
221
+         * re-entered.
222
+         */
223
+        // TODO: Apply generic vararg once available
224
+        exit<R>(callback: (...args: any[]) => R, ...args: any[]): R;
225
+
226
+        /**
227
+         * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
228
+         * for the remainder of the current synchronous execution and will persist
229
+         * through any following asynchronous calls.
230
+         */
231
+        enterWith(store: T): void;
232
+    }
233
+}
... ...
@@ -0,0 +1,19 @@
1
+// NOTE: These definitions support NodeJS and TypeScript 3.7.
2
+
3
+// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
+//          - ~/base.d.ts         - Shared definitions common to all TypeScript versions
5
+//          - ~/index.d.ts        - Definitions specific to TypeScript 2.1
6
+//          - ~/ts3.7/base.d.ts   - Definitions specific to TypeScript 3.7
7
+//          - ~/ts3.7/index.d.ts  - Definitions specific to TypeScript 3.7 with assert pulled in
8
+
9
+// Reference required types from the default lib:
10
+/// <reference lib="es2018" />
11
+/// <reference lib="esnext.asynciterable" />
12
+/// <reference lib="esnext.intl" />
13
+/// <reference lib="esnext.bigint" />
14
+
15
+// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
+/// <reference path="ts3.6/base.d.ts" />
17
+
18
+// TypeScript 3.7-specific augmentations:
19
+/// <reference path="assert.d.ts" />
... ...
@@ -0,0 +1,26 @@
1
+declare module 'node:buffer' {
2
+    export * from 'buffer';
3
+}
4
+
5
+declare module 'buffer' {
6
+    export const INSPECT_MAX_BYTES: number;
7
+    export const kMaxLength: number;
8
+    export const kStringMaxLength: number;
9
+    export const constants: {
10
+        MAX_LENGTH: number;
11
+        MAX_STRING_LENGTH: number;
12
+    };
13
+    const BuffType: typeof Buffer;
14
+
15
+    export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
16
+
17
+    export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
18
+
19
+    export const SlowBuffer: {
20
+        /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
21
+        new(size: number): Buffer;
22
+        prototype: Buffer;
23
+    };
24
+
25
+    export { BuffType as Buffer };
26
+}
... ...
@@ -0,0 +1,513 @@
1
+declare module 'node:child_process' {
2
+    export * from 'child_process';
3
+}
4
+
5
+declare module 'child_process' {
6
+    import { BaseEncodingOptions } from 'node:fs';
7
+    import * as events from 'node:events';
8
+    import * as net from 'node:net';
9
+    import { Writable, Readable, Stream, Pipe } from 'node:stream';
10
+
11
+    type Serializable = string | object | number | boolean;
12
+    type SendHandle = net.Socket | net.Server;
13
+
14
+    interface ChildProcess extends events.EventEmitter {
15
+        stdin: Writable | null;
16
+        stdout: Readable | null;
17
+        stderr: Readable | null;
18
+        readonly channel?: Pipe | null;
19
+        readonly stdio: [
20
+            Writable | null, // stdin
21
+            Readable | null, // stdout
22
+            Readable | null, // stderr
23
+            Readable | Writable | null | undefined, // extra
24
+            Readable | Writable | null | undefined // extra
25
+        ];
26
+        readonly killed: boolean;
27
+        readonly pid: number;
28
+        readonly connected: boolean;
29
+        readonly exitCode: number | null;
30
+        readonly signalCode: NodeJS.Signals | null;
31
+        readonly spawnargs: string[];
32
+        readonly spawnfile: string;
33
+        kill(signal?: NodeJS.Signals | number): boolean;
34
+        send(message: Serializable, callback?: (error: Error | null) => void): boolean;
35
+        send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
36
+        send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
37
+        disconnect(): void;
38
+        unref(): void;
39
+        ref(): void;
40
+
41
+        /**
42
+         * events.EventEmitter
43
+         * 1. close
44
+         * 2. disconnect
45
+         * 3. error
46
+         * 4. exit
47
+         * 5. message
48
+         */
49
+
50
+        addListener(event: string, listener: (...args: any[]) => void): this;
51
+        addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
52
+        addListener(event: "disconnect", listener: () => void): this;
53
+        addListener(event: "error", listener: (err: Error) => void): this;
54
+        addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
55
+        addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
56
+
57
+        emit(event: string | symbol, ...args: any[]): boolean;
58
+        emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
59
+        emit(event: "disconnect"): boolean;
60
+        emit(event: "error", err: Error): boolean;
61
+        emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
62
+        emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
63
+
64
+        on(event: string, listener: (...args: any[]) => void): this;
65
+        on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
66
+        on(event: "disconnect", listener: () => void): this;
67
+        on(event: "error", listener: (err: Error) => void): this;
68
+        on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
69
+        on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
70
+
71
+        once(event: string, listener: (...args: any[]) => void): this;
72
+        once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
73
+        once(event: "disconnect", listener: () => void): this;
74
+        once(event: "error", listener: (err: Error) => void): this;
75
+        once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
76
+        once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
77
+
78
+        prependListener(event: string, listener: (...args: any[]) => void): this;
79
+        prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
80
+        prependListener(event: "disconnect", listener: () => void): this;
81
+        prependListener(event: "error", listener: (err: Error) => void): this;
82
+        prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
83
+        prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
84
+
85
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
86
+        prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
87
+        prependOnceListener(event: "disconnect", listener: () => void): this;
88
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
89
+        prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
90
+        prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
91
+    }
92
+
93
+    // return this object when stdio option is undefined or not specified
94
+    interface ChildProcessWithoutNullStreams extends ChildProcess {
95
+        stdin: Writable;
96
+        stdout: Readable;
97
+        stderr: Readable;
98
+        readonly stdio: [
99
+            Writable, // stdin
100
+            Readable, // stdout
101
+            Readable, // stderr
102
+            Readable | Writable | null | undefined, // extra, no modification
103
+            Readable | Writable | null | undefined // extra, no modification
104
+        ];
105
+    }
106
+
107
+    // return this object when stdio option is a tuple of 3
108
+    interface ChildProcessByStdio<
109
+        I extends null | Writable,
110
+        O extends null | Readable,
111
+        E extends null | Readable,
112
+    > extends ChildProcess {
113
+        stdin: I;
114
+        stdout: O;
115
+        stderr: E;
116
+        readonly stdio: [
117
+            I,
118
+            O,
119
+            E,
120
+            Readable | Writable | null | undefined, // extra, no modification
121
+            Readable | Writable | null | undefined // extra, no modification
122
+        ];
123
+    }
124
+
125
+    interface MessageOptions {
126
+        keepOpen?: boolean;
127
+    }
128
+
129
+    type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
130
+
131
+    type SerializationType = 'json' | 'advanced';
132
+
133
+    interface MessagingOptions {
134
+        /**
135
+         * Specify the kind of serialization used for sending messages between processes.
136
+         * @default 'json'
137
+         */
138
+        serialization?: SerializationType;
139
+    }
140
+
141
+    interface ProcessEnvOptions {
142
+        uid?: number;
143
+        gid?: number;
144
+        cwd?: string;
145
+        env?: NodeJS.ProcessEnv;
146
+    }
147
+
148
+    interface CommonOptions extends ProcessEnvOptions {
149
+        /**
150
+         * @default true
151
+         */
152
+        windowsHide?: boolean;
153
+        /**
154
+         * @default 0
155
+         */
156
+        timeout?: number;
157
+    }
158
+
159
+    interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
160
+        argv0?: string;
161
+        stdio?: StdioOptions;
162
+        shell?: boolean | string;
163
+        windowsVerbatimArguments?: boolean;
164
+    }
165
+
166
+    interface SpawnOptions extends CommonSpawnOptions {
167
+        detached?: boolean;
168
+    }
169
+
170
+    interface SpawnOptionsWithoutStdio extends SpawnOptions {
171
+        stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
172
+    }
173
+
174
+    type StdioNull = 'inherit' | 'ignore' | Stream;
175
+    type StdioPipe = undefined | null | 'pipe';
176
+
177
+    interface SpawnOptionsWithStdioTuple<
178
+        Stdin extends StdioNull | StdioPipe,
179
+        Stdout extends StdioNull | StdioPipe,
180
+        Stderr extends StdioNull | StdioPipe,
181
+    > extends SpawnOptions {
182
+        stdio: [Stdin, Stdout, Stderr];
183
+    }
184
+
185
+    // overloads of spawn without 'args'
186
+    function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
187
+
188
+    function spawn(
189
+        command: string,
190
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
191
+    ): ChildProcessByStdio<Writable, Readable, Readable>;
192
+    function spawn(
193
+        command: string,
194
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
195
+    ): ChildProcessByStdio<Writable, Readable, null>;
196
+    function spawn(
197
+        command: string,
198
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
199
+    ): ChildProcessByStdio<Writable, null, Readable>;
200
+    function spawn(
201
+        command: string,
202
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
203
+    ): ChildProcessByStdio<null, Readable, Readable>;
204
+    function spawn(
205
+        command: string,
206
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
207
+    ): ChildProcessByStdio<Writable, null, null>;
208
+    function spawn(
209
+        command: string,
210
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
211
+    ): ChildProcessByStdio<null, Readable, null>;
212
+    function spawn(
213
+        command: string,
214
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
215
+    ): ChildProcessByStdio<null, null, Readable>;
216
+    function spawn(
217
+        command: string,
218
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
219
+    ): ChildProcessByStdio<null, null, null>;
220
+
221
+    function spawn(command: string, options: SpawnOptions): ChildProcess;
222
+
223
+    // overloads of spawn with 'args'
224
+    function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
225
+
226
+    function spawn(
227
+        command: string,
228
+        args: ReadonlyArray<string>,
229
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
230
+    ): ChildProcessByStdio<Writable, Readable, Readable>;
231
+    function spawn(
232
+        command: string,
233
+        args: ReadonlyArray<string>,
234
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
235
+    ): ChildProcessByStdio<Writable, Readable, null>;
236
+    function spawn(
237
+        command: string,
238
+        args: ReadonlyArray<string>,
239
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
240
+    ): ChildProcessByStdio<Writable, null, Readable>;
241
+    function spawn(
242
+        command: string,
243
+        args: ReadonlyArray<string>,
244
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
245
+    ): ChildProcessByStdio<null, Readable, Readable>;
246
+    function spawn(
247
+        command: string,
248
+        args: ReadonlyArray<string>,
249
+        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
250
+    ): ChildProcessByStdio<Writable, null, null>;
251
+    function spawn(
252
+        command: string,
253
+        args: ReadonlyArray<string>,
254
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
255
+    ): ChildProcessByStdio<null, Readable, null>;
256
+    function spawn(
257
+        command: string,
258
+        args: ReadonlyArray<string>,
259
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
260
+    ): ChildProcessByStdio<null, null, Readable>;
261
+    function spawn(
262
+        command: string,
263
+        args: ReadonlyArray<string>,
264
+        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
265
+    ): ChildProcessByStdio<null, null, null>;
266
+
267
+    function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
268
+
269
+    interface ExecOptions extends CommonOptions {
270
+        shell?: string;
271
+        maxBuffer?: number;
272
+        killSignal?: NodeJS.Signals | number;
273
+    }
274
+
275
+    interface ExecOptionsWithStringEncoding extends ExecOptions {
276
+        encoding: BufferEncoding;
277
+    }
278
+
279
+    interface ExecOptionsWithBufferEncoding extends ExecOptions {
280
+        encoding: BufferEncoding | null; // specify `null`.
281
+    }
282
+
283
+    interface ExecException extends Error {
284
+        cmd?: string;
285
+        killed?: boolean;
286
+        code?: number;
287
+        signal?: NodeJS.Signals;
288
+    }
289
+
290
+    // no `options` definitely means stdout/stderr are `string`.
291
+    function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
292
+
293
+    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
294
+    function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
295
+
296
+    // `options` with well known `encoding` means stdout/stderr are definitely `string`.
297
+    function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
298
+
299
+    // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
300
+    // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
301
+    function exec(
302
+        command: string,
303
+        options: { encoding: BufferEncoding } & ExecOptions,
304
+        callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
305
+    ): ChildProcess;
306
+
307
+    // `options` without an `encoding` means stdout/stderr are definitely `string`.
308
+    function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
309
+
310
+    // fallback if nothing else matches. Worst case is always `string | Buffer`.
311
+    function exec(
312
+        command: string,
313
+        options: (BaseEncodingOptions & ExecOptions) | undefined | null,
314
+        callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
315
+    ): ChildProcess;
316
+
317
+    interface PromiseWithChild<T> extends Promise<T> {
318
+        child: ChildProcess;
319
+    }
320
+
321
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
322
+    namespace exec {
323
+        function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
324
+        function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
325
+        function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
326
+        function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
327
+        function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
328
+    }
329
+
330
+    interface ExecFileOptions extends CommonOptions {
331
+        maxBuffer?: number;
332
+        killSignal?: NodeJS.Signals | number;
333
+        windowsVerbatimArguments?: boolean;
334
+        shell?: boolean | string;
335
+    }
336
+    interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
337
+        encoding: BufferEncoding;
338
+    }
339
+    interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
340
+        encoding: 'buffer' | null;
341
+    }
342
+    interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
343
+        encoding: BufferEncoding;
344
+    }
345
+
346
+    function execFile(file: string): ChildProcess;
347
+    function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
348
+    function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
349
+    function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
350
+
351
+    // no `options` definitely means stdout/stderr are `string`.
352
+    function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
353
+    function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
354
+
355
+    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
356
+    function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
357
+    function execFile(
358
+        file: string,
359
+        args: ReadonlyArray<string> | undefined | null,
360
+        options: ExecFileOptionsWithBufferEncoding,
361
+        callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
362
+    ): ChildProcess;
363
+
364
+    // `options` with well known `encoding` means stdout/stderr are definitely `string`.
365
+    function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
366
+    function execFile(
367
+        file: string,
368
+        args: ReadonlyArray<string> | undefined | null,
369
+        options: ExecFileOptionsWithStringEncoding,
370
+        callback: (error: ExecException | null, stdout: string, stderr: string) => void,
371
+    ): ChildProcess;
372
+
373
+    // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
374
+    // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
375
+    function execFile(
376
+        file: string,
377
+        options: ExecFileOptionsWithOtherEncoding,
378
+        callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
379
+    ): ChildProcess;
380
+    function execFile(
381
+        file: string,
382
+        args: ReadonlyArray<string> | undefined | null,
383
+        options: ExecFileOptionsWithOtherEncoding,
384
+        callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
385
+    ): ChildProcess;
386
+
387
+    // `options` without an `encoding` means stdout/stderr are definitely `string`.
388
+    function execFile(file: string, options: ExecFileOptions, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
389
+    function execFile(
390
+        file: string,
391
+        args: ReadonlyArray<string> | undefined | null,
392
+        options: ExecFileOptions,
393
+        callback: (error: ExecException | null, stdout: string, stderr: string) => void
394
+    ): ChildProcess;
395
+
396
+    // fallback if nothing else matches. Worst case is always `string | Buffer`.
397
+    function execFile(
398
+        file: string,
399
+        options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
400
+        callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
401
+    ): ChildProcess;
402
+    function execFile(
403
+        file: string,
404
+        args: ReadonlyArray<string> | undefined | null,
405
+        options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
406
+        callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
407
+    ): ChildProcess;
408
+
409
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
410
+    namespace execFile {
411
+        function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
412
+        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
413
+        function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
414
+        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
415
+        function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
416
+        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
417
+        function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
418
+        function __promisify__(
419
+            file: string,
420
+            args: ReadonlyArray<string> | undefined | null,
421
+            options: ExecFileOptionsWithOtherEncoding,
422
+        ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
423
+        function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
424
+        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
425
+        function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
426
+        function __promisify__(
427
+            file: string,
428
+            args: ReadonlyArray<string> | undefined | null,
429
+            options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
430
+        ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
431
+    }
432
+
433
+    interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
434
+        execPath?: string;
435
+        execArgv?: string[];
436
+        silent?: boolean;
437
+        stdio?: StdioOptions;
438
+        detached?: boolean;
439
+        windowsVerbatimArguments?: boolean;
440
+    }
441
+    function fork(modulePath: string, options?: ForkOptions): ChildProcess;
442
+    function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
443
+
444
+    interface SpawnSyncOptions extends CommonSpawnOptions {
445
+        input?: string | NodeJS.ArrayBufferView;
446
+        killSignal?: NodeJS.Signals | number;
447
+        maxBuffer?: number;
448
+        encoding?: BufferEncoding | 'buffer' | null;
449
+    }
450
+    interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
451
+        encoding: BufferEncoding;
452
+    }
453
+    interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
454
+        encoding?: 'buffer' | null;
455
+    }
456
+    interface SpawnSyncReturns<T> {
457
+        pid: number;
458
+        output: string[];
459
+        stdout: T;
460
+        stderr: T;
461
+        status: number | null;
462
+        signal: NodeJS.Signals | null;
463
+        error?: Error;
464
+    }
465
+    function spawnSync(command: string): SpawnSyncReturns<Buffer>;
466
+    function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
467
+    function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
468
+    function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
469
+    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
470
+    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
471
+    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
472
+
473
+    interface ExecSyncOptions extends CommonOptions {
474
+        input?: string | Uint8Array;
475
+        stdio?: StdioOptions;
476
+        shell?: string;
477
+        killSignal?: NodeJS.Signals | number;
478
+        maxBuffer?: number;
479
+        encoding?: BufferEncoding | 'buffer' | null;
480
+    }
481
+    interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
482
+        encoding: BufferEncoding;
483
+    }
484
+    interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
485
+        encoding?: 'buffer' | null;
486
+    }
487
+    function execSync(command: string): Buffer;
488
+    function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
489
+    function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
490
+    function execSync(command: string, options?: ExecSyncOptions): Buffer;
491
+
492
+    interface ExecFileSyncOptions extends CommonOptions {
493
+        input?: string | NodeJS.ArrayBufferView;
494
+        stdio?: StdioOptions;
495
+        killSignal?: NodeJS.Signals | number;
496
+        maxBuffer?: number;
497
+        encoding?: BufferEncoding;
498
+        shell?: boolean | string;
499
+    }
500
+    interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
501
+        encoding: BufferEncoding;
502
+    }
503
+    interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
504
+        encoding: BufferEncoding; // specify `null`.
505
+    }
506
+    function execFileSync(command: string): Buffer;
507
+    function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
508
+    function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
509
+    function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
510
+    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
511
+    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
512
+    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
513
+}
... ...
@@ -0,0 +1,266 @@
1
+declare module 'node:cluster' {
2
+    export * from 'cluster';
3
+}
4
+
5
+declare module 'cluster' {
6
+    import * as child from 'node:child_process';
7
+    import EventEmitter = require('node:events');
8
+    import * as net from 'node:net';
9
+
10
+    // interfaces
11
+    interface ClusterSettings {
12
+        execArgv?: string[]; // default: process.execArgv
13
+        exec?: string;
14
+        args?: string[];
15
+        silent?: boolean;
16
+        stdio?: any[];
17
+        uid?: number;
18
+        gid?: number;
19
+        inspectPort?: number | (() => number);
20
+    }
21
+
22
+    interface Address {
23
+        address: string;
24
+        port: number;
25
+        addressType: number | "udp4" | "udp6";  // 4, 6, -1, "udp4", "udp6"
26
+    }
27
+
28
+    class Worker extends EventEmitter {
29
+        id: number;
30
+        process: child.ChildProcess;
31
+        send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
32
+        kill(signal?: string): void;
33
+        destroy(signal?: string): void;
34
+        disconnect(): void;
35
+        isConnected(): boolean;
36
+        isDead(): boolean;
37
+        exitedAfterDisconnect: boolean;
38
+
39
+        /**
40
+         * events.EventEmitter
41
+         *   1. disconnect
42
+         *   2. error
43
+         *   3. exit
44
+         *   4. listening
45
+         *   5. message
46
+         *   6. online
47
+         */
48
+        addListener(event: string, listener: (...args: any[]) => void): this;
49
+        addListener(event: "disconnect", listener: () => void): this;
50
+        addListener(event: "error", listener: (error: Error) => void): this;
51
+        addListener(event: "exit", listener: (code: number, signal: string) => void): this;
52
+        addListener(event: "listening", listener: (address: Address) => void): this;
53
+        addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
54
+        addListener(event: "online", listener: () => void): this;
55
+
56
+        emit(event: string | symbol, ...args: any[]): boolean;
57
+        emit(event: "disconnect"): boolean;
58
+        emit(event: "error", error: Error): boolean;
59
+        emit(event: "exit", code: number, signal: string): boolean;
60
+        emit(event: "listening", address: Address): boolean;
61
+        emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
62
+        emit(event: "online"): boolean;
63
+
64
+        on(event: string, listener: (...args: any[]) => void): this;
65
+        on(event: "disconnect", listener: () => void): this;
66
+        on(event: "error", listener: (error: Error) => void): this;
67
+        on(event: "exit", listener: (code: number, signal: string) => void): this;
68
+        on(event: "listening", listener: (address: Address) => void): this;
69
+        on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
70
+        on(event: "online", listener: () => void): this;
71
+
72
+        once(event: string, listener: (...args: any[]) => void): this;
73
+        once(event: "disconnect", listener: () => void): this;
74
+        once(event: "error", listener: (error: Error) => void): this;
75
+        once(event: "exit", listener: (code: number, signal: string) => void): this;
76
+        once(event: "listening", listener: (address: Address) => void): this;
77
+        once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
78
+        once(event: "online", listener: () => void): this;
79
+
80
+        prependListener(event: string, listener: (...args: any[]) => void): this;
81
+        prependListener(event: "disconnect", listener: () => void): this;
82
+        prependListener(event: "error", listener: (error: Error) => void): this;
83
+        prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
84
+        prependListener(event: "listening", listener: (address: Address) => void): this;
85
+        prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
86
+        prependListener(event: "online", listener: () => void): this;
87
+
88
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
89
+        prependOnceListener(event: "disconnect", listener: () => void): this;
90
+        prependOnceListener(event: "error", listener: (error: Error) => void): this;
91
+        prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
92
+        prependOnceListener(event: "listening", listener: (address: Address) => void): this;
93
+        prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
94
+        prependOnceListener(event: "online", listener: () => void): this;
95
+    }
96
+
97
+    interface Cluster extends EventEmitter {
98
+        Worker: Worker;
99
+        disconnect(callback?: () => void): void;
100
+        fork(env?: any): Worker;
101
+        isMaster: boolean;
102
+        isWorker: boolean;
103
+        schedulingPolicy: number;
104
+        settings: ClusterSettings;
105
+        setupMaster(settings?: ClusterSettings): void;
106
+        worker?: Worker;
107
+        workers?: NodeJS.Dict<Worker>;
108
+
109
+        readonly SCHED_NONE: number;
110
+        readonly SCHED_RR: number;
111
+
112
+        /**
113
+         * events.EventEmitter
114
+         *   1. disconnect
115
+         *   2. exit
116
+         *   3. fork
117
+         *   4. listening
118
+         *   5. message
119
+         *   6. online
120
+         *   7. setup
121
+         */
122
+        addListener(event: string, listener: (...args: any[]) => void): this;
123
+        addListener(event: "disconnect", listener: (worker: Worker) => void): this;
124
+        addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
125
+        addListener(event: "fork", listener: (worker: Worker) => void): this;
126
+        addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
127
+        addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
128
+        addListener(event: "online", listener: (worker: Worker) => void): this;
129
+        addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
130
+
131
+        emit(event: string | symbol, ...args: any[]): boolean;
132
+        emit(event: "disconnect", worker: Worker): boolean;
133
+        emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
134
+        emit(event: "fork", worker: Worker): boolean;
135
+        emit(event: "listening", worker: Worker, address: Address): boolean;
136
+        emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
137
+        emit(event: "online", worker: Worker): boolean;
138
+        emit(event: "setup", settings: ClusterSettings): boolean;
139
+
140
+        on(event: string, listener: (...args: any[]) => void): this;
141
+        on(event: "disconnect", listener: (worker: Worker) => void): this;
142
+        on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
143
+        on(event: "fork", listener: (worker: Worker) => void): this;
144
+        on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
145
+        on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
146
+        on(event: "online", listener: (worker: Worker) => void): this;
147
+        on(event: "setup", listener: (settings: ClusterSettings) => void): this;
148
+
149
+        once(event: string, listener: (...args: any[]) => void): this;
150
+        once(event: "disconnect", listener: (worker: Worker) => void): this;
151
+        once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
152
+        once(event: "fork", listener: (worker: Worker) => void): this;
153
+        once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
154
+        once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
155
+        once(event: "online", listener: (worker: Worker) => void): this;
156
+        once(event: "setup", listener: (settings: ClusterSettings) => void): this;
157
+
158
+        prependListener(event: string, listener: (...args: any[]) => void): this;
159
+        prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
160
+        prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
161
+        prependListener(event: "fork", listener: (worker: Worker) => void): this;
162
+        prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
163
+        prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;  // the handle is a net.Socket or net.Server object, or undefined.
164
+        prependListener(event: "online", listener: (worker: Worker) => void): this;
165
+        prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
166
+
167
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
168
+        prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
169
+        prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
170
+        prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
171
+        prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
172
+        // the handle is a net.Socket or net.Server object, or undefined.
173
+        prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
174
+        prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
175
+        prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
176
+    }
177
+
178
+    const SCHED_NONE: number;
179
+    const SCHED_RR: number;
180
+
181
+    function disconnect(callback?: () => void): void;
182
+    function fork(env?: any): Worker;
183
+    const isMaster: boolean;
184
+    const isWorker: boolean;
185
+    let schedulingPolicy: number;
186
+    const settings: ClusterSettings;
187
+    function setupMaster(settings?: ClusterSettings): void;
188
+    const worker: Worker;
189
+    const workers: NodeJS.Dict<Worker>;
190
+
191
+    /**
192
+     * events.EventEmitter
193
+     *   1. disconnect
194
+     *   2. exit
195
+     *   3. fork
196
+     *   4. listening
197
+     *   5. message
198
+     *   6. online
199
+     *   7. setup
200
+     */
201
+    function addListener(event: string, listener: (...args: any[]) => void): Cluster;
202
+    function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
203
+    function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
204
+    function addListener(event: "fork", listener: (worker: Worker) => void): Cluster;
205
+    function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
206
+     // the handle is a net.Socket or net.Server object, or undefined.
207
+    function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
208
+    function addListener(event: "online", listener: (worker: Worker) => void): Cluster;
209
+    function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
210
+
211
+    function emit(event: string | symbol, ...args: any[]): boolean;
212
+    function emit(event: "disconnect", worker: Worker): boolean;
213
+    function emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
214
+    function emit(event: "fork", worker: Worker): boolean;
215
+    function emit(event: "listening", worker: Worker, address: Address): boolean;
216
+    function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
217
+    function emit(event: "online", worker: Worker): boolean;
218
+    function emit(event: "setup", settings: ClusterSettings): boolean;
219
+
220
+    function on(event: string, listener: (...args: any[]) => void): Cluster;
221
+    function on(event: "disconnect", listener: (worker: Worker) => void): Cluster;
222
+    function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
223
+    function on(event: "fork", listener: (worker: Worker) => void): Cluster;
224
+    function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
225
+    function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;  // the handle is a net.Socket or net.Server object, or undefined.
226
+    function on(event: "online", listener: (worker: Worker) => void): Cluster;
227
+    function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
228
+
229
+    function once(event: string, listener: (...args: any[]) => void): Cluster;
230
+    function once(event: "disconnect", listener: (worker: Worker) => void): Cluster;
231
+    function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
232
+    function once(event: "fork", listener: (worker: Worker) => void): Cluster;
233
+    function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
234
+    function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;  // the handle is a net.Socket or net.Server object, or undefined.
235
+    function once(event: "online", listener: (worker: Worker) => void): Cluster;
236
+    function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
237
+
238
+    function removeListener(event: string, listener: (...args: any[]) => void): Cluster;
239
+    function removeAllListeners(event?: string): Cluster;
240
+    function setMaxListeners(n: number): Cluster;
241
+    function getMaxListeners(): number;
242
+    function listeners(event: string): Function[];
243
+    function listenerCount(type: string): number;
244
+
245
+    function prependListener(event: string, listener: (...args: any[]) => void): Cluster;
246
+    function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
247
+    function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
248
+    function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster;
249
+    function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
250
+     // the handle is a net.Socket or net.Server object, or undefined.
251
+    function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
252
+    function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;
253
+    function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
254
+
255
+    function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster;
256
+    function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
257
+    function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
258
+    function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
259
+    function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
260
+     // the handle is a net.Socket or net.Server object, or undefined.
261
+    function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
262
+    function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;
263
+    function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
264
+
265
+    function eventNames(): string[];
266
+}
... ...
@@ -0,0 +1,137 @@
1
+declare module 'node:console' {
2
+    export = console;
3
+}
4
+
5
+declare module 'console' {
6
+    import { InspectOptions } from 'node:util';
7
+
8
+    global {
9
+        // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
10
+        interface Console {
11
+            Console: NodeJS.ConsoleConstructor;
12
+            /**
13
+             * A simple assertion test that verifies whether `value` is truthy.
14
+             * If it is not, an `AssertionError` is thrown.
15
+             * If provided, the error `message` is formatted using `util.format()` and used as the error message.
16
+             */
17
+            assert(value: any, message?: string, ...optionalParams: any[]): void;
18
+            /**
19
+             * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
20
+             * When `stdout` is not a TTY, this method does nothing.
21
+             */
22
+            clear(): void;
23
+            /**
24
+             * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
25
+             */
26
+            count(label?: string): void;
27
+            /**
28
+             * Resets the internal counter specific to `label`.
29
+             */
30
+            countReset(label?: string): void;
31
+            /**
32
+             * The `console.debug()` function is an alias for {@link console.log()}.
33
+             */
34
+            debug(message?: any, ...optionalParams: any[]): void;
35
+            /**
36
+             * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
37
+             * This function bypasses any custom `inspect()` function defined on `obj`.
38
+             */
39
+            dir(obj: any, options?: InspectOptions): void;
40
+            /**
41
+             * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
42
+             */
43
+            dirxml(...data: any[]): void;
44
+            /**
45
+             * Prints to `stderr` with newline.
46
+             */
47
+            error(message?: any, ...optionalParams: any[]): void;
48
+            /**
49
+             * Increases indentation of subsequent lines by two spaces.
50
+             * If one or more `label`s are provided, those are printed first without the additional indentation.
51
+             */
52
+            group(...label: any[]): void;
53
+            /**
54
+             * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
55
+             */
56
+            groupCollapsed(...label: any[]): void;
57
+            /**
58
+             * Decreases indentation of subsequent lines by two spaces.
59
+             */
60
+            groupEnd(): void;
61
+            /**
62
+             * The {@link console.info()} function is an alias for {@link console.log()}.
63
+             */
64
+            info(message?: any, ...optionalParams: any[]): void;
65
+            /**
66
+             * Prints to `stdout` with newline.
67
+             */
68
+            log(message?: any, ...optionalParams: any[]): void;
69
+            /**
70
+             * This method does not display anything unless used in the inspector.
71
+             *  Prints to `stdout` the array `array` formatted as a table.
72
+             */
73
+            table(tabularData: any, properties?: ReadonlyArray<string>): void;
74
+            /**
75
+             * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
76
+             */
77
+            time(label?: string): void;
78
+            /**
79
+             * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
80
+             */
81
+            timeEnd(label?: string): void;
82
+            /**
83
+             * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
84
+             */
85
+            timeLog(label?: string, ...data: any[]): void;
86
+            /**
87
+             * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
88
+             */
89
+            trace(message?: any, ...optionalParams: any[]): void;
90
+            /**
91
+             * The {@link console.warn()} function is an alias for {@link console.error()}.
92
+             */
93
+            warn(message?: any, ...optionalParams: any[]): void;
94
+
95
+            // --- Inspector mode only ---
96
+            /**
97
+             * This method does not display anything unless used in the inspector.
98
+             *  Starts a JavaScript CPU profile with an optional label.
99
+             */
100
+            profile(label?: string): void;
101
+            /**
102
+             * This method does not display anything unless used in the inspector.
103
+             *  Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
104
+             */
105
+            profileEnd(label?: string): void;
106
+            /**
107
+             * This method does not display anything unless used in the inspector.
108
+             *  Adds an event with the label `label` to the Timeline panel of the inspector.
109
+             */
110
+            timeStamp(label?: string): void;
111
+        }
112
+
113
+        var console: Console;
114
+
115
+        namespace NodeJS {
116
+            interface ConsoleConstructorOptions {
117
+                stdout: WritableStream;
118
+                stderr?: WritableStream;
119
+                ignoreErrors?: boolean;
120
+                colorMode?: boolean | 'auto';
121
+                inspectOptions?: InspectOptions;
122
+            }
123
+
124
+            interface ConsoleConstructor {
125
+                prototype: Console;
126
+                new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
127
+                new(options: ConsoleConstructorOptions): Console;
128
+            }
129
+
130
+            interface Global {
131
+                console: typeof console;
132
+            }
133
+        }
134
+    }
135
+
136
+    export = console;
137
+}
... ...
@@ -0,0 +1,19 @@
1
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2
+declare module 'node:constants' {
3
+    import exp = require('constants');
4
+    export = exp;
5
+}
6
+
7
+/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
8
+declare module 'constants' {
9
+    import { constants as osConstants, SignalConstants } from 'node:os';
10
+    import { constants as cryptoConstants } from 'node:crypto';
11
+    import { constants as fsConstants } from 'node:fs';
12
+
13
+    const exp: typeof osConstants.errno &
14
+        typeof osConstants.priority &
15
+        SignalConstants &
16
+        typeof cryptoConstants &
17
+        typeof fsConstants;
18
+    export = exp;
19
+}
... ...
@@ -0,0 +1,1176 @@
1
+declare module 'node:crypto' {
2
+    export * from 'crypto';
3
+}
4
+
5
+declare module 'crypto' {
6
+    import * as stream from 'node:stream';
7
+
8
+    interface Certificate {
9
+        /**
10
+         * @param spkac
11
+         * @returns The challenge component of the `spkac` data structure,
12
+         * which includes a public key and a challenge.
13
+         */
14
+        exportChallenge(spkac: BinaryLike): Buffer;
15
+        /**
16
+         * @param spkac
17
+         * @param encoding The encoding of the spkac string.
18
+         * @returns The public key component of the `spkac` data structure,
19
+         * which includes a public key and a challenge.
20
+         */
21
+        exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
22
+        /**
23
+         * @param spkac
24
+         * @returns `true` if the given `spkac` data structure is valid,
25
+         * `false` otherwise.
26
+         */
27
+        verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
28
+    }
29
+    const Certificate: Certificate & {
30
+        /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
31
+        new (): Certificate;
32
+        /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
33
+        (): Certificate;
34
+    };
35
+
36
+    namespace constants {
37
+        // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
38
+        const OPENSSL_VERSION_NUMBER: number;
39
+
40
+        /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
41
+        const SSL_OP_ALL: number;
42
+        /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
43
+        const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
44
+        /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
45
+        const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
46
+        /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
47
+        const SSL_OP_CISCO_ANYCONNECT: number;
48
+        /** Instructs OpenSSL to turn on cookie exchange. */
49
+        const SSL_OP_COOKIE_EXCHANGE: number;
50
+        /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
51
+        const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
52
+        /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
53
+        const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
54
+        /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
55
+        const SSL_OP_EPHEMERAL_RSA: number;
56
+        /** Allows initial connection to servers that do not support RI. */
57
+        const SSL_OP_LEGACY_SERVER_CONNECT: number;
58
+        const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
59
+        const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
60
+        /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
61
+        const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
62
+        const SSL_OP_NETSCAPE_CA_DN_BUG: number;
63
+        const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
64
+        const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
65
+        const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
66
+        /** Instructs OpenSSL to disable support for SSL/TLS compression. */
67
+        const SSL_OP_NO_COMPRESSION: number;
68
+        const SSL_OP_NO_QUERY_MTU: number;
69
+        /** Instructs OpenSSL to always start a new session when performing renegotiation. */
70
+        const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
71
+        const SSL_OP_NO_SSLv2: number;
72
+        const SSL_OP_NO_SSLv3: number;
73
+        const SSL_OP_NO_TICKET: number;
74
+        const SSL_OP_NO_TLSv1: number;
75
+        const SSL_OP_NO_TLSv1_1: number;
76
+        const SSL_OP_NO_TLSv1_2: number;
77
+        const SSL_OP_PKCS1_CHECK_1: number;
78
+        const SSL_OP_PKCS1_CHECK_2: number;
79
+        /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
80
+        const SSL_OP_SINGLE_DH_USE: number;
81
+        /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
82
+        const SSL_OP_SINGLE_ECDH_USE: number;
83
+        const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
84
+        const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
85
+        const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
86
+        const SSL_OP_TLS_D5_BUG: number;
87
+        /** Instructs OpenSSL to disable version rollback attack detection. */
88
+        const SSL_OP_TLS_ROLLBACK_BUG: number;
89
+
90
+        const ENGINE_METHOD_RSA: number;
91
+        const ENGINE_METHOD_DSA: number;
92
+        const ENGINE_METHOD_DH: number;
93
+        const ENGINE_METHOD_RAND: number;
94
+        const ENGINE_METHOD_EC: number;
95
+        const ENGINE_METHOD_CIPHERS: number;
96
+        const ENGINE_METHOD_DIGESTS: number;
97
+        const ENGINE_METHOD_PKEY_METHS: number;
98
+        const ENGINE_METHOD_PKEY_ASN1_METHS: number;
99
+        const ENGINE_METHOD_ALL: number;
100
+        const ENGINE_METHOD_NONE: number;
101
+
102
+        const DH_CHECK_P_NOT_SAFE_PRIME: number;
103
+        const DH_CHECK_P_NOT_PRIME: number;
104
+        const DH_UNABLE_TO_CHECK_GENERATOR: number;
105
+        const DH_NOT_SUITABLE_GENERATOR: number;
106
+
107
+        const ALPN_ENABLED: number;
108
+
109
+        const RSA_PKCS1_PADDING: number;
110
+        const RSA_SSLV23_PADDING: number;
111
+        const RSA_NO_PADDING: number;
112
+        const RSA_PKCS1_OAEP_PADDING: number;
113
+        const RSA_X931_PADDING: number;
114
+        const RSA_PKCS1_PSS_PADDING: number;
115
+        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
116
+        const RSA_PSS_SALTLEN_DIGEST: number;
117
+        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
118
+        const RSA_PSS_SALTLEN_MAX_SIGN: number;
119
+        /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
120
+        const RSA_PSS_SALTLEN_AUTO: number;
121
+
122
+        const POINT_CONVERSION_COMPRESSED: number;
123
+        const POINT_CONVERSION_UNCOMPRESSED: number;
124
+        const POINT_CONVERSION_HYBRID: number;
125
+
126
+        /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
127
+        const defaultCoreCipherList: string;
128
+        /** Specifies the active default cipher list used by the current Node.js process  (colon-separated values). */
129
+        const defaultCipherList: string;
130
+    }
131
+
132
+    interface HashOptions extends stream.TransformOptions {
133
+        /**
134
+         * For XOF hash functions such as `shake256`, the
135
+         * outputLength option can be used to specify the desired output length in bytes.
136
+         */
137
+        outputLength?: number;
138
+    }
139
+
140
+    /** @deprecated since v10.0.0 */
141
+    const fips: boolean;
142
+
143
+    function createHash(algorithm: string, options?: HashOptions): Hash;
144
+    function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
145
+
146
+    // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
147
+    type BinaryToTextEncoding = 'base64' | 'hex';
148
+    type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
149
+    type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
150
+
151
+    type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
152
+
153
+    type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
154
+
155
+    class Hash extends stream.Transform {
156
+        private constructor();
157
+        copy(): Hash;
158
+        update(data: BinaryLike): Hash;
159
+        update(data: string, input_encoding: Encoding): Hash;
160
+        digest(): Buffer;
161
+        digest(encoding: BinaryToTextEncoding): string;
162
+    }
163
+    class Hmac extends stream.Transform {
164
+        private constructor();
165
+        update(data: BinaryLike): Hmac;
166
+        update(data: string, input_encoding: Encoding): Hmac;
167
+        digest(): Buffer;
168
+        digest(encoding: BinaryToTextEncoding): string;
169
+    }
170
+
171
+    type KeyObjectType = 'secret' | 'public' | 'private';
172
+
173
+    interface KeyExportOptions<T extends KeyFormat> {
174
+        type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
175
+        format: T;
176
+        cipher?: string;
177
+        passphrase?: string | Buffer;
178
+    }
179
+
180
+    class KeyObject {
181
+        private constructor();
182
+        asymmetricKeyType?: KeyType;
183
+        /**
184
+         * For asymmetric keys, this property represents the size of the embedded key in
185
+         * bytes. This property is `undefined` for symmetric keys.
186
+         */
187
+        asymmetricKeySize?: number;
188
+        export(options: KeyExportOptions<'pem'>): string | Buffer;
189
+        export(options?: KeyExportOptions<'der'>): Buffer;
190
+        symmetricKeySize?: number;
191
+        type: KeyObjectType;
192
+    }
193
+
194
+    type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
195
+    type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
196
+
197
+    type BinaryLike = string | NodeJS.ArrayBufferView;
198
+
199
+    type CipherKey = BinaryLike | KeyObject;
200
+
201
+    interface CipherCCMOptions extends stream.TransformOptions {
202
+        authTagLength: number;
203
+    }
204
+    interface CipherGCMOptions extends stream.TransformOptions {
205
+        authTagLength?: number;
206
+    }
207
+    /** @deprecated since v10.0.0 use `createCipheriv()` */
208
+    function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
209
+    /** @deprecated since v10.0.0 use `createCipheriv()` */
210
+    function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
211
+    /** @deprecated since v10.0.0 use `createCipheriv()` */
212
+    function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
213
+
214
+    function createCipheriv(
215
+        algorithm: CipherCCMTypes,
216
+        key: CipherKey,
217
+        iv: BinaryLike | null,
218
+        options: CipherCCMOptions,
219
+    ): CipherCCM;
220
+    function createCipheriv(
221
+        algorithm: CipherGCMTypes,
222
+        key: CipherKey,
223
+        iv: BinaryLike | null,
224
+        options?: CipherGCMOptions,
225
+    ): CipherGCM;
226
+    function createCipheriv(
227
+        algorithm: string,
228
+        key: CipherKey,
229
+        iv: BinaryLike | null,
230
+        options?: stream.TransformOptions,
231
+    ): Cipher;
232
+
233
+    class Cipher extends stream.Transform {
234
+        private constructor();
235
+        update(data: BinaryLike): Buffer;
236
+        update(data: string, input_encoding: Encoding): Buffer;
237
+        update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: BinaryToTextEncoding): string;
238
+        update(data: string, input_encoding: Encoding | undefined, output_encoding: BinaryToTextEncoding): string;
239
+        final(): Buffer;
240
+        final(output_encoding: BufferEncoding): string;
241
+        setAutoPadding(auto_padding?: boolean): this;
242
+        // getAuthTag(): Buffer;
243
+        // setAAD(buffer: NodeJS.ArrayBufferView): this;
244
+    }
245
+    interface CipherCCM extends Cipher {
246
+        setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
247
+        getAuthTag(): Buffer;
248
+    }
249
+    interface CipherGCM extends Cipher {
250
+        setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
251
+        getAuthTag(): Buffer;
252
+    }
253
+    /** @deprecated since v10.0.0 use `createDecipheriv()` */
254
+    function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
255
+    /** @deprecated since v10.0.0 use `createDecipheriv()` */
256
+    function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
257
+    /** @deprecated since v10.0.0 use `createDecipheriv()` */
258
+    function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
259
+
260
+    function createDecipheriv(
261
+        algorithm: CipherCCMTypes,
262
+        key: CipherKey,
263
+        iv: BinaryLike | null,
264
+        options: CipherCCMOptions,
265
+    ): DecipherCCM;
266
+    function createDecipheriv(
267
+        algorithm: CipherGCMTypes,
268
+        key: CipherKey,
269
+        iv: BinaryLike | null,
270
+        options?: CipherGCMOptions,
271
+    ): DecipherGCM;
272
+    function createDecipheriv(
273
+        algorithm: string,
274
+        key: CipherKey,
275
+        iv: BinaryLike | null,
276
+        options?: stream.TransformOptions,
277
+    ): Decipher;
278
+
279
+    class Decipher extends stream.Transform {
280
+        private constructor();
281
+        update(data: NodeJS.ArrayBufferView): Buffer;
282
+        update(data: string, input_encoding: BinaryToTextEncoding): Buffer;
283
+        update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string;
284
+        update(data: string, input_encoding: BinaryToTextEncoding | undefined, output_encoding: Encoding): string;
285
+        final(): Buffer;
286
+        final(output_encoding: BufferEncoding): string;
287
+        setAutoPadding(auto_padding?: boolean): this;
288
+        // setAuthTag(tag: NodeJS.ArrayBufferView): this;
289
+        // setAAD(buffer: NodeJS.ArrayBufferView): this;
290
+    }
291
+    interface DecipherCCM extends Decipher {
292
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
293
+        setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
294
+    }
295
+    interface DecipherGCM extends Decipher {
296
+        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
297
+        setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
298
+    }
299
+
300
+    interface PrivateKeyInput {
301
+        key: string | Buffer;
302
+        format?: KeyFormat;
303
+        type?: 'pkcs1' | 'pkcs8' | 'sec1';
304
+        passphrase?: string | Buffer;
305
+    }
306
+
307
+    interface PublicKeyInput {
308
+        key: string | Buffer;
309
+        format?: KeyFormat;
310
+        type?: 'pkcs1' | 'spki';
311
+    }
312
+
313
+    function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
314
+    function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
315
+    function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
316
+
317
+    function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
318
+
319
+    type DSAEncoding = 'der' | 'ieee-p1363';
320
+
321
+    interface SigningOptions {
322
+        /**
323
+         * @See crypto.constants.RSA_PKCS1_PADDING
324
+         */
325
+        padding?: number;
326
+        saltLength?: number;
327
+        dsaEncoding?: DSAEncoding;
328
+    }
329
+
330
+    interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
331
+    interface SignKeyObjectInput extends SigningOptions {
332
+        key: KeyObject;
333
+    }
334
+    interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
335
+    interface VerifyKeyObjectInput extends SigningOptions {
336
+        key: KeyObject;
337
+    }
338
+
339
+    type KeyLike = string | Buffer | KeyObject;
340
+
341
+    class Signer extends stream.Writable {
342
+        private constructor();
343
+
344
+        update(data: BinaryLike): Signer;
345
+        update(data: string, input_encoding: Encoding): Signer;
346
+        sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
347
+        sign(
348
+            private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
349
+            output_format: BinaryToTextEncoding,
350
+        ): string;
351
+    }
352
+
353
+    function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
354
+    class Verify extends stream.Writable {
355
+        private constructor();
356
+
357
+        update(data: BinaryLike): Verify;
358
+        update(data: string, input_encoding: Encoding): Verify;
359
+        verify(
360
+            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
361
+            signature: NodeJS.ArrayBufferView,
362
+        ): boolean;
363
+        verify(
364
+            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
365
+            signature: string,
366
+            signature_format?: BinaryToTextEncoding,
367
+        ): boolean;
368
+        // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
369
+        // The signature field accepts a TypedArray type, but it is only available starting ES2017
370
+    }
371
+    function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
372
+    function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
373
+    function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman;
374
+    function createDiffieHellman(
375
+        prime: string,
376
+        prime_encoding: BinaryToTextEncoding,
377
+        generator: number | NodeJS.ArrayBufferView,
378
+    ): DiffieHellman;
379
+    function createDiffieHellman(
380
+        prime: string,
381
+        prime_encoding: BinaryToTextEncoding,
382
+        generator: string,
383
+        generator_encoding: BinaryToTextEncoding,
384
+    ): DiffieHellman;
385
+    class DiffieHellman {
386
+        private constructor();
387
+        generateKeys(): Buffer;
388
+        generateKeys(encoding: BinaryToTextEncoding): string;
389
+        computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
390
+        computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
391
+        computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
392
+        computeSecret(
393
+            other_public_key: string,
394
+            input_encoding: BinaryToTextEncoding,
395
+            output_encoding: BinaryToTextEncoding,
396
+        ): string;
397
+        getPrime(): Buffer;
398
+        getPrime(encoding: BinaryToTextEncoding): string;
399
+        getGenerator(): Buffer;
400
+        getGenerator(encoding: BinaryToTextEncoding): string;
401
+        getPublicKey(): Buffer;
402
+        getPublicKey(encoding: BinaryToTextEncoding): string;
403
+        getPrivateKey(): Buffer;
404
+        getPrivateKey(encoding: BinaryToTextEncoding): string;
405
+        setPublicKey(public_key: NodeJS.ArrayBufferView): void;
406
+        setPublicKey(public_key: string, encoding: BufferEncoding): void;
407
+        setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
408
+        setPrivateKey(private_key: string, encoding: BufferEncoding): void;
409
+        verifyError: number;
410
+    }
411
+    function getDiffieHellman(group_name: string): DiffieHellman;
412
+    function pbkdf2(
413
+        password: BinaryLike,
414
+        salt: BinaryLike,
415
+        iterations: number,
416
+        keylen: number,
417
+        digest: string,
418
+        callback: (err: Error | null, derivedKey: Buffer) => any,
419
+    ): void;
420
+    function pbkdf2Sync(
421
+        password: BinaryLike,
422
+        salt: BinaryLike,
423
+        iterations: number,
424
+        keylen: number,
425
+        digest: string,
426
+    ): Buffer;
427
+
428
+    function randomBytes(size: number): Buffer;
429
+    function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
430
+    function pseudoRandomBytes(size: number): Buffer;
431
+    function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
432
+
433
+    function randomInt(max: number): number;
434
+    function randomInt(min: number, max: number): number;
435
+    function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
436
+    function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
437
+
438
+    function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
439
+    function randomFill<T extends NodeJS.ArrayBufferView>(
440
+        buffer: T,
441
+        callback: (err: Error | null, buf: T) => void,
442
+    ): void;
443
+    function randomFill<T extends NodeJS.ArrayBufferView>(
444
+        buffer: T,
445
+        offset: number,
446
+        callback: (err: Error | null, buf: T) => void,
447
+    ): void;
448
+    function randomFill<T extends NodeJS.ArrayBufferView>(
449
+        buffer: T,
450
+        offset: number,
451
+        size: number,
452
+        callback: (err: Error | null, buf: T) => void,
453
+    ): void;
454
+
455
+    interface ScryptOptions {
456
+        cost?: number;
457
+        blockSize?: number;
458
+        parallelization?: number;
459
+        N?: number;
460
+        r?: number;
461
+        p?: number;
462
+        maxmem?: number;
463
+    }
464
+    function scrypt(
465
+        password: BinaryLike,
466
+        salt: BinaryLike,
467
+        keylen: number,
468
+        callback: (err: Error | null, derivedKey: Buffer) => void,
469
+    ): void;
470
+    function scrypt(
471
+        password: BinaryLike,
472
+        salt: BinaryLike,
473
+        keylen: number,
474
+        options: ScryptOptions,
475
+        callback: (err: Error | null, derivedKey: Buffer) => void,
476
+    ): void;
477
+    function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
478
+
479
+    interface RsaPublicKey {
480
+        key: KeyLike;
481
+        padding?: number;
482
+    }
483
+    interface RsaPrivateKey {
484
+        key: KeyLike;
485
+        passphrase?: string;
486
+        /**
487
+         * @default 'sha1'
488
+         */
489
+        oaepHash?: string;
490
+        oaepLabel?: NodeJS.TypedArray;
491
+        padding?: number;
492
+    }
493
+    function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
494
+    function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
495
+    function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
496
+    function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
497
+    function getCiphers(): string[];
498
+    function getCurves(): string[];
499
+    function getFips(): 1 | 0;
500
+    function getHashes(): string[];
501
+    class ECDH {
502
+        private constructor();
503
+        static convertKey(
504
+            key: BinaryLike,
505
+            curve: string,
506
+            inputEncoding?: BinaryToTextEncoding,
507
+            outputEncoding?: 'latin1' | 'hex' | 'base64',
508
+            format?: 'uncompressed' | 'compressed' | 'hybrid',
509
+        ): Buffer | string;
510
+        generateKeys(): Buffer;
511
+        generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
512
+        computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
513
+        computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
514
+        computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
515
+        computeSecret(
516
+            other_public_key: string,
517
+            input_encoding: BinaryToTextEncoding,
518
+            output_encoding: BinaryToTextEncoding,
519
+        ): string;
520
+        getPrivateKey(): Buffer;
521
+        getPrivateKey(encoding: BinaryToTextEncoding): string;
522
+        getPublicKey(): Buffer;
523
+        getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
524
+        setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
525
+        setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void;
526
+    }
527
+    function createECDH(curve_name: string): ECDH;
528
+    function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
529
+    /** @deprecated since v10.0.0 */
530
+    const DEFAULT_ENCODING: BufferEncoding;
531
+
532
+    type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
533
+    type KeyFormat = 'pem' | 'der';
534
+
535
+    interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
536
+        format: T;
537
+        cipher?: string;
538
+        passphrase?: string;
539
+    }
540
+
541
+    interface KeyPairKeyObjectResult {
542
+        publicKey: KeyObject;
543
+        privateKey: KeyObject;
544
+    }
545
+
546
+    interface ED25519KeyPairKeyObjectOptions {
547
+        /**
548
+         * No options.
549
+         */
550
+    }
551
+
552
+    interface ED448KeyPairKeyObjectOptions {
553
+        /**
554
+         * No options.
555
+         */
556
+    }
557
+
558
+    interface X25519KeyPairKeyObjectOptions {
559
+        /**
560
+         * No options.
561
+         */
562
+    }
563
+
564
+    interface X448KeyPairKeyObjectOptions {
565
+        /**
566
+         * No options.
567
+         */
568
+    }
569
+
570
+    interface ECKeyPairKeyObjectOptions {
571
+        /**
572
+         * Name of the curve to use.
573
+         */
574
+        namedCurve: string;
575
+    }
576
+
577
+    interface RSAKeyPairKeyObjectOptions {
578
+        /**
579
+         * Key size in bits
580
+         */
581
+        modulusLength: number;
582
+
583
+        /**
584
+         * @default 0x10001
585
+         */
586
+        publicExponent?: number;
587
+    }
588
+
589
+    interface DSAKeyPairKeyObjectOptions {
590
+        /**
591
+         * Key size in bits
592
+         */
593
+        modulusLength: number;
594
+
595
+        /**
596
+         * Size of q in bits
597
+         */
598
+        divisorLength: number;
599
+    }
600
+
601
+    interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
602
+        /**
603
+         * Key size in bits
604
+         */
605
+        modulusLength: number;
606
+        /**
607
+         * @default 0x10001
608
+         */
609
+        publicExponent?: number;
610
+
611
+        publicKeyEncoding: {
612
+            type: 'pkcs1' | 'spki';
613
+            format: PubF;
614
+        };
615
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
616
+            type: 'pkcs1' | 'pkcs8';
617
+        };
618
+    }
619
+
620
+    interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
621
+        /**
622
+         * Key size in bits
623
+         */
624
+        modulusLength: number;
625
+        /**
626
+         * Size of q in bits
627
+         */
628
+        divisorLength: number;
629
+
630
+        publicKeyEncoding: {
631
+            type: 'spki';
632
+            format: PubF;
633
+        };
634
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
635
+            type: 'pkcs8';
636
+        };
637
+    }
638
+
639
+    interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
640
+        /**
641
+         * Name of the curve to use.
642
+         */
643
+        namedCurve: string;
644
+
645
+        publicKeyEncoding: {
646
+            type: 'pkcs1' | 'spki';
647
+            format: PubF;
648
+        };
649
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
650
+            type: 'sec1' | 'pkcs8';
651
+        };
652
+    }
653
+
654
+    interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
655
+        publicKeyEncoding: {
656
+            type: 'spki';
657
+            format: PubF;
658
+        };
659
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
660
+            type: 'pkcs8';
661
+        };
662
+    }
663
+
664
+    interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
665
+        publicKeyEncoding: {
666
+            type: 'spki';
667
+            format: PubF;
668
+        };
669
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
670
+            type: 'pkcs8';
671
+        };
672
+    }
673
+
674
+    interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
675
+        publicKeyEncoding: {
676
+            type: 'spki';
677
+            format: PubF;
678
+        };
679
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
680
+            type: 'pkcs8';
681
+        };
682
+    }
683
+
684
+    interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
685
+        publicKeyEncoding: {
686
+            type: 'spki';
687
+            format: PubF;
688
+        };
689
+        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
690
+            type: 'pkcs8';
691
+        };
692
+    }
693
+
694
+    interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
695
+        publicKey: T1;
696
+        privateKey: T2;
697
+    }
698
+
699
+    function generateKeyPairSync(
700
+        type: 'rsa',
701
+        options: RSAKeyPairOptions<'pem', 'pem'>,
702
+    ): KeyPairSyncResult<string, string>;
703
+    function generateKeyPairSync(
704
+        type: 'rsa',
705
+        options: RSAKeyPairOptions<'pem', 'der'>,
706
+    ): KeyPairSyncResult<string, Buffer>;
707
+    function generateKeyPairSync(
708
+        type: 'rsa',
709
+        options: RSAKeyPairOptions<'der', 'pem'>,
710
+    ): KeyPairSyncResult<Buffer, string>;
711
+    function generateKeyPairSync(
712
+        type: 'rsa',
713
+        options: RSAKeyPairOptions<'der', 'der'>,
714
+    ): KeyPairSyncResult<Buffer, Buffer>;
715
+    function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
716
+
717
+    function generateKeyPairSync(
718
+        type: 'dsa',
719
+        options: DSAKeyPairOptions<'pem', 'pem'>,
720
+    ): KeyPairSyncResult<string, string>;
721
+    function generateKeyPairSync(
722
+        type: 'dsa',
723
+        options: DSAKeyPairOptions<'pem', 'der'>,
724
+    ): KeyPairSyncResult<string, Buffer>;
725
+    function generateKeyPairSync(
726
+        type: 'dsa',
727
+        options: DSAKeyPairOptions<'der', 'pem'>,
728
+    ): KeyPairSyncResult<Buffer, string>;
729
+    function generateKeyPairSync(
730
+        type: 'dsa',
731
+        options: DSAKeyPairOptions<'der', 'der'>,
732
+    ): KeyPairSyncResult<Buffer, Buffer>;
733
+    function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
734
+
735
+    function generateKeyPairSync(
736
+        type: 'ec',
737
+        options: ECKeyPairOptions<'pem', 'pem'>,
738
+    ): KeyPairSyncResult<string, string>;
739
+    function generateKeyPairSync(
740
+        type: 'ec',
741
+        options: ECKeyPairOptions<'pem', 'der'>,
742
+    ): KeyPairSyncResult<string, Buffer>;
743
+    function generateKeyPairSync(
744
+        type: 'ec',
745
+        options: ECKeyPairOptions<'der', 'pem'>,
746
+    ): KeyPairSyncResult<Buffer, string>;
747
+    function generateKeyPairSync(
748
+        type: 'ec',
749
+        options: ECKeyPairOptions<'der', 'der'>,
750
+    ): KeyPairSyncResult<Buffer, Buffer>;
751
+    function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
752
+
753
+    function generateKeyPairSync(
754
+        type: 'ed25519',
755
+        options: ED25519KeyPairOptions<'pem', 'pem'>,
756
+    ): KeyPairSyncResult<string, string>;
757
+    function generateKeyPairSync(
758
+        type: 'ed25519',
759
+        options: ED25519KeyPairOptions<'pem', 'der'>,
760
+    ): KeyPairSyncResult<string, Buffer>;
761
+    function generateKeyPairSync(
762
+        type: 'ed25519',
763
+        options: ED25519KeyPairOptions<'der', 'pem'>,
764
+    ): KeyPairSyncResult<Buffer, string>;
765
+    function generateKeyPairSync(
766
+        type: 'ed25519',
767
+        options: ED25519KeyPairOptions<'der', 'der'>,
768
+    ): KeyPairSyncResult<Buffer, Buffer>;
769
+    function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
770
+
771
+    function generateKeyPairSync(
772
+        type: 'ed448',
773
+        options: ED448KeyPairOptions<'pem', 'pem'>,
774
+    ): KeyPairSyncResult<string, string>;
775
+    function generateKeyPairSync(
776
+        type: 'ed448',
777
+        options: ED448KeyPairOptions<'pem', 'der'>,
778
+    ): KeyPairSyncResult<string, Buffer>;
779
+    function generateKeyPairSync(
780
+        type: 'ed448',
781
+        options: ED448KeyPairOptions<'der', 'pem'>,
782
+    ): KeyPairSyncResult<Buffer, string>;
783
+    function generateKeyPairSync(
784
+        type: 'ed448',
785
+        options: ED448KeyPairOptions<'der', 'der'>,
786
+    ): KeyPairSyncResult<Buffer, Buffer>;
787
+    function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
788
+
789
+    function generateKeyPairSync(
790
+        type: 'x25519',
791
+        options: X25519KeyPairOptions<'pem', 'pem'>,
792
+    ): KeyPairSyncResult<string, string>;
793
+    function generateKeyPairSync(
794
+        type: 'x25519',
795
+        options: X25519KeyPairOptions<'pem', 'der'>,
796
+    ): KeyPairSyncResult<string, Buffer>;
797
+    function generateKeyPairSync(
798
+        type: 'x25519',
799
+        options: X25519KeyPairOptions<'der', 'pem'>,
800
+    ): KeyPairSyncResult<Buffer, string>;
801
+    function generateKeyPairSync(
802
+        type: 'x25519',
803
+        options: X25519KeyPairOptions<'der', 'der'>,
804
+    ): KeyPairSyncResult<Buffer, Buffer>;
805
+    function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
806
+
807
+    function generateKeyPairSync(
808
+        type: 'x448',
809
+        options: X448KeyPairOptions<'pem', 'pem'>,
810
+    ): KeyPairSyncResult<string, string>;
811
+    function generateKeyPairSync(
812
+        type: 'x448',
813
+        options: X448KeyPairOptions<'pem', 'der'>,
814
+    ): KeyPairSyncResult<string, Buffer>;
815
+    function generateKeyPairSync(
816
+        type: 'x448',
817
+        options: X448KeyPairOptions<'der', 'pem'>,
818
+    ): KeyPairSyncResult<Buffer, string>;
819
+    function generateKeyPairSync(
820
+        type: 'x448',
821
+        options: X448KeyPairOptions<'der', 'der'>,
822
+    ): KeyPairSyncResult<Buffer, Buffer>;
823
+    function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
824
+
825
+    function generateKeyPair(
826
+        type: 'rsa',
827
+        options: RSAKeyPairOptions<'pem', 'pem'>,
828
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
829
+    ): void;
830
+    function generateKeyPair(
831
+        type: 'rsa',
832
+        options: RSAKeyPairOptions<'pem', 'der'>,
833
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
834
+    ): void;
835
+    function generateKeyPair(
836
+        type: 'rsa',
837
+        options: RSAKeyPairOptions<'der', 'pem'>,
838
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
839
+    ): void;
840
+    function generateKeyPair(
841
+        type: 'rsa',
842
+        options: RSAKeyPairOptions<'der', 'der'>,
843
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
844
+    ): void;
845
+    function generateKeyPair(
846
+        type: 'rsa',
847
+        options: RSAKeyPairKeyObjectOptions,
848
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
849
+    ): void;
850
+
851
+    function generateKeyPair(
852
+        type: 'dsa',
853
+        options: DSAKeyPairOptions<'pem', 'pem'>,
854
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
855
+    ): void;
856
+    function generateKeyPair(
857
+        type: 'dsa',
858
+        options: DSAKeyPairOptions<'pem', 'der'>,
859
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
860
+    ): void;
861
+    function generateKeyPair(
862
+        type: 'dsa',
863
+        options: DSAKeyPairOptions<'der', 'pem'>,
864
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
865
+    ): void;
866
+    function generateKeyPair(
867
+        type: 'dsa',
868
+        options: DSAKeyPairOptions<'der', 'der'>,
869
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
870
+    ): void;
871
+    function generateKeyPair(
872
+        type: 'dsa',
873
+        options: DSAKeyPairKeyObjectOptions,
874
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
875
+    ): void;
876
+
877
+    function generateKeyPair(
878
+        type: 'ec',
879
+        options: ECKeyPairOptions<'pem', 'pem'>,
880
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
881
+    ): void;
882
+    function generateKeyPair(
883
+        type: 'ec',
884
+        options: ECKeyPairOptions<'pem', 'der'>,
885
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
886
+    ): void;
887
+    function generateKeyPair(
888
+        type: 'ec',
889
+        options: ECKeyPairOptions<'der', 'pem'>,
890
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
891
+    ): void;
892
+    function generateKeyPair(
893
+        type: 'ec',
894
+        options: ECKeyPairOptions<'der', 'der'>,
895
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
896
+    ): void;
897
+    function generateKeyPair(
898
+        type: 'ec',
899
+        options: ECKeyPairKeyObjectOptions,
900
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
901
+    ): void;
902
+
903
+    function generateKeyPair(
904
+        type: 'ed25519',
905
+        options: ED25519KeyPairOptions<'pem', 'pem'>,
906
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
907
+    ): void;
908
+    function generateKeyPair(
909
+        type: 'ed25519',
910
+        options: ED25519KeyPairOptions<'pem', 'der'>,
911
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
912
+    ): void;
913
+    function generateKeyPair(
914
+        type: 'ed25519',
915
+        options: ED25519KeyPairOptions<'der', 'pem'>,
916
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
917
+    ): void;
918
+    function generateKeyPair(
919
+        type: 'ed25519',
920
+        options: ED25519KeyPairOptions<'der', 'der'>,
921
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
922
+    ): void;
923
+    function generateKeyPair(
924
+        type: 'ed25519',
925
+        options: ED25519KeyPairKeyObjectOptions | undefined,
926
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
927
+    ): void;
928
+
929
+    function generateKeyPair(
930
+        type: 'ed448',
931
+        options: ED448KeyPairOptions<'pem', 'pem'>,
932
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
933
+    ): void;
934
+    function generateKeyPair(
935
+        type: 'ed448',
936
+        options: ED448KeyPairOptions<'pem', 'der'>,
937
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
938
+    ): void;
939
+    function generateKeyPair(
940
+        type: 'ed448',
941
+        options: ED448KeyPairOptions<'der', 'pem'>,
942
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
943
+    ): void;
944
+    function generateKeyPair(
945
+        type: 'ed448',
946
+        options: ED448KeyPairOptions<'der', 'der'>,
947
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
948
+    ): void;
949
+    function generateKeyPair(
950
+        type: 'ed448',
951
+        options: ED448KeyPairKeyObjectOptions | undefined,
952
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
953
+    ): void;
954
+
955
+    function generateKeyPair(
956
+        type: 'x25519',
957
+        options: X25519KeyPairOptions<'pem', 'pem'>,
958
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
959
+    ): void;
960
+    function generateKeyPair(
961
+        type: 'x25519',
962
+        options: X25519KeyPairOptions<'pem', 'der'>,
963
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
964
+    ): void;
965
+    function generateKeyPair(
966
+        type: 'x25519',
967
+        options: X25519KeyPairOptions<'der', 'pem'>,
968
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
969
+    ): void;
970
+    function generateKeyPair(
971
+        type: 'x25519',
972
+        options: X25519KeyPairOptions<'der', 'der'>,
973
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
974
+    ): void;
975
+    function generateKeyPair(
976
+        type: 'x25519',
977
+        options: X25519KeyPairKeyObjectOptions | undefined,
978
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
979
+    ): void;
980
+
981
+    function generateKeyPair(
982
+        type: 'x448',
983
+        options: X448KeyPairOptions<'pem', 'pem'>,
984
+        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
985
+    ): void;
986
+    function generateKeyPair(
987
+        type: 'x448',
988
+        options: X448KeyPairOptions<'pem', 'der'>,
989
+        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
990
+    ): void;
991
+    function generateKeyPair(
992
+        type: 'x448',
993
+        options: X448KeyPairOptions<'der', 'pem'>,
994
+        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
995
+    ): void;
996
+    function generateKeyPair(
997
+        type: 'x448',
998
+        options: X448KeyPairOptions<'der', 'der'>,
999
+        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
1000
+    ): void;
1001
+    function generateKeyPair(
1002
+        type: 'x448',
1003
+        options: X448KeyPairKeyObjectOptions | undefined,
1004
+        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
1005
+    ): void;
1006
+
1007
+    namespace generateKeyPair {
1008
+        function __promisify__(
1009
+            type: 'rsa',
1010
+            options: RSAKeyPairOptions<'pem', 'pem'>,
1011
+        ): Promise<{ publicKey: string; privateKey: string }>;
1012
+        function __promisify__(
1013
+            type: 'rsa',
1014
+            options: RSAKeyPairOptions<'pem', 'der'>,
1015
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1016
+        function __promisify__(
1017
+            type: 'rsa',
1018
+            options: RSAKeyPairOptions<'der', 'pem'>,
1019
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1020
+        function __promisify__(
1021
+            type: 'rsa',
1022
+            options: RSAKeyPairOptions<'der', 'der'>,
1023
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1024
+        function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1025
+
1026
+        function __promisify__(
1027
+            type: 'dsa',
1028
+            options: DSAKeyPairOptions<'pem', 'pem'>,
1029
+        ): Promise<{ publicKey: string; privateKey: string }>;
1030
+        function __promisify__(
1031
+            type: 'dsa',
1032
+            options: DSAKeyPairOptions<'pem', 'der'>,
1033
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1034
+        function __promisify__(
1035
+            type: 'dsa',
1036
+            options: DSAKeyPairOptions<'der', 'pem'>,
1037
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1038
+        function __promisify__(
1039
+            type: 'dsa',
1040
+            options: DSAKeyPairOptions<'der', 'der'>,
1041
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1042
+        function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1043
+
1044
+        function __promisify__(
1045
+            type: 'ec',
1046
+            options: ECKeyPairOptions<'pem', 'pem'>,
1047
+        ): Promise<{ publicKey: string; privateKey: string }>;
1048
+        function __promisify__(
1049
+            type: 'ec',
1050
+            options: ECKeyPairOptions<'pem', 'der'>,
1051
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1052
+        function __promisify__(
1053
+            type: 'ec',
1054
+            options: ECKeyPairOptions<'der', 'pem'>,
1055
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1056
+        function __promisify__(
1057
+            type: 'ec',
1058
+            options: ECKeyPairOptions<'der', 'der'>,
1059
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1060
+        function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1061
+
1062
+        function __promisify__(
1063
+            type: 'ed25519',
1064
+            options: ED25519KeyPairOptions<'pem', 'pem'>,
1065
+        ): Promise<{ publicKey: string; privateKey: string }>;
1066
+        function __promisify__(
1067
+            type: 'ed25519',
1068
+            options: ED25519KeyPairOptions<'pem', 'der'>,
1069
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1070
+        function __promisify__(
1071
+            type: 'ed25519',
1072
+            options: ED25519KeyPairOptions<'der', 'pem'>,
1073
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1074
+        function __promisify__(
1075
+            type: 'ed25519',
1076
+            options: ED25519KeyPairOptions<'der', 'der'>,
1077
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1078
+        function __promisify__(
1079
+            type: 'ed25519',
1080
+            options?: ED25519KeyPairKeyObjectOptions,
1081
+        ): Promise<KeyPairKeyObjectResult>;
1082
+
1083
+        function __promisify__(
1084
+            type: 'ed448',
1085
+            options: ED448KeyPairOptions<'pem', 'pem'>,
1086
+        ): Promise<{ publicKey: string; privateKey: string }>;
1087
+        function __promisify__(
1088
+            type: 'ed448',
1089
+            options: ED448KeyPairOptions<'pem', 'der'>,
1090
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1091
+        function __promisify__(
1092
+            type: 'ed448',
1093
+            options: ED448KeyPairOptions<'der', 'pem'>,
1094
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1095
+        function __promisify__(
1096
+            type: 'ed448',
1097
+            options: ED448KeyPairOptions<'der', 'der'>,
1098
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1099
+        function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1100
+
1101
+        function __promisify__(
1102
+            type: 'x25519',
1103
+            options: X25519KeyPairOptions<'pem', 'pem'>,
1104
+        ): Promise<{ publicKey: string; privateKey: string }>;
1105
+        function __promisify__(
1106
+            type: 'x25519',
1107
+            options: X25519KeyPairOptions<'pem', 'der'>,
1108
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1109
+        function __promisify__(
1110
+            type: 'x25519',
1111
+            options: X25519KeyPairOptions<'der', 'pem'>,
1112
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1113
+        function __promisify__(
1114
+            type: 'x25519',
1115
+            options: X25519KeyPairOptions<'der', 'der'>,
1116
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1117
+        function __promisify__(
1118
+            type: 'x25519',
1119
+            options?: X25519KeyPairKeyObjectOptions,
1120
+        ): Promise<KeyPairKeyObjectResult>;
1121
+
1122
+        function __promisify__(
1123
+            type: 'x448',
1124
+            options: X448KeyPairOptions<'pem', 'pem'>,
1125
+        ): Promise<{ publicKey: string; privateKey: string }>;
1126
+        function __promisify__(
1127
+            type: 'x448',
1128
+            options: X448KeyPairOptions<'pem', 'der'>,
1129
+        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1130
+        function __promisify__(
1131
+            type: 'x448',
1132
+            options: X448KeyPairOptions<'der', 'pem'>,
1133
+        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1134
+        function __promisify__(
1135
+            type: 'x448',
1136
+            options: X448KeyPairOptions<'der', 'der'>,
1137
+        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1138
+        function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1139
+    }
1140
+
1141
+    /**
1142
+     * Calculates and returns the signature for `data` using the given private key and
1143
+     * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
1144
+     * dependent upon the key type (especially Ed25519 and Ed448).
1145
+     *
1146
+     * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
1147
+     * passed to [`crypto.createPrivateKey()`][].
1148
+     */
1149
+    function sign(
1150
+        algorithm: string | null | undefined,
1151
+        data: NodeJS.ArrayBufferView,
1152
+        key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
1153
+    ): Buffer;
1154
+
1155
+    /**
1156
+     * Calculates and returns the signature for `data` using the given private key and
1157
+     * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
1158
+     * dependent upon the key type (especially Ed25519 and Ed448).
1159
+     *
1160
+     * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
1161
+     * passed to [`crypto.createPublicKey()`][].
1162
+     */
1163
+    function verify(
1164
+        algorithm: string | null | undefined,
1165
+        data: NodeJS.ArrayBufferView,
1166
+        key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
1167
+        signature: NodeJS.ArrayBufferView,
1168
+    ): boolean;
1169
+
1170
+    /**
1171
+     * Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
1172
+     * Both keys must have the same asymmetricKeyType, which must be one of
1173
+     * 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
1174
+     */
1175
+    function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
1176
+}
... ...
@@ -0,0 +1,145 @@
1
+declare module 'node:dgram' {
2
+    export * from 'dgram';
3
+}
4
+
5
+declare module 'dgram' {
6
+    import { AddressInfo } from 'node:net';
7
+    import * as dns from 'node:dns';
8
+    import EventEmitter = require('node:events');
9
+
10
+    interface RemoteInfo {
11
+        address: string;
12
+        family: 'IPv4' | 'IPv6';
13
+        port: number;
14
+        size: number;
15
+    }
16
+
17
+    interface BindOptions {
18
+        port?: number;
19
+        address?: string;
20
+        exclusive?: boolean;
21
+        fd?: number;
22
+    }
23
+
24
+    type SocketType = "udp4" | "udp6";
25
+
26
+    interface SocketOptions {
27
+        type: SocketType;
28
+        reuseAddr?: boolean;
29
+        /**
30
+         * @default false
31
+         */
32
+        ipv6Only?: boolean;
33
+        recvBufferSize?: number;
34
+        sendBufferSize?: number;
35
+        lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
36
+    }
37
+
38
+    function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
39
+    function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
40
+
41
+    class Socket extends EventEmitter {
42
+        addMembership(multicastAddress: string, multicastInterface?: string): void;
43
+        address(): AddressInfo;
44
+        bind(port?: number, address?: string, callback?: () => void): void;
45
+        bind(port?: number, callback?: () => void): void;
46
+        bind(callback?: () => void): void;
47
+        bind(options: BindOptions, callback?: () => void): void;
48
+        close(callback?: () => void): void;
49
+        connect(port: number, address?: string, callback?: () => void): void;
50
+        connect(port: number, callback: () => void): void;
51
+        disconnect(): void;
52
+        dropMembership(multicastAddress: string, multicastInterface?: string): void;
53
+        getRecvBufferSize(): number;
54
+        getSendBufferSize(): number;
55
+        ref(): this;
56
+        remoteAddress(): AddressInfo;
57
+        send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
58
+        send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
59
+        send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
60
+        send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
61
+        send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
62
+        send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
63
+        setBroadcast(flag: boolean): void;
64
+        setMulticastInterface(multicastInterface: string): void;
65
+        setMulticastLoopback(flag: boolean): void;
66
+        setMulticastTTL(ttl: number): void;
67
+        setRecvBufferSize(size: number): void;
68
+        setSendBufferSize(size: number): void;
69
+        setTTL(ttl: number): void;
70
+        unref(): this;
71
+        /**
72
+         * Tells the kernel to join a source-specific multicast channel at the given
73
+         * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the
74
+         * `IP_ADD_SOURCE_MEMBERSHIP` socket option.
75
+         * If the `multicastInterface` argument
76
+         * is not specified, the operating system will choose one interface and will add
77
+         * membership to it.
78
+         * To add membership to every available interface, call
79
+         * `socket.addSourceSpecificMembership()` multiple times, once per interface.
80
+         */
81
+        addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
82
+
83
+        /**
84
+         * Instructs the kernel to leave a source-specific multicast channel at the given
85
+         * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
86
+         * socket option. This method is automatically called by the kernel when the
87
+         * socket is closed or the process terminates, so most apps will never have
88
+         * reason to call this.
89
+         *
90
+         * If `multicastInterface` is not specified, the operating system will attempt to
91
+         * drop membership on all valid interfaces.
92
+         */
93
+        dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
94
+
95
+        /**
96
+         * events.EventEmitter
97
+         * 1. close
98
+         * 2. connect
99
+         * 3. error
100
+         * 4. listening
101
+         * 5. message
102
+         */
103
+        addListener(event: string, listener: (...args: any[]) => void): this;
104
+        addListener(event: "close", listener: () => void): this;
105
+        addListener(event: "connect", listener: () => void): this;
106
+        addListener(event: "error", listener: (err: Error) => void): this;
107
+        addListener(event: "listening", listener: () => void): this;
108
+        addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
109
+
110
+        emit(event: string | symbol, ...args: any[]): boolean;
111
+        emit(event: "close"): boolean;
112
+        emit(event: "connect"): boolean;
113
+        emit(event: "error", err: Error): boolean;
114
+        emit(event: "listening"): boolean;
115
+        emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
116
+
117
+        on(event: string, listener: (...args: any[]) => void): this;
118
+        on(event: "close", listener: () => void): this;
119
+        on(event: "connect", listener: () => void): this;
120
+        on(event: "error", listener: (err: Error) => void): this;
121
+        on(event: "listening", listener: () => void): this;
122
+        on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
123
+
124
+        once(event: string, listener: (...args: any[]) => void): this;
125
+        once(event: "close", listener: () => void): this;
126
+        once(event: "connect", listener: () => void): this;
127
+        once(event: "error", listener: (err: Error) => void): this;
128
+        once(event: "listening", listener: () => void): this;
129
+        once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
130
+
131
+        prependListener(event: string, listener: (...args: any[]) => void): this;
132
+        prependListener(event: "close", listener: () => void): this;
133
+        prependListener(event: "connect", listener: () => void): this;
134
+        prependListener(event: "error", listener: (err: Error) => void): this;
135
+        prependListener(event: "listening", listener: () => void): this;
136
+        prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
137
+
138
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
139
+        prependOnceListener(event: "close", listener: () => void): this;
140
+        prependOnceListener(event: "connect", listener: () => void): this;
141
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
142
+        prependOnceListener(event: "listening", listener: () => void): this;
143
+        prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
144
+    }
145
+}
... ...
@@ -0,0 +1,384 @@
1
+declare module 'node:dns' {
2
+    export * from 'dns';
3
+}
4
+
5
+declare module 'dns' {
6
+    // Supported getaddrinfo flags.
7
+    const ADDRCONFIG: number;
8
+    const V4MAPPED: number;
9
+    /**
10
+     * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
11
+     * well as IPv4 mapped IPv6 addresses.
12
+     */
13
+    const ALL: number;
14
+
15
+    interface LookupOptions {
16
+        family?: number;
17
+        hints?: number;
18
+        all?: boolean;
19
+        verbatim?: boolean;
20
+    }
21
+
22
+    interface LookupOneOptions extends LookupOptions {
23
+        all?: false;
24
+    }
25
+
26
+    interface LookupAllOptions extends LookupOptions {
27
+        all: true;
28
+    }
29
+
30
+    interface LookupAddress {
31
+        address: string;
32
+        family: number;
33
+    }
34
+
35
+    function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
36
+    function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
37
+    function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
38
+    function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
39
+    function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
40
+
41
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
42
+    namespace lookup {
43
+        function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
44
+        function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
45
+        function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
46
+    }
47
+
48
+    function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
49
+
50
+    namespace lookupService {
51
+        function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
52
+    }
53
+
54
+    interface ResolveOptions {
55
+        ttl: boolean;
56
+    }
57
+
58
+    interface ResolveWithTtlOptions extends ResolveOptions {
59
+        ttl: true;
60
+    }
61
+
62
+    interface RecordWithTtl {
63
+        address: string;
64
+        ttl: number;
65
+    }
66
+
67
+    /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
68
+    type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
69
+
70
+    interface AnyARecord extends RecordWithTtl {
71
+        type: "A";
72
+    }
73
+
74
+    interface AnyAaaaRecord extends RecordWithTtl {
75
+        type: "AAAA";
76
+    }
77
+
78
+    interface MxRecord {
79
+        priority: number;
80
+        exchange: string;
81
+    }
82
+
83
+    interface AnyMxRecord extends MxRecord {
84
+        type: "MX";
85
+    }
86
+
87
+    interface NaptrRecord {
88
+        flags: string;
89
+        service: string;
90
+        regexp: string;
91
+        replacement: string;
92
+        order: number;
93
+        preference: number;
94
+    }
95
+
96
+    interface AnyNaptrRecord extends NaptrRecord {
97
+        type: "NAPTR";
98
+    }
99
+
100
+    interface SoaRecord {
101
+        nsname: string;
102
+        hostmaster: string;
103
+        serial: number;
104
+        refresh: number;
105
+        retry: number;
106
+        expire: number;
107
+        minttl: number;
108
+    }
109
+
110
+    interface AnySoaRecord extends SoaRecord {
111
+        type: "SOA";
112
+    }
113
+
114
+    interface SrvRecord {
115
+        priority: number;
116
+        weight: number;
117
+        port: number;
118
+        name: string;
119
+    }
120
+
121
+    interface AnySrvRecord extends SrvRecord {
122
+        type: "SRV";
123
+    }
124
+
125
+    interface AnyTxtRecord {
126
+        type: "TXT";
127
+        entries: string[];
128
+    }
129
+
130
+    interface AnyNsRecord {
131
+        type: "NS";
132
+        value: string;
133
+    }
134
+
135
+    interface AnyPtrRecord {
136
+        type: "PTR";
137
+        value: string;
138
+    }
139
+
140
+    interface AnyCnameRecord {
141
+        type: "CNAME";
142
+        value: string;
143
+    }
144
+
145
+    type AnyRecord = AnyARecord |
146
+        AnyAaaaRecord |
147
+        AnyCnameRecord |
148
+        AnyMxRecord |
149
+        AnyNaptrRecord |
150
+        AnyNsRecord |
151
+        AnyPtrRecord |
152
+        AnySoaRecord |
153
+        AnySrvRecord |
154
+        AnyTxtRecord;
155
+
156
+    function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
157
+    function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
158
+    function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
159
+    function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
160
+    function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
161
+    function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
162
+    function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
163
+    function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
164
+    function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
165
+    function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
166
+    function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
167
+    function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
168
+    function resolve(
169
+        hostname: string,
170
+        rrtype: string,
171
+        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
172
+    ): void;
173
+
174
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
175
+    namespace resolve {
176
+        function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
177
+        function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
178
+        function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
179
+        function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
180
+        function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
181
+        function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
182
+        function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
183
+        function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
184
+    }
185
+
186
+    function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
187
+    function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
188
+    function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
189
+
190
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
191
+    namespace resolve4 {
192
+        function __promisify__(hostname: string): Promise<string[]>;
193
+        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
194
+        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
195
+    }
196
+
197
+    function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
198
+    function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
199
+    function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
200
+
201
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
202
+    namespace resolve6 {
203
+        function __promisify__(hostname: string): Promise<string[]>;
204
+        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
205
+        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
206
+    }
207
+
208
+    function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
209
+    namespace resolveCname {
210
+        function __promisify__(hostname: string): Promise<string[]>;
211
+    }
212
+
213
+    function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
214
+    namespace resolveMx {
215
+        function __promisify__(hostname: string): Promise<MxRecord[]>;
216
+    }
217
+
218
+    function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
219
+    namespace resolveNaptr {
220
+        function __promisify__(hostname: string): Promise<NaptrRecord[]>;
221
+    }
222
+
223
+    function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
224
+    namespace resolveNs {
225
+        function __promisify__(hostname: string): Promise<string[]>;
226
+    }
227
+
228
+    function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
229
+    namespace resolvePtr {
230
+        function __promisify__(hostname: string): Promise<string[]>;
231
+    }
232
+
233
+    function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
234
+    namespace resolveSoa {
235
+        function __promisify__(hostname: string): Promise<SoaRecord>;
236
+    }
237
+
238
+    function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
239
+    namespace resolveSrv {
240
+        function __promisify__(hostname: string): Promise<SrvRecord[]>;
241
+    }
242
+
243
+    function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
244
+    namespace resolveTxt {
245
+        function __promisify__(hostname: string): Promise<string[][]>;
246
+    }
247
+
248
+    function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
249
+    namespace resolveAny {
250
+        function __promisify__(hostname: string): Promise<AnyRecord[]>;
251
+    }
252
+
253
+    function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
254
+    function setServers(servers: ReadonlyArray<string>): void;
255
+    function getServers(): string[];
256
+
257
+    // Error codes
258
+    const NODATA: string;
259
+    const FORMERR: string;
260
+    const SERVFAIL: string;
261
+    const NOTFOUND: string;
262
+    const NOTIMP: string;
263
+    const REFUSED: string;
264
+    const BADQUERY: string;
265
+    const BADNAME: string;
266
+    const BADFAMILY: string;
267
+    const BADRESP: string;
268
+    const CONNREFUSED: string;
269
+    const TIMEOUT: string;
270
+    const EOF: string;
271
+    const FILE: string;
272
+    const NOMEM: string;
273
+    const DESTRUCTION: string;
274
+    const BADSTR: string;
275
+    const BADFLAGS: string;
276
+    const NONAME: string;
277
+    const BADHINTS: string;
278
+    const NOTINITIALIZED: string;
279
+    const LOADIPHLPAPI: string;
280
+    const ADDRGETNETWORKPARAMS: string;
281
+    const CANCELLED: string;
282
+
283
+    interface ResolverOptions {
284
+        timeout?: number;
285
+    }
286
+
287
+    class Resolver {
288
+        constructor(options?: ResolverOptions);
289
+        cancel(): void;
290
+        getServers: typeof getServers;
291
+        resolve: typeof resolve;
292
+        resolve4: typeof resolve4;
293
+        resolve6: typeof resolve6;
294
+        resolveAny: typeof resolveAny;
295
+        resolveCname: typeof resolveCname;
296
+        resolveMx: typeof resolveMx;
297
+        resolveNaptr: typeof resolveNaptr;
298
+        resolveNs: typeof resolveNs;
299
+        resolvePtr: typeof resolvePtr;
300
+        resolveSoa: typeof resolveSoa;
301
+        resolveSrv: typeof resolveSrv;
302
+        resolveTxt: typeof resolveTxt;
303
+        reverse: typeof reverse;
304
+        setLocalAddress(ipv4?: string, ipv6?: string): void;
305
+        setServers: typeof setServers;
306
+    }
307
+
308
+    namespace promises {
309
+        function getServers(): string[];
310
+
311
+        function lookup(hostname: string, family: number): Promise<LookupAddress>;
312
+        function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
313
+        function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
314
+        function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
315
+        function lookup(hostname: string): Promise<LookupAddress>;
316
+
317
+        function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
318
+
319
+        function resolve(hostname: string): Promise<string[]>;
320
+        function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
321
+        function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
322
+        function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
323
+        function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
324
+        function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
325
+        function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
326
+        function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
327
+        function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
328
+        function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
329
+        function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
330
+        function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
331
+        function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
332
+
333
+        function resolve4(hostname: string): Promise<string[]>;
334
+        function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
335
+        function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
336
+
337
+        function resolve6(hostname: string): Promise<string[]>;
338
+        function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
339
+        function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
340
+
341
+        function resolveAny(hostname: string): Promise<AnyRecord[]>;
342
+
343
+        function resolveCname(hostname: string): Promise<string[]>;
344
+
345
+        function resolveMx(hostname: string): Promise<MxRecord[]>;
346
+
347
+        function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
348
+
349
+        function resolveNs(hostname: string): Promise<string[]>;
350
+
351
+        function resolvePtr(hostname: string): Promise<string[]>;
352
+
353
+        function resolveSoa(hostname: string): Promise<SoaRecord>;
354
+
355
+        function resolveSrv(hostname: string): Promise<SrvRecord[]>;
356
+
357
+        function resolveTxt(hostname: string): Promise<string[][]>;
358
+
359
+        function reverse(ip: string): Promise<string[]>;
360
+
361
+        function setServers(servers: ReadonlyArray<string>): void;
362
+
363
+        class Resolver {
364
+            constructor(options?: ResolverOptions);
365
+            cancel(): void;
366
+            getServers: typeof getServers;
367
+            resolve: typeof resolve;
368
+            resolve4: typeof resolve4;
369
+            resolve6: typeof resolve6;
370
+            resolveAny: typeof resolveAny;
371
+            resolveCname: typeof resolveCname;
372
+            resolveMx: typeof resolveMx;
373
+            resolveNaptr: typeof resolveNaptr;
374
+            resolveNs: typeof resolveNs;
375
+            resolvePtr: typeof resolvePtr;
376
+            resolveSoa: typeof resolveSoa;
377
+            resolveSrv: typeof resolveSrv;
378
+            resolveTxt: typeof resolveTxt;
379
+            reverse: typeof reverse;
380
+            setLocalAddress(ipv4?: string, ipv6?: string): void;
381
+            setServers: typeof setServers;
382
+        }
383
+    }
384
+}
... ...
@@ -0,0 +1,28 @@
1
+declare module 'node:domain' {
2
+    export * from 'domain';
3
+}
4
+
5
+declare module 'domain' {
6
+    import EventEmitter = require('node:events');
7
+
8
+    global {
9
+        namespace NodeJS {
10
+            interface Domain extends EventEmitter {
11
+                run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
12
+                add(emitter: EventEmitter | Timer): void;
13
+                remove(emitter: EventEmitter | Timer): void;
14
+                bind<T extends Function>(cb: T): T;
15
+                intercept<T extends Function>(cb: T): T;
16
+            }
17
+        }
18
+    }
19
+
20
+    interface Domain extends NodeJS.Domain {}
21
+    class Domain extends EventEmitter {
22
+        members: Array<EventEmitter | NodeJS.Timer>;
23
+        enter(): void;
24
+        exit(): void;
25
+    }
26
+
27
+    function create(): Domain;
28
+}
... ...
@@ -0,0 +1,83 @@
1
+declare module 'node:events' {
2
+    import EventEmitter = require('events');
3
+    export = EventEmitter;
4
+}
5
+
6
+declare module 'events' {
7
+    interface EventEmitterOptions {
8
+        /**
9
+         * Enables automatic capturing of promise rejection.
10
+         */
11
+        captureRejections?: boolean;
12
+    }
13
+
14
+    interface NodeEventTarget {
15
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
16
+    }
17
+
18
+    interface DOMEventTarget {
19
+        addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
20
+    }
21
+
22
+    interface EventEmitter extends NodeJS.EventEmitter {}
23
+    class EventEmitter {
24
+        constructor(options?: EventEmitterOptions);
25
+
26
+        static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
27
+        static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
28
+        static on(emitter: NodeJS.EventEmitter, event: string): AsyncIterableIterator<any>;
29
+
30
+        /** @deprecated since v4.0.0 */
31
+        static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
32
+
33
+        /**
34
+         * This symbol shall be used to install a listener for only monitoring `'error'`
35
+         * events. Listeners installed using this symbol are called before the regular
36
+         * `'error'` listeners are called.
37
+         *
38
+         * Installing a listener using this symbol does not change the behavior once an
39
+         * `'error'` event is emitted, therefore the process will still crash if no
40
+         * regular `'error'` listener is installed.
41
+         */
42
+        static readonly errorMonitor: unique symbol;
43
+        static readonly captureRejectionSymbol: unique symbol;
44
+
45
+        /**
46
+         * Sets or gets the default captureRejection value for all emitters.
47
+         */
48
+        // TODO: These should be described using static getter/setter pairs:
49
+        static captureRejections: boolean;
50
+        static defaultMaxListeners: number;
51
+    }
52
+
53
+    import internal = require('events');
54
+    namespace EventEmitter {
55
+        // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
56
+        export { internal as EventEmitter };
57
+    }
58
+
59
+    global {
60
+        namespace NodeJS {
61
+            interface EventEmitter {
62
+                addListener(event: string | symbol, listener: (...args: any[]) => void): this;
63
+                on(event: string | symbol, listener: (...args: any[]) => void): this;
64
+                once(event: string | symbol, listener: (...args: any[]) => void): this;
65
+                removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
66
+                off(event: string | symbol, listener: (...args: any[]) => void): this;
67
+                removeAllListeners(event?: string | symbol): this;
68
+                setMaxListeners(n: number): this;
69
+                getMaxListeners(): number;
70
+                listeners(event: string | symbol): Function[];
71
+                rawListeners(event: string | symbol): Function[];
72
+                emit(event: string | symbol, ...args: any[]): boolean;
73
+                listenerCount(event: string | symbol): number;
74
+                // Added in Node 6...
75
+                prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
76
+                prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
77
+                eventNames(): Array<string | symbol>;
78
+            }
79
+        }
80
+    }
81
+
82
+    export = EventEmitter;
83
+}
... ...
@@ -0,0 +1,2262 @@
1
+declare module 'node:fs' {
2
+    export * from 'fs';
3
+}
4
+
5
+declare module 'fs' {
6
+    import * as stream from 'node:stream';
7
+    import EventEmitter = require('node:events');
8
+    import { URL } from 'node:url';
9
+    import * as promises from 'node:fs/promises';
10
+
11
+    export { promises };
12
+    /**
13
+     * Valid types for path values in "fs".
14
+     */
15
+    export type PathLike = string | Buffer | URL;
16
+
17
+    export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
18
+
19
+    export type BufferEncodingOption = 'buffer' | { encoding: 'buffer' };
20
+
21
+    export interface BaseEncodingOptions {
22
+        encoding?: BufferEncoding | null;
23
+    }
24
+
25
+    export type OpenMode = number | string;
26
+
27
+    export type Mode = number | string;
28
+
29
+    export interface StatsBase<T> {
30
+        isFile(): boolean;
31
+        isDirectory(): boolean;
32
+        isBlockDevice(): boolean;
33
+        isCharacterDevice(): boolean;
34
+        isSymbolicLink(): boolean;
35
+        isFIFO(): boolean;
36
+        isSocket(): boolean;
37
+
38
+        dev: T;
39
+        ino: T;
40
+        mode: T;
41
+        nlink: T;
42
+        uid: T;
43
+        gid: T;
44
+        rdev: T;
45
+        size: T;
46
+        blksize: T;
47
+        blocks: T;
48
+        atimeMs: T;
49
+        mtimeMs: T;
50
+        ctimeMs: T;
51
+        birthtimeMs: T;
52
+        atime: Date;
53
+        mtime: Date;
54
+        ctime: Date;
55
+        birthtime: Date;
56
+    }
57
+
58
+    export interface Stats extends StatsBase<number> {
59
+    }
60
+
61
+    export class Stats {
62
+    }
63
+
64
+    export class Dirent {
65
+        isFile(): boolean;
66
+        isDirectory(): boolean;
67
+        isBlockDevice(): boolean;
68
+        isCharacterDevice(): boolean;
69
+        isSymbolicLink(): boolean;
70
+        isFIFO(): boolean;
71
+        isSocket(): boolean;
72
+        name: string;
73
+    }
74
+
75
+    /**
76
+     * A class representing a directory stream.
77
+     */
78
+    export class Dir {
79
+        readonly path: string;
80
+
81
+        /**
82
+         * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
83
+         */
84
+        [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
85
+
86
+        /**
87
+         * Asynchronously close the directory's underlying resource handle.
88
+         * Subsequent reads will result in errors.
89
+         */
90
+        close(): Promise<void>;
91
+        close(cb: NoParamCallback): void;
92
+
93
+        /**
94
+         * Synchronously close the directory's underlying resource handle.
95
+         * Subsequent reads will result in errors.
96
+         */
97
+        closeSync(): void;
98
+
99
+        /**
100
+         * Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`.
101
+         * After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read.
102
+         * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
103
+         */
104
+        read(): Promise<Dirent | null>;
105
+        read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
106
+
107
+        /**
108
+         * Synchronously read the next directory entry via `readdir(3)` as a `Dirent`.
109
+         * If there are no more directory entries to read, null will be returned.
110
+         * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
111
+         */
112
+        readSync(): Dirent | null;
113
+    }
114
+
115
+    export interface FSWatcher extends EventEmitter {
116
+        close(): void;
117
+
118
+        /**
119
+         * events.EventEmitter
120
+         *   1. change
121
+         *   2. error
122
+         */
123
+        addListener(event: string, listener: (...args: any[]) => void): this;
124
+        addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
125
+        addListener(event: "error", listener: (error: Error) => void): this;
126
+        addListener(event: "close", listener: () => void): this;
127
+
128
+        on(event: string, listener: (...args: any[]) => void): this;
129
+        on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
130
+        on(event: "error", listener: (error: Error) => void): this;
131
+        on(event: "close", listener: () => void): this;
132
+
133
+        once(event: string, listener: (...args: any[]) => void): this;
134
+        once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
135
+        once(event: "error", listener: (error: Error) => void): this;
136
+        once(event: "close", listener: () => void): this;
137
+
138
+        prependListener(event: string, listener: (...args: any[]) => void): this;
139
+        prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
140
+        prependListener(event: "error", listener: (error: Error) => void): this;
141
+        prependListener(event: "close", listener: () => void): this;
142
+
143
+        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
144
+        prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
145
+        prependOnceListener(event: "error", listener: (error: Error) => void): this;
146
+        prependOnceListener(event: "close", listener: () => void): this;
147
+    }
148
+
149
+    export class ReadStream extends stream.Readable {
150
+        close(): void;
151
+        bytesRead: number;
152
+        path: string | Buffer;
153
+        pending: boolean;
154
+
155
+        /**
156
+         * events.EventEmitter
157
+         *   1. open
158
+         *   2. close
159
+         *   3. ready
160
+         */
161
+        addListener(event: "close", listener: () => void): this;
162
+        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
163
+        addListener(event: "end", listener: () => void): this;
164
+        addListener(event: "error", listener: (err: Error) => void): this;
165
+        addListener(event: "open", listener: (fd: number) => void): this;
166
+        addListener(event: "pause", listener: () => void): this;
167
+        addListener(event: "readable", listener: () => void): this;
168
+        addListener(event: "ready", listener: () => void): this;
169
+        addListener(event: "resume", listener: () => void): this;
170
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
171
+
172
+        on(event: "close", listener: () => void): this;
173
+        on(event: "data", listener: (chunk: Buffer | string) => void): this;
174
+        on(event: "end", listener: () => void): this;
175
+        on(event: "error", listener: (err: Error) => void): this;
176
+        on(event: "open", listener: (fd: number) => void): this;
177
+        on(event: "pause", listener: () => void): this;
178
+        on(event: "readable", listener: () => void): this;
179
+        on(event: "ready", listener: () => void): this;
180
+        on(event: "resume", listener: () => void): this;
181
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
182
+
183
+        once(event: "close", listener: () => void): this;
184
+        once(event: "data", listener: (chunk: Buffer | string) => void): this;
185
+        once(event: "end", listener: () => void): this;
186
+        once(event: "error", listener: (err: Error) => void): this;
187
+        once(event: "open", listener: (fd: number) => void): this;
188
+        once(event: "pause", listener: () => void): this;
189
+        once(event: "readable", listener: () => void): this;
190
+        once(event: "ready", listener: () => void): this;
191
+        once(event: "resume", listener: () => void): this;
192
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
193
+
194
+        prependListener(event: "close", listener: () => void): this;
195
+        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
196
+        prependListener(event: "end", listener: () => void): this;
197
+        prependListener(event: "error", listener: (err: Error) => void): this;
198
+        prependListener(event: "open", listener: (fd: number) => void): this;
199
+        prependListener(event: "pause", listener: () => void): this;
200
+        prependListener(event: "readable", listener: () => void): this;
201
+        prependListener(event: "ready", listener: () => void): this;
202
+        prependListener(event: "resume", listener: () => void): this;
203
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
204
+
205
+        prependOnceListener(event: "close", listener: () => void): this;
206
+        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
207
+        prependOnceListener(event: "end", listener: () => void): this;
208
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
209
+        prependOnceListener(event: "open", listener: (fd: number) => void): this;
210
+        prependOnceListener(event: "pause", listener: () => void): this;
211
+        prependOnceListener(event: "readable", listener: () => void): this;
212
+        prependOnceListener(event: "ready", listener: () => void): this;
213
+        prependOnceListener(event: "resume", listener: () => void): this;
214
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
215
+    }
216
+
217
+    export class WriteStream extends stream.Writable {
218
+        close(): void;
219
+        bytesWritten: number;
220
+        path: string | Buffer;
221
+        pending: boolean;
222
+
223
+        /**
224
+         * events.EventEmitter
225
+         *   1. open
226
+         *   2. close
227
+         *   3. ready
228
+         */
229
+        addListener(event: "close", listener: () => void): this;
230
+        addListener(event: "drain", listener: () => void): this;
231
+        addListener(event: "error", listener: (err: Error) => void): this;
232
+        addListener(event: "finish", listener: () => void): this;
233
+        addListener(event: "open", listener: (fd: number) => void): this;
234
+        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
235
+        addListener(event: "ready", listener: () => void): this;
236
+        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
237
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
238
+
239
+        on(event: "close", listener: () => void): this;
240
+        on(event: "drain", listener: () => void): this;
241
+        on(event: "error", listener: (err: Error) => void): this;
242
+        on(event: "finish", listener: () => void): this;
243
+        on(event: "open", listener: (fd: number) => void): this;
244
+        on(event: "pipe", listener: (src: stream.Readable) => void): this;
245
+        on(event: "ready", listener: () => void): this;
246
+        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
247
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
248
+
249
+        once(event: "close", listener: () => void): this;
250
+        once(event: "drain", listener: () => void): this;
251
+        once(event: "error", listener: (err: Error) => void): this;
252
+        once(event: "finish", listener: () => void): this;
253
+        once(event: "open", listener: (fd: number) => void): this;
254
+        once(event: "pipe", listener: (src: stream.Readable) => void): this;
255
+        once(event: "ready", listener: () => void): this;
256
+        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
257
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
258
+
259
+        prependListener(event: "close", listener: () => void): this;
260
+        prependListener(event: "drain", listener: () => void): this;
261
+        prependListener(event: "error", listener: (err: Error) => void): this;
262
+        prependListener(event: "finish", listener: () => void): this;
263
+        prependListener(event: "open", listener: (fd: number) => void): this;
264
+        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
265
+        prependListener(event: "ready", listener: () => void): this;
266
+        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
267
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
268
+
269
+        prependOnceListener(event: "close", listener: () => void): this;
270
+        prependOnceListener(event: "drain", listener: () => void): this;
271
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
272
+        prependOnceListener(event: "finish", listener: () => void): this;
273
+        prependOnceListener(event: "open", listener: (fd: number) => void): this;
274
+        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
275
+        prependOnceListener(event: "ready", listener: () => void): this;
276
+        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
277
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
278
+    }
279
+
280
+    /**
281
+     * Asynchronous rename(2) - Change the name or location of a file or directory.
282
+     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
283
+     * URL support is _experimental_.
284
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
285
+     * URL support is _experimental_.
286
+     */
287
+    export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
288
+
289
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
290
+    export namespace rename {
291
+        /**
292
+         * Asynchronous rename(2) - Change the name or location of a file or directory.
293
+         * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
294
+         * URL support is _experimental_.
295
+         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
296
+         * URL support is _experimental_.
297
+         */
298
+        function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
299
+    }
300
+
301
+    /**
302
+     * Synchronous rename(2) - Change the name or location of a file or directory.
303
+     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
304
+     * URL support is _experimental_.
305
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
306
+     * URL support is _experimental_.
307
+     */
308
+    export function renameSync(oldPath: PathLike, newPath: PathLike): void;
309
+
310
+    /**
311
+     * Asynchronous truncate(2) - Truncate a file to a specified length.
312
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
313
+     * @param len If not specified, defaults to `0`.
314
+     */
315
+    export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
316
+
317
+    /**
318
+     * Asynchronous truncate(2) - Truncate a file to a specified length.
319
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
320
+     * URL support is _experimental_.
321
+     */
322
+    export function truncate(path: PathLike, callback: NoParamCallback): void;
323
+
324
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
325
+    export namespace truncate {
326
+        /**
327
+         * Asynchronous truncate(2) - Truncate a file to a specified length.
328
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
329
+         * @param len If not specified, defaults to `0`.
330
+         */
331
+        function __promisify__(path: PathLike, len?: number | null): Promise<void>;
332
+    }
333
+
334
+    /**
335
+     * Synchronous truncate(2) - Truncate a file to a specified length.
336
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
337
+     * @param len If not specified, defaults to `0`.
338
+     */
339
+    export function truncateSync(path: PathLike, len?: number | null): void;
340
+
341
+    /**
342
+     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
343
+     * @param fd A file descriptor.
344
+     * @param len If not specified, defaults to `0`.
345
+     */
346
+    export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
347
+
348
+    /**
349
+     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
350
+     * @param fd A file descriptor.
351
+     */
352
+    export function ftruncate(fd: number, callback: NoParamCallback): void;
353
+
354
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
355
+    export namespace ftruncate {
356
+        /**
357
+         * Asynchronous ftruncate(2) - Truncate a file to a specified length.
358
+         * @param fd A file descriptor.
359
+         * @param len If not specified, defaults to `0`.
360
+         */
361
+        function __promisify__(fd: number, len?: number | null): Promise<void>;
362
+    }
363
+
364
+    /**
365
+     * Synchronous ftruncate(2) - Truncate a file to a specified length.
366
+     * @param fd A file descriptor.
367
+     * @param len If not specified, defaults to `0`.
368
+     */
369
+    export function ftruncateSync(fd: number, len?: number | null): void;
370
+
371
+    /**
372
+     * Asynchronous chown(2) - Change ownership of a file.
373
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
374
+     */
375
+    export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
376
+
377
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
378
+    export namespace chown {
379
+        /**
380
+         * Asynchronous chown(2) - Change ownership of a file.
381
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
382
+         */
383
+        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
384
+    }
385
+
386
+    /**
387
+     * Synchronous chown(2) - Change ownership of a file.
388
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
389
+     */
390
+    export function chownSync(path: PathLike, uid: number, gid: number): void;
391
+
392
+    /**
393
+     * Asynchronous fchown(2) - Change ownership of a file.
394
+     * @param fd A file descriptor.
395
+     */
396
+    export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
397
+
398
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
399
+    export namespace fchown {
400
+        /**
401
+         * Asynchronous fchown(2) - Change ownership of a file.
402
+         * @param fd A file descriptor.
403
+         */
404
+        function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
405
+    }
406
+
407
+    /**
408
+     * Synchronous fchown(2) - Change ownership of a file.
409
+     * @param fd A file descriptor.
410
+     */
411
+    export function fchownSync(fd: number, uid: number, gid: number): void;
412
+
413
+    /**
414
+     * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
415
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
416
+     */
417
+    export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
418
+
419
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
420
+    export namespace lchown {
421
+        /**
422
+         * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
423
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
424
+         */
425
+        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
426
+    }
427
+
428
+    /**
429
+     * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
430
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
431
+     */
432
+    export function lchownSync(path: PathLike, uid: number, gid: number): void;
433
+
434
+    /**
435
+     * Changes the access and modification times of a file in the same way as `fs.utimes()`,
436
+     * with the difference that if the path refers to a symbolic link, then the link is not
437
+     * dereferenced: instead, the timestamps of the symbolic link itself are changed.
438
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
439
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
440
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
441
+     */
442
+    export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
443
+
444
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
445
+    export namespace lutimes {
446
+        /**
447
+         * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
448
+         * with the difference that if the path refers to a symbolic link, then the link is not
449
+         * dereferenced: instead, the timestamps of the symbolic link itself are changed.
450
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
451
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
452
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
453
+         */
454
+        function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
455
+    }
456
+
457
+    /**
458
+     * Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
459
+     * or throws an exception when parameters are incorrect or the operation fails.
460
+     * This is the synchronous version of `fs.lutimes()`.
461
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
462
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
463
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
464
+     */
465
+    export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
466
+
467
+    /**
468
+     * Asynchronous chmod(2) - Change permissions of a file.
469
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
470
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
471
+     */
472
+    export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
473
+
474
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
475
+    export namespace chmod {
476
+        /**
477
+         * Asynchronous chmod(2) - Change permissions of a file.
478
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
479
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
480
+         */
481
+        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
482
+    }
483
+
484
+    /**
485
+     * Synchronous chmod(2) - Change permissions of a file.
486
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
487
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
488
+     */
489
+    export function chmodSync(path: PathLike, mode: Mode): void;
490
+
491
+    /**
492
+     * Asynchronous fchmod(2) - Change permissions of a file.
493
+     * @param fd A file descriptor.
494
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
495
+     */
496
+    export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
497
+
498
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
499
+    export namespace fchmod {
500
+        /**
501
+         * Asynchronous fchmod(2) - Change permissions of a file.
502
+         * @param fd A file descriptor.
503
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
504
+         */
505
+        function __promisify__(fd: number, mode: Mode): Promise<void>;
506
+    }
507
+
508
+    /**
509
+     * Synchronous fchmod(2) - Change permissions of a file.
510
+     * @param fd A file descriptor.
511
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
512
+     */
513
+    export function fchmodSync(fd: number, mode: Mode): void;
514
+
515
+    /**
516
+     * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
517
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
518
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
519
+     */
520
+    export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
521
+
522
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
523
+    export namespace lchmod {
524
+        /**
525
+         * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
526
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
527
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
528
+         */
529
+        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
530
+    }
531
+
532
+    /**
533
+     * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
534
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
535
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
536
+     */
537
+    export function lchmodSync(path: PathLike, mode: Mode): void;
538
+
539
+    /**
540
+     * Asynchronous stat(2) - Get file status.
541
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
542
+     */
543
+    export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
544
+    export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
545
+    export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
546
+    export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
547
+
548
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
549
+    export namespace stat {
550
+        /**
551
+         * Asynchronous stat(2) - Get file status.
552
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
553
+         */
554
+        function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
555
+        function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
556
+        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
557
+    }
558
+
559
+    /**
560
+     * Synchronous stat(2) - Get file status.
561
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
562
+     */
563
+    export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
564
+    export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
565
+    export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
566
+
567
+    /**
568
+     * Asynchronous fstat(2) - Get file status.
569
+     * @param fd A file descriptor.
570
+     */
571
+    export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
572
+    export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
573
+    export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
574
+    export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
575
+
576
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
577
+    export namespace fstat {
578
+        /**
579
+         * Asynchronous fstat(2) - Get file status.
580
+         * @param fd A file descriptor.
581
+         */
582
+        function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise<Stats>;
583
+        function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
584
+        function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
585
+    }
586
+
587
+    /**
588
+     * Synchronous fstat(2) - Get file status.
589
+     * @param fd A file descriptor.
590
+     */
591
+    export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats;
592
+    export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats;
593
+    export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
594
+
595
+    /**
596
+     * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
597
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
598
+     */
599
+    export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
600
+    export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
601
+    export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
602
+    export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
603
+
604
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
605
+    export namespace lstat {
606
+        /**
607
+         * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
608
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
609
+         */
610
+        function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
611
+        function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
612
+        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
613
+    }
614
+
615
+    /**
616
+     * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
617
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
618
+     */
619
+    export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
620
+    export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
621
+    export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
622
+
623
+    /**
624
+     * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
625
+     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
626
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
627
+     */
628
+    export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
629
+
630
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
631
+    export namespace link {
632
+        /**
633
+         * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
634
+         * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
635
+         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
636
+         */
637
+        function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
638
+    }
639
+
640
+    /**
641
+     * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.
642
+     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
643
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
644
+     */
645
+    export function linkSync(existingPath: PathLike, newPath: PathLike): void;
646
+
647
+    /**
648
+     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
649
+     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
650
+     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
651
+     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
652
+     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
653
+     */
654
+    export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
655
+
656
+    /**
657
+     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
658
+     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
659
+     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
660
+     */
661
+    export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
662
+
663
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
664
+    export namespace symlink {
665
+        /**
666
+         * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
667
+         * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
668
+         * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
669
+         * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
670
+         * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
671
+         */
672
+        function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
673
+
674
+        type Type = "dir" | "file" | "junction";
675
+    }
676
+
677
+    /**
678
+     * Synchronous symlink(2) - Create a new symbolic link to an existing file.
679
+     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
680
+     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
681
+     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
682
+     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
683
+     */
684
+    export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
685
+
686
+    /**
687
+     * Asynchronous readlink(2) - read value of a symbolic link.
688
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
689
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
690
+     */
691
+    export function readlink(
692
+        path: PathLike,
693
+        options: BaseEncodingOptions | BufferEncoding | undefined | null,
694
+        callback: (err: NodeJS.ErrnoException | null, linkString: string) => void
695
+    ): void;
696
+
697
+    /**
698
+     * Asynchronous readlink(2) - read value of a symbolic link.
699
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
700
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
701
+     */
702
+    export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
703
+
704
+    /**
705
+     * Asynchronous readlink(2) - read value of a symbolic link.
706
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
707
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
708
+     */
709
+    export function readlink(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
710
+
711
+    /**
712
+     * Asynchronous readlink(2) - read value of a symbolic link.
713
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
714
+     */
715
+    export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
716
+
717
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
718
+    export namespace readlink {
719
+        /**
720
+         * Asynchronous readlink(2) - read value of a symbolic link.
721
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
722
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
723
+         */
724
+        function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
725
+
726
+        /**
727
+         * Asynchronous readlink(2) - read value of a symbolic link.
728
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
729
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
730
+         */
731
+        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
732
+
733
+        /**
734
+         * Asynchronous readlink(2) - read value of a symbolic link.
735
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
736
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
737
+         */
738
+        function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
739
+    }
740
+
741
+    /**
742
+     * Synchronous readlink(2) - read value of a symbolic link.
743
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
744
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
745
+     */
746
+    export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
747
+
748
+    /**
749
+     * Synchronous readlink(2) - read value of a symbolic link.
750
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
751
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
752
+     */
753
+    export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
754
+
755
+    /**
756
+     * Synchronous readlink(2) - read value of a symbolic link.
757
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
758
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
759
+     */
760
+    export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
761
+
762
+    /**
763
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
764
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
765
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
766
+     */
767
+    export function realpath(
768
+        path: PathLike,
769
+        options: BaseEncodingOptions | BufferEncoding | undefined | null,
770
+        callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
771
+    ): void;
772
+
773
+    /**
774
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
775
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
776
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
777
+     */
778
+    export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
779
+
780
+    /**
781
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
782
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
783
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
784
+     */
785
+    export function realpath(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
786
+
787
+    /**
788
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
789
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
790
+     */
791
+    export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
792
+
793
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
794
+    export namespace realpath {
795
+        /**
796
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
797
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
798
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
799
+         */
800
+        function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
801
+
802
+        /**
803
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
804
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
805
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
806
+         */
807
+        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
808
+
809
+        /**
810
+         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
811
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
812
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
813
+         */
814
+        function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
815
+
816
+        function native(
817
+            path: PathLike,
818
+            options: BaseEncodingOptions | BufferEncoding | undefined | null,
819
+            callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
820
+        ): void;
821
+        function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
822
+        function native(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
823
+        function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
824
+    }
825
+
826
+    /**
827
+     * Synchronous realpath(3) - return the canonicalized absolute pathname.
828
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
829
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
830
+     */
831
+    export function realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
832
+
833
+    /**
834
+     * Synchronous realpath(3) - return the canonicalized absolute pathname.
835
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
836
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
837
+     */
838
+    export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
839
+
840
+    /**
841
+     * Synchronous realpath(3) - return the canonicalized absolute pathname.
842
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
843
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
844
+     */
845
+    export function realpathSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
846
+
847
+    export namespace realpathSync {
848
+        function native(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
849
+        function native(path: PathLike, options: BufferEncodingOption): Buffer;
850
+        function native(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
851
+    }
852
+
853
+    /**
854
+     * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
855
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
856
+     */
857
+    export function unlink(path: PathLike, callback: NoParamCallback): void;
858
+
859
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
860
+    export namespace unlink {
861
+        /**
862
+         * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
863
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
864
+         */
865
+        function __promisify__(path: PathLike): Promise<void>;
866
+    }
867
+
868
+    /**
869
+     * Synchronous unlink(2) - delete a name and possibly the file it refers to.
870
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
871
+     */
872
+    export function unlinkSync(path: PathLike): void;
873
+
874
+    export interface RmDirOptions {
875
+        /**
876
+         * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
877
+         * `EPERM` error is encountered, Node.js will retry the operation with a linear
878
+         * backoff wait of `retryDelay` ms longer on each try. This option represents the
879
+         * number of retries. This option is ignored if the `recursive` option is not
880
+         * `true`.
881
+         * @default 0
882
+         */
883
+        maxRetries?: number;
884
+        /**
885
+         * @deprecated since v14.14.0 In future versions of Node.js,
886
+         * `fs.rmdir(path, { recursive: true })` will throw on nonexistent
887
+         * paths, or when given a file as a target.
888
+         * Use `fs.rm(path, { recursive: true, force: true })` instead.
889
+         *
890
+         * If `true`, perform a recursive directory removal. In
891
+         * recursive mode, errors are not reported if `path` does not exist, and
892
+         * operations are retried on failure.
893
+         * @default false
894
+         */
895
+        recursive?: boolean;
896
+        /**
897
+         * The amount of time in milliseconds to wait between retries.
898
+         * This option is ignored if the `recursive` option is not `true`.
899
+         * @default 100
900
+         */
901
+        retryDelay?: number;
902
+    }
903
+
904
+    /**
905
+     * Asynchronous rmdir(2) - delete a directory.
906
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
907
+     */
908
+    export function rmdir(path: PathLike, callback: NoParamCallback): void;
909
+    export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
910
+
911
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
912
+    export namespace rmdir {
913
+        /**
914
+         * Asynchronous rmdir(2) - delete a directory.
915
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
916
+         */
917
+        function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
918
+    }
919
+
920
+    /**
921
+     * Synchronous rmdir(2) - delete a directory.
922
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
923
+     */
924
+    export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
925
+
926
+    export interface RmOptions {
927
+        /**
928
+         * When `true`, exceptions will be ignored if `path` does not exist.
929
+         * @default false
930
+         */
931
+        force?: boolean;
932
+        /**
933
+         * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
934
+         * `EPERM` error is encountered, Node.js will retry the operation with a linear
935
+         * backoff wait of `retryDelay` ms longer on each try. This option represents the
936
+         * number of retries. This option is ignored if the `recursive` option is not
937
+         * `true`.
938
+         * @default 0
939
+         */
940
+        maxRetries?: number;
941
+        /**
942
+         * If `true`, perform a recursive directory removal. In
943
+         * recursive mode, errors are not reported if `path` does not exist, and
944
+         * operations are retried on failure.
945
+         * @default false
946
+         */
947
+        recursive?: boolean;
948
+        /**
949
+         * The amount of time in milliseconds to wait between retries.
950
+         * This option is ignored if the `recursive` option is not `true`.
951
+         * @default 100
952
+         */
953
+        retryDelay?: number;
954
+    }
955
+
956
+    /**
957
+     * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
958
+     */
959
+    export function rm(path: PathLike, callback: NoParamCallback): void;
960
+    export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
961
+
962
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
963
+    export namespace rm {
964
+        /**
965
+         * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
966
+         */
967
+        function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
968
+    }
969
+
970
+    /**
971
+     * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility).
972
+     */
973
+    export function rmSync(path: PathLike, options?: RmOptions): void;
974
+
975
+    export interface MakeDirectoryOptions {
976
+        /**
977
+         * Indicates whether parent folders should be created.
978
+         * If a folder was created, the path to the first created folder will be returned.
979
+         * @default false
980
+         */
981
+        recursive?: boolean;
982
+        /**
983
+         * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
984
+         * @default 0o777
985
+         */
986
+        mode?: Mode;
987
+    }
988
+
989
+    /**
990
+     * Asynchronous mkdir(2) - create a directory.
991
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
992
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
993
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
994
+     */
995
+    export function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
996
+
997
+    /**
998
+     * Asynchronous mkdir(2) - create a directory.
999
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1000
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1001
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1002
+     */
1003
+    export function mkdir(path: PathLike, options: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null | undefined, callback: NoParamCallback): void;
1004
+
1005
+    /**
1006
+     * Asynchronous mkdir(2) - create a directory.
1007
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1008
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1009
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1010
+     */
1011
+    export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
1012
+
1013
+    /**
1014
+     * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
1015
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1016
+     */
1017
+    export function mkdir(path: PathLike, callback: NoParamCallback): void;
1018
+
1019
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1020
+    export namespace mkdir {
1021
+        /**
1022
+         * Asynchronous mkdir(2) - create a directory.
1023
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1024
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1025
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1026
+         */
1027
+        function __promisify__(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
1028
+
1029
+        /**
1030
+         * Asynchronous mkdir(2) - create a directory.
1031
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1032
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1033
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1034
+         */
1035
+        function __promisify__(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
1036
+
1037
+        /**
1038
+         * Asynchronous mkdir(2) - create a directory.
1039
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1040
+         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1041
+         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1042
+         */
1043
+        function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
1044
+    }
1045
+
1046
+    /**
1047
+     * Synchronous mkdir(2) - create a directory.
1048
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1049
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1050
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1051
+     */
1052
+    export function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string | undefined;
1053
+
1054
+    /**
1055
+     * Synchronous mkdir(2) - create a directory.
1056
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1057
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1058
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1059
+     */
1060
+    export function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): void;
1061
+
1062
+    /**
1063
+     * Synchronous mkdir(2) - create a directory.
1064
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1065
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1066
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1067
+     */
1068
+    export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
1069
+
1070
+    /**
1071
+     * Asynchronously creates a unique temporary directory.
1072
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1073
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1074
+     */
1075
+    export function mkdtemp(prefix: string, options: BaseEncodingOptions | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
1076
+
1077
+    /**
1078
+     * Asynchronously creates a unique temporary directory.
1079
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1080
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1081
+     */
1082
+    export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
1083
+
1084
+    /**
1085
+     * Asynchronously creates a unique temporary directory.
1086
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1087
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1088
+     */
1089
+    export function mkdtemp(prefix: string, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
1090
+
1091
+    /**
1092
+     * Asynchronously creates a unique temporary directory.
1093
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1094
+     */
1095
+    export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
1096
+
1097
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1098
+    export namespace mkdtemp {
1099
+        /**
1100
+         * Asynchronously creates a unique temporary directory.
1101
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1102
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1103
+         */
1104
+        function __promisify__(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
1105
+
1106
+        /**
1107
+         * Asynchronously creates a unique temporary directory.
1108
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1109
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1110
+         */
1111
+        function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
1112
+
1113
+        /**
1114
+         * Asynchronously creates a unique temporary directory.
1115
+         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1116
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1117
+         */
1118
+        function __promisify__(prefix: string, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
1119
+    }
1120
+
1121
+    /**
1122
+     * Synchronously creates a unique temporary directory.
1123
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1124
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1125
+     */
1126
+    export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): string;
1127
+
1128
+    /**
1129
+     * Synchronously creates a unique temporary directory.
1130
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1131
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1132
+     */
1133
+    export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
1134
+
1135
+    /**
1136
+     * Synchronously creates a unique temporary directory.
1137
+     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1138
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1139
+     */
1140
+    export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | string | null): string | Buffer;
1141
+
1142
+    /**
1143
+     * Asynchronous readdir(3) - read a directory.
1144
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1145
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1146
+     */
1147
+    export function readdir(
1148
+        path: PathLike,
1149
+        options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null,
1150
+        callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
1151
+    ): void;
1152
+
1153
+    /**
1154
+     * Asynchronous readdir(3) - read a directory.
1155
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1156
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1157
+     */
1158
+    export function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
1159
+
1160
+    /**
1161
+     * Asynchronous readdir(3) - read a directory.
1162
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1163
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1164
+     */
1165
+    export function readdir(
1166
+        path: PathLike,
1167
+        options: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | undefined | null,
1168
+        callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void,
1169
+    ): void;
1170
+
1171
+    /**
1172
+     * Asynchronous readdir(3) - read a directory.
1173
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1174
+     */
1175
+    export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
1176
+
1177
+    /**
1178
+     * Asynchronous readdir(3) - read a directory.
1179
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1180
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
1181
+     */
1182
+    export function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
1183
+
1184
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1185
+    export namespace readdir {
1186
+        /**
1187
+         * Asynchronous readdir(3) - read a directory.
1188
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1189
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1190
+         */
1191
+        function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
1192
+
1193
+        /**
1194
+         * Asynchronous readdir(3) - read a directory.
1195
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1196
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1197
+         */
1198
+        function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise<Buffer[]>;
1199
+
1200
+        /**
1201
+         * Asynchronous readdir(3) - read a directory.
1202
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1203
+         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1204
+         */
1205
+        function __promisify__(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
1206
+
1207
+        /**
1208
+         * Asynchronous readdir(3) - read a directory.
1209
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1210
+         * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
1211
+         */
1212
+        function __promisify__(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
1213
+    }
1214
+
1215
+    /**
1216
+     * Synchronous readdir(3) - read a directory.
1217
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1218
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1219
+     */
1220
+    export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[];
1221
+
1222
+    /**
1223
+     * Synchronous readdir(3) - read a directory.
1224
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1225
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1226
+     */
1227
+    export function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[];
1228
+
1229
+    /**
1230
+     * Synchronous readdir(3) - read a directory.
1231
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1232
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1233
+     */
1234
+    export function readdirSync(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): string[] | Buffer[];
1235
+
1236
+    /**
1237
+     * Synchronous readdir(3) - read a directory.
1238
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1239
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
1240
+     */
1241
+    export function readdirSync(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Dirent[];
1242
+
1243
+    /**
1244
+     * Asynchronous close(2) - close a file descriptor.
1245
+     * @param fd A file descriptor.
1246
+     */
1247
+    export function close(fd: number, callback: NoParamCallback): void;
1248
+
1249
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1250
+    export namespace close {
1251
+        /**
1252
+         * Asynchronous close(2) - close a file descriptor.
1253
+         * @param fd A file descriptor.
1254
+         */
1255
+        function __promisify__(fd: number): Promise<void>;
1256
+    }
1257
+
1258
+    /**
1259
+     * Synchronous close(2) - close a file descriptor.
1260
+     * @param fd A file descriptor.
1261
+     */
1262
+    export function closeSync(fd: number): void;
1263
+
1264
+    /**
1265
+     * Asynchronous open(2) - open and possibly create a file.
1266
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1267
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1268
+     */
1269
+    export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1270
+
1271
+    /**
1272
+     * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1273
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1274
+     */
1275
+    export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1276
+
1277
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1278
+    export namespace open {
1279
+        /**
1280
+         * Asynchronous open(2) - open and possibly create a file.
1281
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1282
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1283
+         */
1284
+        function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
1285
+    }
1286
+
1287
+    /**
1288
+     * Synchronous open(2) - open and possibly create a file, returning a file descriptor..
1289
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1290
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1291
+     */
1292
+    export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
1293
+
1294
+    /**
1295
+     * Asynchronously change file timestamps of the file referenced by the supplied path.
1296
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1297
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
1298
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1299
+     */
1300
+    export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
1301
+
1302
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1303
+    export namespace utimes {
1304
+        /**
1305
+         * Asynchronously change file timestamps of the file referenced by the supplied path.
1306
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1307
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
1308
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1309
+         */
1310
+        function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
1311
+    }
1312
+
1313
+    /**
1314
+     * Synchronously change file timestamps of the file referenced by the supplied path.
1315
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1316
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
1317
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1318
+     */
1319
+    export function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
1320
+
1321
+    /**
1322
+     * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
1323
+     * @param fd A file descriptor.
1324
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
1325
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1326
+     */
1327
+    export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
1328
+
1329
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1330
+    export namespace futimes {
1331
+        /**
1332
+         * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
1333
+         * @param fd A file descriptor.
1334
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
1335
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1336
+         */
1337
+        function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
1338
+    }
1339
+
1340
+    /**
1341
+     * Synchronously change file timestamps of the file referenced by the supplied file descriptor.
1342
+     * @param fd A file descriptor.
1343
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
1344
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1345
+     */
1346
+    export function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
1347
+
1348
+    /**
1349
+     * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1350
+     * @param fd A file descriptor.
1351
+     */
1352
+    export function fsync(fd: number, callback: NoParamCallback): void;
1353
+
1354
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1355
+    export namespace fsync {
1356
+        /**
1357
+         * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1358
+         * @param fd A file descriptor.
1359
+         */
1360
+        function __promisify__(fd: number): Promise<void>;
1361
+    }
1362
+
1363
+    /**
1364
+     * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1365
+     * @param fd A file descriptor.
1366
+     */
1367
+    export function fsyncSync(fd: number): void;
1368
+
1369
+    /**
1370
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1371
+     * @param fd A file descriptor.
1372
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1373
+     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1374
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1375
+     */
1376
+    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1377
+        fd: number,
1378
+        buffer: TBuffer,
1379
+        offset: number | undefined | null,
1380
+        length: number | undefined | null,
1381
+        position: number | undefined | null,
1382
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
1383
+    ): void;
1384
+
1385
+    /**
1386
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1387
+     * @param fd A file descriptor.
1388
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1389
+     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1390
+     */
1391
+    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1392
+        fd: number,
1393
+        buffer: TBuffer,
1394
+        offset: number | undefined | null,
1395
+        length: number | undefined | null,
1396
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
1397
+    ): void;
1398
+
1399
+    /**
1400
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1401
+     * @param fd A file descriptor.
1402
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1403
+     */
1404
+    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1405
+        fd: number,
1406
+        buffer: TBuffer,
1407
+        offset: number | undefined | null,
1408
+        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
1409
+    ): void;
1410
+
1411
+    /**
1412
+     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1413
+     * @param fd A file descriptor.
1414
+     */
1415
+    export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
1416
+
1417
+    /**
1418
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1419
+     * @param fd A file descriptor.
1420
+     * @param string A string to write.
1421
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1422
+     * @param encoding The expected string encoding.
1423
+     */
1424
+    export function write(
1425
+        fd: number,
1426
+        string: string,
1427
+        position: number | undefined | null,
1428
+        encoding: BufferEncoding | undefined | null,
1429
+        callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
1430
+    ): void;
1431
+
1432
+    /**
1433
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1434
+     * @param fd A file descriptor.
1435
+     * @param string A string to write.
1436
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1437
+     */
1438
+    export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
1439
+
1440
+    /**
1441
+     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1442
+     * @param fd A file descriptor.
1443
+     * @param string A string to write.
1444
+     */
1445
+    export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
1446
+
1447
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1448
+    export namespace write {
1449
+        /**
1450
+         * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1451
+         * @param fd A file descriptor.
1452
+         * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1453
+         * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1454
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1455
+         */
1456
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
1457
+            fd: number,
1458
+            buffer?: TBuffer,
1459
+            offset?: number,
1460
+            length?: number,
1461
+            position?: number | null,
1462
+        ): Promise<{ bytesWritten: number, buffer: TBuffer }>;
1463
+
1464
+        /**
1465
+         * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1466
+         * @param fd A file descriptor.
1467
+         * @param string A string to write.
1468
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1469
+         * @param encoding The expected string encoding.
1470
+         */
1471
+        function __promisify__(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
1472
+    }
1473
+
1474
+    /**
1475
+     * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written.
1476
+     * @param fd A file descriptor.
1477
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1478
+     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1479
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1480
+     */
1481
+    export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
1482
+
1483
+    /**
1484
+     * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
1485
+     * @param fd A file descriptor.
1486
+     * @param string A string to write.
1487
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1488
+     * @param encoding The expected string encoding.
1489
+     */
1490
+    export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
1491
+
1492
+    /**
1493
+     * Asynchronously reads data from the file referenced by the supplied file descriptor.
1494
+     * @param fd A file descriptor.
1495
+     * @param buffer The buffer that the data will be written to.
1496
+     * @param offset The offset in the buffer at which to start writing.
1497
+     * @param length The number of bytes to read.
1498
+     * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1499
+     */
1500
+    export function read<TBuffer extends NodeJS.ArrayBufferView>(
1501
+        fd: number,
1502
+        buffer: TBuffer,
1503
+        offset: number,
1504
+        length: number,
1505
+        position: number | null,
1506
+        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
1507
+    ): void;
1508
+
1509
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1510
+    export namespace read {
1511
+        /**
1512
+         * @param fd A file descriptor.
1513
+         * @param buffer The buffer that the data will be written to.
1514
+         * @param offset The offset in the buffer at which to start writing.
1515
+         * @param length The number of bytes to read.
1516
+         * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1517
+         */
1518
+        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
1519
+            fd: number,
1520
+            buffer: TBuffer,
1521
+            offset: number,
1522
+            length: number,
1523
+            position: number | null
1524
+        ): Promise<{ bytesRead: number, buffer: TBuffer }>;
1525
+    }
1526
+
1527
+    export interface ReadSyncOptions {
1528
+        /**
1529
+         * @default 0
1530
+         */
1531
+        offset?: number;
1532
+        /**
1533
+         * @default `length of buffer`
1534
+         */
1535
+        length?: number;
1536
+        /**
1537
+         * @default null
1538
+         */
1539
+        position?: number | null;
1540
+    }
1541
+
1542
+    /**
1543
+     * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.
1544
+     * @param fd A file descriptor.
1545
+     * @param buffer The buffer that the data will be written to.
1546
+     * @param offset The offset in the buffer at which to start writing.
1547
+     * @param length The number of bytes to read.
1548
+     * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1549
+     */
1550
+    export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number;
1551
+
1552
+    /**
1553
+     * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
1554
+     * If no `options` object is specified, it will default with the above values.
1555
+     */
1556
+    export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
1557
+
1558
+    /**
1559
+     * Asynchronously reads the entire contents of a file.
1560
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1561
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1562
+     * @param options An object that may contain an optional flag.
1563
+     * If a flag is not provided, it defaults to `'r'`.
1564
+     */
1565
+    export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
1566
+
1567
+    /**
1568
+     * Asynchronously reads the entire contents of a file.
1569
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1570
+     * URL support is _experimental_.
1571
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1572
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1573
+     * If a flag is not provided, it defaults to `'r'`.
1574
+     */
1575
+    export function readFile(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
1576
+
1577
+    /**
1578
+     * Asynchronously reads the entire contents of a file.
1579
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1580
+     * URL support is _experimental_.
1581
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1582
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1583
+     * If a flag is not provided, it defaults to `'r'`.
1584
+     */
1585
+    export function readFile(
1586
+        path: PathLike | number,
1587
+        options: BaseEncodingOptions & { flag?: string; } | string | undefined | null,
1588
+        callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
1589
+    ): void;
1590
+
1591
+    /**
1592
+     * Asynchronously reads the entire contents of a file.
1593
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1594
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1595
+     */
1596
+    export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
1597
+
1598
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1599
+    export namespace readFile {
1600
+        /**
1601
+         * Asynchronously reads the entire contents of a file.
1602
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1603
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1604
+         * @param options An object that may contain an optional flag.
1605
+         * If a flag is not provided, it defaults to `'r'`.
1606
+         */
1607
+        function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise<Buffer>;
1608
+
1609
+        /**
1610
+         * Asynchronously reads the entire contents of a file.
1611
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1612
+         * URL support is _experimental_.
1613
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1614
+         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1615
+         * If a flag is not provided, it defaults to `'r'`.
1616
+         */
1617
+        function __promisify__(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string): Promise<string>;
1618
+
1619
+        /**
1620
+         * Asynchronously reads the entire contents of a file.
1621
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1622
+         * URL support is _experimental_.
1623
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1624
+         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1625
+         * If a flag is not provided, it defaults to `'r'`.
1626
+         */
1627
+        function __promisify__(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | string | null): Promise<string | Buffer>;
1628
+    }
1629
+
1630
+    /**
1631
+     * Synchronously reads the entire contents of a file.
1632
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1633
+     * URL support is _experimental_.
1634
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1635
+     * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`.
1636
+     */
1637
+    export function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer;
1638
+
1639
+    /**
1640
+     * Synchronously reads the entire contents of a file.
1641
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1642
+     * URL support is _experimental_.
1643
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1644
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1645
+     * If a flag is not provided, it defaults to `'r'`.
1646
+     */
1647
+    export function readFileSync(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | BufferEncoding): string;
1648
+
1649
+    /**
1650
+     * Synchronously reads the entire contents of a file.
1651
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1652
+     * URL support is _experimental_.
1653
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1654
+     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1655
+     * If a flag is not provided, it defaults to `'r'`.
1656
+     */
1657
+    export function readFileSync(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | BufferEncoding | null): string | Buffer;
1658
+
1659
+    export type WriteFileOptions = BaseEncodingOptions & { mode?: Mode; flag?: string; } | string | null;
1660
+
1661
+    /**
1662
+     * Asynchronously writes data to a file, replacing the file if it already exists.
1663
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1664
+     * URL support is _experimental_.
1665
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1666
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1667
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1668
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1669
+     * If `mode` is not supplied, the default of `0o666` is used.
1670
+     * If `mode` is a string, it is parsed as an octal integer.
1671
+     * If `flag` is not supplied, the default of `'w'` is used.
1672
+     */
1673
+    export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
1674
+
1675
+    /**
1676
+     * Asynchronously writes data to a file, replacing the file if it already exists.
1677
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1678
+     * URL support is _experimental_.
1679
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1680
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1681
+     */
1682
+    export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
1683
+
1684
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1685
+    export namespace writeFile {
1686
+        /**
1687
+         * Asynchronously writes data to a file, replacing the file if it already exists.
1688
+         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1689
+         * URL support is _experimental_.
1690
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1691
+         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1692
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1693
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
1694
+         * If `mode` is not supplied, the default of `0o666` is used.
1695
+         * If `mode` is a string, it is parsed as an octal integer.
1696
+         * If `flag` is not supplied, the default of `'w'` is used.
1697
+         */
1698
+        function __promisify__(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
1699
+    }
1700
+
1701
+    /**
1702
+     * Synchronously writes data to a file, replacing the file if it already exists.
1703
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1704
+     * URL support is _experimental_.
1705
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1706
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1707
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1708
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1709
+     * If `mode` is not supplied, the default of `0o666` is used.
1710
+     * If `mode` is a string, it is parsed as an octal integer.
1711
+     * If `flag` is not supplied, the default of `'w'` is used.
1712
+     */
1713
+    export function writeFileSync(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
1714
+
1715
+    /**
1716
+     * Asynchronously append data to a file, creating the file if it does not exist.
1717
+     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1718
+     * URL support is _experimental_.
1719
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1720
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1721
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1722
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1723
+     * If `mode` is not supplied, the default of `0o666` is used.
1724
+     * If `mode` is a string, it is parsed as an octal integer.
1725
+     * If `flag` is not supplied, the default of `'a'` is used.
1726
+     */
1727
+    export function appendFile(file: PathLike | number, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
1728
+
1729
+    /**
1730
+     * Asynchronously append data to a file, creating the file if it does not exist.
1731
+     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1732
+     * URL support is _experimental_.
1733
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1734
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1735
+     */
1736
+    export function appendFile(file: PathLike | number, data: string | Uint8Array, callback: NoParamCallback): void;
1737
+
1738
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1739
+    export namespace appendFile {
1740
+        /**
1741
+         * Asynchronously append data to a file, creating the file if it does not exist.
1742
+         * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1743
+         * URL support is _experimental_.
1744
+         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1745
+         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1746
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1747
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
1748
+         * If `mode` is not supplied, the default of `0o666` is used.
1749
+         * If `mode` is a string, it is parsed as an octal integer.
1750
+         * If `flag` is not supplied, the default of `'a'` is used.
1751
+         */
1752
+        function __promisify__(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
1753
+    }
1754
+
1755
+    /**
1756
+     * Synchronously append data to a file, creating the file if it does not exist.
1757
+     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1758
+     * URL support is _experimental_.
1759
+     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1760
+     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1761
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1762
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1763
+     * If `mode` is not supplied, the default of `0o666` is used.
1764
+     * If `mode` is a string, it is parsed as an octal integer.
1765
+     * If `flag` is not supplied, the default of `'a'` is used.
1766
+     */
1767
+    export function appendFileSync(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): void;
1768
+
1769
+    /**
1770
+     * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
1771
+     */
1772
+    export function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void;
1773
+
1774
+    /**
1775
+     * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
1776
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1777
+     * URL support is _experimental_.
1778
+     */
1779
+    export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void;
1780
+
1781
+    /**
1782
+     * Stop watching for changes on `filename`.
1783
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1784
+     * URL support is _experimental_.
1785
+     */
1786
+    export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
1787
+
1788
+    /**
1789
+     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1790
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1791
+     * URL support is _experimental_.
1792
+     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1793
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1794
+     * If `persistent` is not supplied, the default of `true` is used.
1795
+     * If `recursive` is not supplied, the default of `false` is used.
1796
+     */
1797
+    export function watch(
1798
+        filename: PathLike,
1799
+        options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null,
1800
+        listener?: (event: "rename" | "change", filename: string) => void,
1801
+    ): FSWatcher;
1802
+
1803
+    /**
1804
+     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1805
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1806
+     * URL support is _experimental_.
1807
+     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1808
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1809
+     * If `persistent` is not supplied, the default of `true` is used.
1810
+     * If `recursive` is not supplied, the default of `false` is used.
1811
+     */
1812
+    export function watch(
1813
+        filename: PathLike,
1814
+        options: { encoding: "buffer", persistent?: boolean, recursive?: boolean; } | "buffer",
1815
+        listener?: (event: "rename" | "change", filename: Buffer) => void
1816
+    ): FSWatcher;
1817
+
1818
+    /**
1819
+     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1820
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1821
+     * URL support is _experimental_.
1822
+     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1823
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
1824
+     * If `persistent` is not supplied, the default of `true` is used.
1825
+     * If `recursive` is not supplied, the default of `false` is used.
1826
+     */
1827
+    export function watch(
1828
+        filename: PathLike,
1829
+        options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | string | null,
1830
+        listener?: (event: "rename" | "change", filename: string | Buffer) => void,
1831
+    ): FSWatcher;
1832
+
1833
+    /**
1834
+     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1835
+     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1836
+     * URL support is _experimental_.
1837
+     */
1838
+    export function watch(filename: PathLike, listener?: (event: "rename" | "change", filename: string) => any): FSWatcher;
1839
+
1840
+    /**
1841
+     * Asynchronously tests whether or not the given path exists by checking with the file system.
1842
+     * @deprecated since v1.0.0 Use `fs.stat()` or `fs.access()` instead
1843
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1844
+     * URL support is _experimental_.
1845
+     */
1846
+    export function exists(path: PathLike, callback: (exists: boolean) => void): void;
1847
+
1848
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1849
+    export namespace exists {
1850
+        /**
1851
+         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1852
+         * URL support is _experimental_.
1853
+         */
1854
+        function __promisify__(path: PathLike): Promise<boolean>;
1855
+    }
1856
+
1857
+    /**
1858
+     * Synchronously tests whether or not the given path exists by checking with the file system.
1859
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1860
+     * URL support is _experimental_.
1861
+     */
1862
+    export function existsSync(path: PathLike): boolean;
1863
+
1864
+    export namespace constants {
1865
+        // File Access Constants
1866
+
1867
+        /** Constant for fs.access(). File is visible to the calling process. */
1868
+        const F_OK: number;
1869
+
1870
+        /** Constant for fs.access(). File can be read by the calling process. */
1871
+        const R_OK: number;
1872
+
1873
+        /** Constant for fs.access(). File can be written by the calling process. */
1874
+        const W_OK: number;
1875
+
1876
+        /** Constant for fs.access(). File can be executed by the calling process. */
1877
+        const X_OK: number;
1878
+
1879
+        // File Copy Constants
1880
+
1881
+        /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
1882
+        const COPYFILE_EXCL: number;
1883
+
1884
+        /**
1885
+         * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
1886
+         * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
1887
+         */
1888
+        const COPYFILE_FICLONE: number;
1889
+
1890
+        /**
1891
+         * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
1892
+         * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
1893
+         */
1894
+        const COPYFILE_FICLONE_FORCE: number;
1895
+
1896
+        // File Open Constants
1897
+
1898
+        /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
1899
+        const O_RDONLY: number;
1900
+
1901
+        /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
1902
+        const O_WRONLY: number;
1903
+
1904
+        /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
1905
+        const O_RDWR: number;
1906
+
1907
+        /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
1908
+        const O_CREAT: number;
1909
+
1910
+        /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
1911
+        const O_EXCL: number;
1912
+
1913
+        /**
1914
+         * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
1915
+         * opening the path shall not cause that terminal to become the controlling terminal for the process
1916
+         * (if the process does not already have one).
1917
+         */
1918
+        const O_NOCTTY: number;
1919
+
1920
+        /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
1921
+        const O_TRUNC: number;
1922
+
1923
+        /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
1924
+        const O_APPEND: number;
1925
+
1926
+        /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
1927
+        const O_DIRECTORY: number;
1928
+
1929
+        /**
1930
+         * constant for fs.open().
1931
+         * Flag indicating reading accesses to the file system will no longer result in
1932
+         * an update to the atime information associated with the file.
1933
+         * This flag is available on Linux operating systems only.
1934
+         */
1935
+        const O_NOATIME: number;
1936
+
1937
+        /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
1938
+        const O_NOFOLLOW: number;
1939
+
1940
+        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
1941
+        const O_SYNC: number;
1942
+
1943
+        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
1944
+        const O_DSYNC: number;
1945
+
1946
+        /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
1947
+        const O_SYMLINK: number;
1948
+
1949
+        /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
1950
+        const O_DIRECT: number;
1951
+
1952
+        /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
1953
+        const O_NONBLOCK: number;
1954
+
1955
+        // File Type Constants
1956
+
1957
+        /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
1958
+        const S_IFMT: number;
1959
+
1960
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
1961
+        const S_IFREG: number;
1962
+
1963
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
1964
+        const S_IFDIR: number;
1965
+
1966
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
1967
+        const S_IFCHR: number;
1968
+
1969
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
1970
+        const S_IFBLK: number;
1971
+
1972
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
1973
+        const S_IFIFO: number;
1974
+
1975
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
1976
+        const S_IFLNK: number;
1977
+
1978
+        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
1979
+        const S_IFSOCK: number;
1980
+
1981
+        // File Mode Constants
1982
+
1983
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
1984
+        const S_IRWXU: number;
1985
+
1986
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
1987
+        const S_IRUSR: number;
1988
+
1989
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
1990
+        const S_IWUSR: number;
1991
+
1992
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
1993
+        const S_IXUSR: number;
1994
+
1995
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
1996
+        const S_IRWXG: number;
1997
+
1998
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
1999
+        const S_IRGRP: number;
2000
+
2001
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
2002
+        const S_IWGRP: number;
2003
+
2004
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
2005
+        const S_IXGRP: number;
2006
+
2007
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
2008
+        const S_IRWXO: number;
2009
+
2010
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
2011
+        const S_IROTH: number;
2012
+
2013
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
2014
+        const S_IWOTH: number;
2015
+
2016
+        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
2017
+        const S_IXOTH: number;
2018
+
2019
+        /**
2020
+         * When set, a memory file mapping is used to access the file. This flag
2021
+         * is available on Windows operating systems only. On other operating systems,
2022
+         * this flag is ignored.
2023
+         */
2024
+        const UV_FS_O_FILEMAP: number;
2025
+    }
2026
+
2027
+    /**
2028
+     * Asynchronously tests a user's permissions for the file specified by path.
2029
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2030
+     * URL support is _experimental_.
2031
+     */
2032
+    export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
2033
+
2034
+    /**
2035
+     * Asynchronously tests a user's permissions for the file specified by path.
2036
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2037
+     * URL support is _experimental_.
2038
+     */
2039
+    export function access(path: PathLike, callback: NoParamCallback): void;
2040
+
2041
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2042
+    export namespace access {
2043
+        /**
2044
+         * Asynchronously tests a user's permissions for the file specified by path.
2045
+         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2046
+         * URL support is _experimental_.
2047
+         */
2048
+        function __promisify__(path: PathLike, mode?: number): Promise<void>;
2049
+    }
2050
+
2051
+    /**
2052
+     * Synchronously tests a user's permissions for the file specified by path.
2053
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2054
+     * URL support is _experimental_.
2055
+     */
2056
+    export function accessSync(path: PathLike, mode?: number): void;
2057
+
2058
+    /**
2059
+     * Returns a new `ReadStream` object.
2060
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2061
+     * URL support is _experimental_.
2062
+     */
2063
+    export function createReadStream(path: PathLike, options?: string | {
2064
+        flags?: string;
2065
+        encoding?: BufferEncoding;
2066
+        fd?: number;
2067
+        mode?: number;
2068
+        autoClose?: boolean;
2069
+        /**
2070
+         * @default false
2071
+         */
2072
+        emitClose?: boolean;
2073
+        start?: number;
2074
+        end?: number;
2075
+        highWaterMark?: number;
2076
+    }): ReadStream;
2077
+
2078
+    /**
2079
+     * Returns a new `WriteStream` object.
2080
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2081
+     * URL support is _experimental_.
2082
+     */
2083
+    export function createWriteStream(path: PathLike, options?: string | {
2084
+        flags?: string;
2085
+        encoding?: BufferEncoding;
2086
+        fd?: number;
2087
+        mode?: number;
2088
+        autoClose?: boolean;
2089
+        emitClose?: boolean;
2090
+        start?: number;
2091
+        highWaterMark?: number;
2092
+    }): WriteStream;
2093
+
2094
+    /**
2095
+     * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2096
+     * @param fd A file descriptor.
2097
+     */
2098
+    export function fdatasync(fd: number, callback: NoParamCallback): void;
2099
+
2100
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2101
+    export namespace fdatasync {
2102
+        /**
2103
+         * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2104
+         * @param fd A file descriptor.
2105
+         */
2106
+        function __promisify__(fd: number): Promise<void>;
2107
+    }
2108
+
2109
+    /**
2110
+     * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2111
+     * @param fd A file descriptor.
2112
+     */
2113
+    export function fdatasyncSync(fd: number): void;
2114
+
2115
+    /**
2116
+     * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2117
+     * No arguments other than a possible exception are given to the callback function.
2118
+     * Node.js makes no guarantees about the atomicity of the copy operation.
2119
+     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2120
+     * to remove the destination.
2121
+     * @param src A path to the source file.
2122
+     * @param dest A path to the destination file.
2123
+     */
2124
+    export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
2125
+    /**
2126
+     * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2127
+     * No arguments other than a possible exception are given to the callback function.
2128
+     * Node.js makes no guarantees about the atomicity of the copy operation.
2129
+     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2130
+     * to remove the destination.
2131
+     * @param src A path to the source file.
2132
+     * @param dest A path to the destination file.
2133
+     * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
2134
+     */
2135
+    export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void;
2136
+
2137
+    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2138
+    export namespace copyFile {
2139
+        /**
2140
+         * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2141
+         * No arguments other than a possible exception are given to the callback function.
2142
+         * Node.js makes no guarantees about the atomicity of the copy operation.
2143
+         * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2144
+         * to remove the destination.
2145
+         * @param src A path to the source file.
2146
+         * @param dest A path to the destination file.
2147
+         * @param flags An optional integer that specifies the behavior of the copy operation.
2148
+         * The only supported flag is fs.constants.COPYFILE_EXCL,
2149
+         * which causes the copy operation to fail if dest already exists.
2150
+         */
2151
+        function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise<void>;
2152
+    }
2153
+
2154
+    /**
2155
+     * Synchronously copies src to dest. By default, dest is overwritten if it already exists.
2156
+     * Node.js makes no guarantees about the atomicity of the copy operation.
2157
+     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2158
+     * to remove the destination.
2159
+     * @param src A path to the source file.
2160
+     * @param dest A path to the destination file.
2161
+     * @param flags An optional integer that specifies the behavior of the copy operation.
2162
+     * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
2163
+     */
2164
+    export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
2165
+
2166
+    /**
2167
+     * Write an array of ArrayBufferViews to the file specified by fd using writev().
2168
+     * position is the offset from the beginning of the file where this data should be written.
2169
+     * It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream().
2170
+     * On Linux, positional writes don't work when the file is opened in append mode.
2171
+     * The kernel ignores the position argument and always appends the data to the end of the file.
2172
+     */
2173
+    export function writev(
2174
+        fd: number,
2175
+        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2176
+        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2177
+    ): void;
2178
+    export function writev(
2179
+        fd: number,
2180
+        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2181
+        position: number,
2182
+        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2183
+    ): void;
2184
+
2185
+    export interface WriteVResult {
2186
+        bytesWritten: number;
2187
+        buffers: NodeJS.ArrayBufferView[];
2188
+    }
2189
+
2190
+    export namespace writev {
2191
+        function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
2192
+    }
2193
+
2194
+    /**
2195
+     * See `writev`.
2196
+     */
2197
+    export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2198
+
2199
+    export function readv(
2200
+        fd: number,
2201
+        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2202
+        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2203
+    ): void;
2204
+    export function readv(
2205
+        fd: number,
2206
+        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2207
+        position: number,
2208
+        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2209
+    ): void;
2210
+
2211
+    export interface ReadVResult {
2212
+        bytesRead: number;
2213
+        buffers: NodeJS.ArrayBufferView[];
2214
+    }
2215
+
2216
+    export namespace readv {
2217
+        function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
2218
+    }
2219
+
2220
+    /**
2221
+     * See `readv`.
2222
+     */
2223
+    export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2224
+
2225
+    export interface OpenDirOptions {
2226
+        encoding?: BufferEncoding;
2227
+        /**
2228
+         * Number of directory entries that are buffered
2229
+         * internally when reading from the directory. Higher values lead to better
2230
+         * performance but higher memory usage.
2231
+         * @default 32
2232
+         */
2233
+        bufferSize?: number;
2234
+    }
2235
+
2236
+    export function opendirSync(path: string, options?: OpenDirOptions): Dir;
2237
+
2238
+    export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
2239
+    export function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
2240
+
2241
+    export namespace opendir {
2242
+        function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
2243
+    }
2244
+
2245
+    export interface BigIntStats extends StatsBase<bigint> {
2246
+    }
2247
+
2248
+    export class BigIntStats {
2249
+        atimeNs: bigint;
2250
+        mtimeNs: bigint;
2251
+        ctimeNs: bigint;
2252
+        birthtimeNs: bigint;
2253
+    }
2254
+
2255
+    export interface BigIntOptions {
2256
+        bigint: true;
2257
+    }
2258
+
2259
+    export interface StatOptions {
2260
+        bigint?: boolean;
2261
+    }
2262
+}
... ...
@@ -0,0 +1,561 @@
1
+declare module 'fs/promises' {
2
+    export * from 'node:fs/promises';
3
+}
4
+
5
+declare module 'node:fs/promises' {
6
+    import {
7
+        Stats,
8
+        BigIntStats,
9
+        StatOptions,
10
+        WriteVResult,
11
+        ReadVResult,
12
+        PathLike,
13
+        RmDirOptions,
14
+        RmOptions,
15
+        MakeDirectoryOptions,
16
+        Dirent,
17
+        OpenDirOptions,
18
+        Dir,
19
+        BaseEncodingOptions,
20
+        BufferEncodingOption,
21
+        OpenMode,
22
+        Mode,
23
+    } from 'node:fs';
24
+
25
+    interface FileHandle {
26
+        /**
27
+         * Gets the file descriptor for this file handle.
28
+         */
29
+        readonly fd: number;
30
+
31
+        /**
32
+         * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically.
33
+         * The `FileHandle` must have been opened for appending.
34
+         * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
35
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
36
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
37
+         * If `mode` is not supplied, the default of `0o666` is used.
38
+         * If `mode` is a string, it is parsed as an octal integer.
39
+         * If `flag` is not supplied, the default of `'a'` is used.
40
+         */
41
+        appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
42
+
43
+        /**
44
+         * Asynchronous fchown(2) - Change ownership of a file.
45
+         */
46
+        chown(uid: number, gid: number): Promise<void>;
47
+
48
+        /**
49
+         * Asynchronous fchmod(2) - Change permissions of a file.
50
+         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
51
+         */
52
+        chmod(mode: Mode): Promise<void>;
53
+
54
+        /**
55
+         * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
56
+         */
57
+        datasync(): Promise<void>;
58
+
59
+        /**
60
+         * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
61
+         */
62
+        sync(): Promise<void>;
63
+
64
+        /**
65
+         * Asynchronously reads data from the file.
66
+         * The `FileHandle` must have been opened for reading.
67
+         * @param buffer The buffer that the data will be written to.
68
+         * @param offset The offset in the buffer at which to start writing.
69
+         * @param length The number of bytes to read.
70
+         * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
71
+         */
72
+        read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
73
+
74
+        /**
75
+         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
76
+         * The `FileHandle` must have been opened for reading.
77
+         * @param options An object that may contain an optional flag.
78
+         * If a flag is not provided, it defaults to `'r'`.
79
+         */
80
+        readFile(options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
81
+
82
+        /**
83
+         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
84
+         * The `FileHandle` must have been opened for reading.
85
+         * @param options An object that may contain an optional flag.
86
+         * If a flag is not provided, it defaults to `'r'`.
87
+         */
88
+        readFile(options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
89
+
90
+        /**
91
+         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
92
+         * The `FileHandle` must have been opened for reading.
93
+         * @param options An object that may contain an optional flag.
94
+         * If a flag is not provided, it defaults to `'r'`.
95
+         */
96
+        readFile(options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
97
+
98
+        /**
99
+         * Asynchronous fstat(2) - Get file status.
100
+         */
101
+        stat(opts?: StatOptions & { bigint?: false }): Promise<Stats>;
102
+        stat(opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
103
+        stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
104
+
105
+        /**
106
+         * Asynchronous ftruncate(2) - Truncate a file to a specified length.
107
+         * @param len If not specified, defaults to `0`.
108
+         */
109
+        truncate(len?: number): Promise<void>;
110
+
111
+        /**
112
+         * Asynchronously change file timestamps of the file.
113
+         * @param atime The last access time. If a string is provided, it will be coerced to number.
114
+         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
115
+         */
116
+        utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
117
+
118
+        /**
119
+         * Asynchronously writes `buffer` to the file.
120
+         * The `FileHandle` must have been opened for writing.
121
+         * @param buffer The buffer that the data will be written to.
122
+         * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
123
+         * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
124
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
125
+         */
126
+        write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
127
+
128
+        /**
129
+         * Asynchronously writes `string` to the file.
130
+         * The `FileHandle` must have been opened for writing.
131
+         * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise`
132
+         * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
133
+         * @param string A string to write.
134
+         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
135
+         * @param encoding The expected string encoding.
136
+         */
137
+        write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
138
+
139
+        /**
140
+         * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically.
141
+         * The `FileHandle` must have been opened for writing.
142
+         * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
143
+         * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
144
+         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
145
+         * If `encoding` is not supplied, the default of `'utf8'` is used.
146
+         * If `mode` is not supplied, the default of `0o666` is used.
147
+         * If `mode` is a string, it is parsed as an octal integer.
148
+         * If `flag` is not supplied, the default of `'w'` is used.
149
+         */
150
+        writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
151
+
152
+        /**
153
+         * See `fs.writev` promisified version.
154
+         */
155
+        writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
156
+
157
+        /**
158
+         * See `fs.readv` promisified version.
159
+         */
160
+        readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
161
+
162
+        /**
163
+         * Asynchronous close(2) - close a `FileHandle`.
164
+         */
165
+        close(): Promise<void>;
166
+    }
167
+
168
+    /**
169
+     * Asynchronously tests a user's permissions for the file specified by path.
170
+     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
171
+     * URL support is _experimental_.
172
+     */
173
+    function access(path: PathLike, mode?: number): Promise<void>;
174
+
175
+    /**
176
+     * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
177
+     * Node.js makes no guarantees about the atomicity of the copy operation.
178
+     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
179
+     * to remove the destination.
180
+     * @param src A path to the source file.
181
+     * @param dest A path to the destination file.
182
+     * @param flags An optional integer that specifies the behavior of the copy operation. The only
183
+     * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
184
+     * `dest` already exists.
185
+     */
186
+    function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
187
+
188
+    /**
189
+     * Asynchronous open(2) - open and possibly create a file.
190
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
191
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
192
+     * supplied, defaults to `0o666`.
193
+     */
194
+    function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>;
195
+
196
+    /**
197
+     * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
198
+     * @param handle A `FileHandle`.
199
+     * @param buffer The buffer that the data will be written to.
200
+     * @param offset The offset in the buffer at which to start writing.
201
+     * @param length The number of bytes to read.
202
+     * @param position The offset from the beginning of the file from which data should be read. If
203
+     * `null`, data will be read from the current position.
204
+     */
205
+    function read<TBuffer extends Uint8Array>(
206
+        handle: FileHandle,
207
+        buffer: TBuffer,
208
+        offset?: number | null,
209
+        length?: number | null,
210
+        position?: number | null,
211
+    ): Promise<{ bytesRead: number, buffer: TBuffer }>;
212
+
213
+    /**
214
+     * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
215
+     * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
216
+     * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
217
+     * @param handle A `FileHandle`.
218
+     * @param buffer The buffer that the data will be written to.
219
+     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
220
+     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
221
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
222
+     */
223
+    function write<TBuffer extends Uint8Array>(
224
+        handle: FileHandle,
225
+        buffer: TBuffer,
226
+        offset?: number | null,
227
+        length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
228
+
229
+    /**
230
+     * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
231
+     * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
232
+     * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
233
+     * @param handle A `FileHandle`.
234
+     * @param string A string to write.
235
+     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
236
+     * @param encoding The expected string encoding.
237
+     */
238
+    function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
239
+
240
+    /**
241
+     * Asynchronous rename(2) - Change the name or location of a file or directory.
242
+     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
243
+     * URL support is _experimental_.
244
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
245
+     * URL support is _experimental_.
246
+     */
247
+    function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
248
+
249
+    /**
250
+     * Asynchronous truncate(2) - Truncate a file to a specified length.
251
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
252
+     * @param len If not specified, defaults to `0`.
253
+     */
254
+    function truncate(path: PathLike, len?: number): Promise<void>;
255
+
256
+    /**
257
+     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
258
+     * @param handle A `FileHandle`.
259
+     * @param len If not specified, defaults to `0`.
260
+     */
261
+    function ftruncate(handle: FileHandle, len?: number): Promise<void>;
262
+
263
+    /**
264
+     * Asynchronous rmdir(2) - delete a directory.
265
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
266
+     */
267
+    function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
268
+
269
+    /**
270
+     * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
271
+     */
272
+    function rm(path: PathLike, options?: RmOptions): Promise<void>;
273
+
274
+    /**
275
+     * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
276
+     * @param handle A `FileHandle`.
277
+     */
278
+    function fdatasync(handle: FileHandle): Promise<void>;
279
+
280
+    /**
281
+     * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
282
+     * @param handle A `FileHandle`.
283
+     */
284
+    function fsync(handle: FileHandle): Promise<void>;
285
+
286
+    /**
287
+     * Asynchronous mkdir(2) - create a directory.
288
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
289
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
290
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
291
+     */
292
+    function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
293
+
294
+    /**
295
+     * Asynchronous mkdir(2) - create a directory.
296
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
297
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
298
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
299
+     */
300
+    function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
301
+
302
+    /**
303
+     * Asynchronous mkdir(2) - create a directory.
304
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
305
+     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
306
+     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
307
+     */
308
+    function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
309
+
310
+    /**
311
+     * Asynchronous readdir(3) - read a directory.
312
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
313
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
314
+     */
315
+    function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
316
+
317
+    /**
318
+     * Asynchronous readdir(3) - read a directory.
319
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
320
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
321
+     */
322
+    function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>;
323
+
324
+    /**
325
+     * Asynchronous readdir(3) - read a directory.
326
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
327
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
328
+     */
329
+    function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
330
+
331
+    /**
332
+     * Asynchronous readdir(3) - read a directory.
333
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
334
+     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
335
+     */
336
+    function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
337
+
338
+    /**
339
+     * Asynchronous readlink(2) - read value of a symbolic link.
340
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
341
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
342
+     */
343
+    function readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
344
+
345
+    /**
346
+     * Asynchronous readlink(2) - read value of a symbolic link.
347
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
348
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
349
+     */
350
+    function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
351
+
352
+    /**
353
+     * Asynchronous readlink(2) - read value of a symbolic link.
354
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
355
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
356
+     */
357
+    function readlink(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
358
+
359
+    /**
360
+     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
361
+     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
362
+     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
363
+     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
364
+     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
365
+     */
366
+    function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
367
+
368
+    /**
369
+     * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
370
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
371
+     */
372
+    function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
373
+    function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
374
+    function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
375
+
376
+    /**
377
+     * Asynchronous stat(2) - Get file status.
378
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
379
+     */
380
+    function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
381
+    function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
382
+    function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
383
+
384
+    /**
385
+     * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
386
+     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
387
+     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
388
+     */
389
+    function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
390
+
391
+    /**
392
+     * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
393
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
394
+     */
395
+    function unlink(path: PathLike): Promise<void>;
396
+
397
+    /**
398
+     * Asynchronous fchmod(2) - Change permissions of a file.
399
+     * @param handle A `FileHandle`.
400
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
401
+     */
402
+    function fchmod(handle: FileHandle, mode: Mode): Promise<void>;
403
+
404
+    /**
405
+     * Asynchronous chmod(2) - Change permissions of a file.
406
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
407
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
408
+     */
409
+    function chmod(path: PathLike, mode: Mode): Promise<void>;
410
+
411
+    /**
412
+     * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
413
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
414
+     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
415
+     */
416
+    function lchmod(path: PathLike, mode: Mode): Promise<void>;
417
+
418
+    /**
419
+     * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
420
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
421
+     */
422
+    function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
423
+
424
+    /**
425
+     * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
426
+     * with the difference that if the path refers to a symbolic link, then the link is not
427
+     * dereferenced: instead, the timestamps of the symbolic link itself are changed.
428
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
429
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
430
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
431
+     */
432
+    function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
433
+
434
+    /**
435
+     * Asynchronous fchown(2) - Change ownership of a file.
436
+     * @param handle A `FileHandle`.
437
+     */
438
+    function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>;
439
+
440
+    /**
441
+     * Asynchronous chown(2) - Change ownership of a file.
442
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
443
+     */
444
+    function chown(path: PathLike, uid: number, gid: number): Promise<void>;
445
+
446
+    /**
447
+     * Asynchronously change file timestamps of the file referenced by the supplied path.
448
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
449
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
450
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
451
+     */
452
+    function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
453
+
454
+    /**
455
+     * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
456
+     * @param handle A `FileHandle`.
457
+     * @param atime The last access time. If a string is provided, it will be coerced to number.
458
+     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
459
+     */
460
+    function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
461
+
462
+    /**
463
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
464
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
465
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
466
+     */
467
+    function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
468
+
469
+    /**
470
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
471
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
472
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
473
+     */
474
+    function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
475
+
476
+    /**
477
+     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
478
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
479
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
480
+     */
481
+    function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
482
+
483
+    /**
484
+     * Asynchronously creates a unique temporary directory.
485
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
486
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
487
+     */
488
+    function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
489
+
490
+    /**
491
+     * Asynchronously creates a unique temporary directory.
492
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
493
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
494
+     */
495
+    function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
496
+
497
+    /**
498
+     * Asynchronously creates a unique temporary directory.
499
+     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
500
+     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
501
+     */
502
+    function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
503
+
504
+    /**
505
+     * Asynchronously writes data to a file, replacing the file if it already exists.
506
+     * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
507
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
508
+     * URL support is _experimental_.
509
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
510
+     * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
511
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
512
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
513
+     * If `mode` is not supplied, the default of `0o666` is used.
514
+     * If `mode` is a string, it is parsed as an octal integer.
515
+     * If `flag` is not supplied, the default of `'w'` is used.
516
+     */
517
+    function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
518
+
519
+    /**
520
+     * Asynchronously append data to a file, creating the file if it does not exist.
521
+     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
522
+     * URL support is _experimental_.
523
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
524
+     * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
525
+     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
526
+     * If `encoding` is not supplied, the default of `'utf8'` is used.
527
+     * If `mode` is not supplied, the default of `0o666` is used.
528
+     * If `mode` is a string, it is parsed as an octal integer.
529
+     * If `flag` is not supplied, the default of `'a'` is used.
530
+     */
531
+    function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
532
+
533
+    /**
534
+     * Asynchronously reads the entire contents of a file.
535
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
536
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
537
+     * @param options An object that may contain an optional flag.
538
+     * If a flag is not provided, it defaults to `'r'`.
539
+     */
540
+    function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
541
+
542
+    /**
543
+     * Asynchronously reads the entire contents of a file.
544
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
545
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
546
+     * @param options An object that may contain an optional flag.
547
+     * If a flag is not provided, it defaults to `'r'`.
548
+     */
549
+    function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
550
+
551
+    /**
552
+     * Asynchronously reads the entire contents of a file.
553
+     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
554
+     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
555
+     * @param options An object that may contain an optional flag.
556
+     * If a flag is not provided, it defaults to `'r'`.
557
+     */
558
+    function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
559
+
560
+    function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
561
+}
... ...
@@ -0,0 +1,614 @@
1
+// Declare "static" methods in Error
2
+interface ErrorConstructor {
3
+    /** Create .stack property on a target object */
4
+    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
5
+
6
+    /**
7
+     * Optional override for formatting stack traces
8
+     *
9
+     * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
10
+     */
11
+    prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
12
+
13
+    stackTraceLimit: number;
14
+}
15
+
16
+// Node.js ESNEXT support
17
+interface String {
18
+    /** Removes whitespace from the left end of a string. */
19
+    trimLeft(): string;
20
+    /** Removes whitespace from the right end of a string. */
21
+    trimRight(): string;
22
+
23
+    /** Returns a copy with leading whitespace removed. */
24
+    trimStart(): string;
25
+    /** Returns a copy with trailing whitespace removed. */
26
+    trimEnd(): string;
27
+}
28
+
29
+interface ImportMeta {
30
+    url: string;
31
+}
32
+
33
+/*-----------------------------------------------*
34
+ *                                               *
35
+ *                   GLOBAL                      *
36
+ *                                               *
37
+ ------------------------------------------------*/
38
+
39
+// For backwards compability
40
+interface NodeRequire extends NodeJS.Require {}
41
+interface RequireResolve extends NodeJS.RequireResolve {}
42
+interface NodeModule extends NodeJS.Module {}
43
+
44
+declare var process: NodeJS.Process;
45
+declare var console: Console;
46
+
47
+declare var __filename: string;
48
+declare var __dirname: string;
49
+
50
+declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
51
+declare namespace setTimeout {
52
+    function __promisify__(ms: number): Promise<void>;
53
+    function __promisify__<T>(ms: number, value: T): Promise<T>;
54
+}
55
+declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
56
+declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
57
+declare function clearInterval(intervalId: NodeJS.Timeout): void;
58
+declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
59
+declare namespace setImmediate {
60
+    function __promisify__(): Promise<void>;
61
+    function __promisify__<T>(value: T): Promise<T>;
62
+}
63
+declare function clearImmediate(immediateId: NodeJS.Immediate): void;
64
+
65
+declare function queueMicrotask(callback: () => void): void;
66
+
67
+declare var require: NodeRequire;
68
+declare var module: NodeModule;
69
+
70
+// Same as module.exports
71
+declare var exports: any;
72
+
73
+// Buffer class
74
+type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
75
+
76
+type WithImplicitCoercion<T> = T | { valueOf(): T };
77
+
78
+/**
79
+ * Raw data is stored in instances of the Buffer class.
80
+ * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap.  A Buffer cannot be resized.
81
+ * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
82
+ */
83
+declare class Buffer extends Uint8Array {
84
+    /**
85
+     * Allocates a new buffer containing the given {str}.
86
+     *
87
+     * @param str String to store in buffer.
88
+     * @param encoding encoding to use, optional.  Default is 'utf8'
89
+     * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
90
+     */
91
+    constructor(str: string, encoding?: BufferEncoding);
92
+    /**
93
+     * Allocates a new buffer of {size} octets.
94
+     *
95
+     * @param size count of octets to allocate.
96
+     * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
97
+     */
98
+    constructor(size: number);
99
+    /**
100
+     * Allocates a new buffer containing the given {array} of octets.
101
+     *
102
+     * @param array The octets to store.
103
+     * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
104
+     */
105
+    constructor(array: Uint8Array);
106
+    /**
107
+     * Produces a Buffer backed by the same allocated memory as
108
+     * the given {ArrayBuffer}/{SharedArrayBuffer}.
109
+     *
110
+     *
111
+     * @param arrayBuffer The ArrayBuffer with which to share memory.
112
+     * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
113
+     */
114
+    constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
115
+    /**
116
+     * Allocates a new buffer containing the given {array} of octets.
117
+     *
118
+     * @param array The octets to store.
119
+     * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
120
+     */
121
+    constructor(array: ReadonlyArray<any>);
122
+    /**
123
+     * Copies the passed {buffer} data onto a new {Buffer} instance.
124
+     *
125
+     * @param buffer The buffer to copy.
126
+     * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
127
+     */
128
+    constructor(buffer: Buffer);
129
+    /**
130
+     * When passed a reference to the .buffer property of a TypedArray instance,
131
+     * the newly created Buffer will share the same allocated memory as the TypedArray.
132
+     * The optional {byteOffset} and {length} arguments specify a memory range
133
+     * within the {arrayBuffer} that will be shared by the Buffer.
134
+     *
135
+     * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
136
+     */
137
+    static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
138
+    /**
139
+     * Creates a new Buffer using the passed {data}
140
+     * @param data data to create a new Buffer
141
+     */
142
+    static from(data: Uint8Array | ReadonlyArray<number>): Buffer;
143
+    static from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
144
+    /**
145
+     * Creates a new Buffer containing the given JavaScript string {str}.
146
+     * If provided, the {encoding} parameter identifies the character encoding.
147
+     * If not provided, {encoding} defaults to 'utf8'.
148
+     */
149
+    static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
150
+    /**
151
+     * Creates a new Buffer using the passed {data}
152
+     * @param values to create a new Buffer
153
+     */
154
+    static of(...items: number[]): Buffer;
155
+    /**
156
+     * Returns true if {obj} is a Buffer
157
+     *
158
+     * @param obj object to test.
159
+     */
160
+    static isBuffer(obj: any): obj is Buffer;
161
+    /**
162
+     * Returns true if {encoding} is a valid encoding argument.
163
+     * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
164
+     *
165
+     * @param encoding string to test.
166
+     */
167
+    static isEncoding(encoding: string): encoding is BufferEncoding;
168
+    /**
169
+     * Gives the actual byte length of a string. encoding defaults to 'utf8'.
170
+     * This is not the same as String.prototype.length since that returns the number of characters in a string.
171
+     *
172
+     * @param string string to test.
173
+     * @param encoding encoding used to evaluate (defaults to 'utf8')
174
+     */
175
+    static byteLength(
176
+        string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
177
+        encoding?: BufferEncoding
178
+    ): number;
179
+    /**
180
+     * Returns a buffer which is the result of concatenating all the buffers in the list together.
181
+     *
182
+     * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
183
+     * If the list has exactly one item, then the first item of the list is returned.
184
+     * If the list has more than one item, then a new Buffer is created.
185
+     *
186
+     * @param list An array of Buffer objects to concatenate
187
+     * @param totalLength Total length of the buffers when concatenated.
188
+     *   If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
189
+     */
190
+    static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
191
+    /**
192
+     * The same as buf1.compare(buf2).
193
+     */
194
+    static compare(buf1: Uint8Array, buf2: Uint8Array): number;
195
+    /**
196
+     * Allocates a new buffer of {size} octets.
197
+     *
198
+     * @param size count of octets to allocate.
199
+     * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
200
+     *    If parameter is omitted, buffer will be filled with zeros.
201
+     * @param encoding encoding used for call to buf.fill while initalizing
202
+     */
203
+    static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
204
+    /**
205
+     * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
206
+     * of the newly created Buffer are unknown and may contain sensitive data.
207
+     *
208
+     * @param size count of octets to allocate
209
+     */
210
+    static allocUnsafe(size: number): Buffer;
211
+    /**
212
+     * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
213
+     * of the newly created Buffer are unknown and may contain sensitive data.
214
+     *
215
+     * @param size count of octets to allocate
216
+     */
217
+    static allocUnsafeSlow(size: number): Buffer;
218
+    /**
219
+     * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
220
+     */
221
+    static poolSize: number;
222
+
223
+    write(string: string, encoding?: BufferEncoding): number;
224
+    write(string: string, offset: number, encoding?: BufferEncoding): number;
225
+    write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
226
+    toString(encoding?: BufferEncoding, start?: number, end?: number): string;
227
+    toJSON(): { type: 'Buffer'; data: number[] };
228
+    equals(otherBuffer: Uint8Array): boolean;
229
+    compare(
230
+        otherBuffer: Uint8Array,
231
+        targetStart?: number,
232
+        targetEnd?: number,
233
+        sourceStart?: number,
234
+        sourceEnd?: number
235
+    ): number;
236
+    copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
237
+    /**
238
+     * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
239
+     *
240
+     * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
241
+     *
242
+     * @param begin Where the new `Buffer` will start. Default: `0`.
243
+     * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
244
+     */
245
+    slice(begin?: number, end?: number): Buffer;
246
+    /**
247
+     * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
248
+     *
249
+     * This method is compatible with `Uint8Array#subarray()`.
250
+     *
251
+     * @param begin Where the new `Buffer` will start. Default: `0`.
252
+     * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
253
+     */
254
+    subarray(begin?: number, end?: number): Buffer;
255
+    writeBigInt64BE(value: bigint, offset?: number): number;
256
+    writeBigInt64LE(value: bigint, offset?: number): number;
257
+    writeBigUInt64BE(value: bigint, offset?: number): number;
258
+    writeBigUInt64LE(value: bigint, offset?: number): number;
259
+    writeUIntLE(value: number, offset: number, byteLength: number): number;
260
+    writeUIntBE(value: number, offset: number, byteLength: number): number;
261
+    writeIntLE(value: number, offset: number, byteLength: number): number;
262
+    writeIntBE(value: number, offset: number, byteLength: number): number;
263
+    readBigUInt64BE(offset?: number): bigint;
264
+    readBigUInt64LE(offset?: number): bigint;
265
+    readBigInt64BE(offset?: number): bigint;
266
+    readBigInt64LE(offset?: number): bigint;
267
+    readUIntLE(offset: number, byteLength: number): number;
268
+    readUIntBE(offset: number, byteLength: number): number;
269
+    readIntLE(offset: number, byteLength: number): number;
270
+    readIntBE(offset: number, byteLength: number): number;
271
+    readUInt8(offset?: number): number;
272
+    readUInt16LE(offset?: number): number;
273
+    readUInt16BE(offset?: number): number;
274
+    readUInt32LE(offset?: number): number;
275
+    readUInt32BE(offset?: number): number;
276
+    readInt8(offset?: number): number;
277
+    readInt16LE(offset?: number): number;
278
+    readInt16BE(offset?: number): number;
279
+    readInt32LE(offset?: number): number;
280
+    readInt32BE(offset?: number): number;
281
+    readFloatLE(offset?: number): number;
282
+    readFloatBE(offset?: number): number;
283
+    readDoubleLE(offset?: number): number;
284
+    readDoubleBE(offset?: number): number;
285
+    reverse(): this;
286
+    swap16(): Buffer;
287
+    swap32(): Buffer;
288
+    swap64(): Buffer;
289
+    writeUInt8(value: number, offset?: number): number;
290
+    writeUInt16LE(value: number, offset?: number): number;
291
+    writeUInt16BE(value: number, offset?: number): number;
292
+    writeUInt32LE(value: number, offset?: number): number;
293
+    writeUInt32BE(value: number, offset?: number): number;
294
+    writeInt8(value: number, offset?: number): number;
295
+    writeInt16LE(value: number, offset?: number): number;
296
+    writeInt16BE(value: number, offset?: number): number;
297
+    writeInt32LE(value: number, offset?: number): number;
298
+    writeInt32BE(value: number, offset?: number): number;
299
+    writeFloatLE(value: number, offset?: number): number;
300
+    writeFloatBE(value: number, offset?: number): number;
301
+    writeDoubleLE(value: number, offset?: number): number;
302
+    writeDoubleBE(value: number, offset?: number): number;
303
+
304
+    fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
305
+
306
+    indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
307
+    lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
308
+    entries(): IterableIterator<[number, number]>;
309
+    includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
310
+    keys(): IterableIterator<number>;
311
+    values(): IterableIterator<number>;
312
+}
313
+
314
+/*----------------------------------------------*
315
+*                                               *
316
+*               GLOBAL INTERFACES               *
317
+*                                               *
318
+*-----------------------------------------------*/
319
+declare namespace NodeJS {
320
+    interface InspectOptions {
321
+        /**
322
+         * If set to `true`, getters are going to be
323
+         * inspected as well. If set to `'get'` only getters without setter are going
324
+         * to be inspected. If set to `'set'` only getters having a corresponding
325
+         * setter are going to be inspected. This might cause side effects depending on
326
+         * the getter function.
327
+         * @default `false`
328
+         */
329
+        getters?: 'get' | 'set' | boolean;
330
+        showHidden?: boolean;
331
+        /**
332
+         * @default 2
333
+         */
334
+        depth?: number | null;
335
+        colors?: boolean;
336
+        customInspect?: boolean;
337
+        showProxy?: boolean;
338
+        maxArrayLength?: number | null;
339
+        /**
340
+         * Specifies the maximum number of characters to
341
+         * include when formatting. Set to `null` or `Infinity` to show all elements.
342
+         * Set to `0` or negative to show no characters.
343
+         * @default Infinity
344
+         */
345
+        maxStringLength?: number | null;
346
+        breakLength?: number;
347
+        /**
348
+         * Setting this to `false` causes each object key
349
+         * to be displayed on a new line. It will also add new lines to text that is
350
+         * longer than `breakLength`. If set to a number, the most `n` inner elements
351
+         * are united on a single line as long as all properties fit into
352
+         * `breakLength`. Short array elements are also grouped together. Note that no
353
+         * text will be reduced below 16 characters, no matter the `breakLength` size.
354
+         * For more information, see the example below.
355
+         * @default `true`
356
+         */
357
+        compact?: boolean | number;
358
+        sorted?: boolean | ((a: string, b: string) => number);
359
+    }
360
+
361
+    interface CallSite {
362
+        /**
363
+         * Value of "this"
364
+         */
365
+        getThis(): any;
366
+
367
+        /**
368
+         * Type of "this" as a string.
369
+         * This is the name of the function stored in the constructor field of
370
+         * "this", if available.  Otherwise the object's [[Class]] internal
371
+         * property.
372
+         */
373
+        getTypeName(): string | null;
374
+
375
+        /**
376
+         * Current function
377
+         */
378
+        getFunction(): Function | undefined;
379
+
380
+        /**
381
+         * Name of the current function, typically its name property.
382
+         * If a name property is not available an attempt will be made to try
383
+         * to infer a name from the function's context.
384
+         */
385
+        getFunctionName(): string | null;
386
+
387
+        /**
388
+         * Name of the property [of "this" or one of its prototypes] that holds
389
+         * the current function
390
+         */
391
+        getMethodName(): string | null;
392
+
393
+        /**
394
+         * Name of the script [if this function was defined in a script]
395
+         */
396
+        getFileName(): string | null;
397
+
398
+        /**
399
+         * Current line number [if this function was defined in a script]
400
+         */
401
+        getLineNumber(): number | null;
402
+
403
+        /**
404
+         * Current column number [if this function was defined in a script]
405
+         */
406
+        getColumnNumber(): number | null;
407
+
408
+        /**
409
+         * A call site object representing the location where eval was called
410
+         * [if this function was created using a call to eval]
411
+         */
412
+        getEvalOrigin(): string | undefined;
413
+
414
+        /**
415
+         * Is this a toplevel invocation, that is, is "this" the global object?
416
+         */
417
+        isToplevel(): boolean;
418
+
419
+        /**
420
+         * Does this call take place in code defined by a call to eval?
421
+         */
422
+        isEval(): boolean;
423
+
424
+        /**
425
+         * Is this call in native V8 code?
426
+         */
427
+        isNative(): boolean;
428
+
429
+        /**
430
+         * Is this a constructor call?
431
+         */
432
+        isConstructor(): boolean;
433
+    }
434
+
435
+    interface ErrnoException extends Error {
436
+        errno?: number;
437
+        code?: string;
438
+        path?: string;
439
+        syscall?: string;
440
+        stack?: string;
441
+    }
442
+
443
+    interface ReadableStream extends EventEmitter {
444
+        readable: boolean;
445
+        read(size?: number): string | Buffer;
446
+        setEncoding(encoding: BufferEncoding): this;
447
+        pause(): this;
448
+        resume(): this;
449
+        isPaused(): boolean;
450
+        pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
451
+        unpipe(destination?: WritableStream): this;
452
+        unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
453
+        wrap(oldStream: ReadableStream): this;
454
+        [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
455
+    }
456
+
457
+    interface WritableStream extends EventEmitter {
458
+        writable: boolean;
459
+        write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
460
+        write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
461
+        end(cb?: () => void): void;
462
+        end(data: string | Uint8Array, cb?: () => void): void;
463
+        end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
464
+    }
465
+
466
+    interface ReadWriteStream extends ReadableStream, WritableStream { }
467
+
468
+    interface Global {
469
+        Array: typeof Array;
470
+        ArrayBuffer: typeof ArrayBuffer;
471
+        Boolean: typeof Boolean;
472
+        Buffer: typeof Buffer;
473
+        DataView: typeof DataView;
474
+        Date: typeof Date;
475
+        Error: typeof Error;
476
+        EvalError: typeof EvalError;
477
+        Float32Array: typeof Float32Array;
478
+        Float64Array: typeof Float64Array;
479
+        Function: typeof Function;
480
+        Infinity: typeof Infinity;
481
+        Int16Array: typeof Int16Array;
482
+        Int32Array: typeof Int32Array;
483
+        Int8Array: typeof Int8Array;
484
+        Intl: typeof Intl;
485
+        JSON: typeof JSON;
486
+        Map: MapConstructor;
487
+        Math: typeof Math;
488
+        NaN: typeof NaN;
489
+        Number: typeof Number;
490
+        Object: typeof Object;
491
+        Promise: typeof Promise;
492
+        RangeError: typeof RangeError;
493
+        ReferenceError: typeof ReferenceError;
494
+        RegExp: typeof RegExp;
495
+        Set: SetConstructor;
496
+        String: typeof String;
497
+        Symbol: Function;
498
+        SyntaxError: typeof SyntaxError;
499
+        TypeError: typeof TypeError;
500
+        URIError: typeof URIError;
501
+        Uint16Array: typeof Uint16Array;
502
+        Uint32Array: typeof Uint32Array;
503
+        Uint8Array: typeof Uint8Array;
504
+        Uint8ClampedArray: typeof Uint8ClampedArray;
505
+        WeakMap: WeakMapConstructor;
506
+        WeakSet: WeakSetConstructor;
507
+        clearImmediate: (immediateId: Immediate) => void;
508
+        clearInterval: (intervalId: Timeout) => void;
509
+        clearTimeout: (timeoutId: Timeout) => void;
510
+        decodeURI: typeof decodeURI;
511
+        decodeURIComponent: typeof decodeURIComponent;
512
+        encodeURI: typeof encodeURI;
513
+        encodeURIComponent: typeof encodeURIComponent;
514
+        escape: (str: string) => string;
515
+        eval: typeof eval;
516
+        global: Global;
517
+        isFinite: typeof isFinite;
518
+        isNaN: typeof isNaN;
519
+        parseFloat: typeof parseFloat;
520
+        parseInt: typeof parseInt;
521
+        setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
522
+        setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
523
+        setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
524
+        queueMicrotask: typeof queueMicrotask;
525
+        undefined: typeof undefined;
526
+        unescape: (str: string) => string;
527
+        gc: () => void;
528
+        v8debug?: any;
529
+    }
530
+
531
+    interface RefCounted {
532
+        ref(): this;
533
+        unref(): this;
534
+    }
535
+
536
+    // compatibility with older typings
537
+    interface Timer extends RefCounted {
538
+        hasRef(): boolean;
539
+        refresh(): this;
540
+        [Symbol.toPrimitive](): number;
541
+    }
542
+
543
+    interface Immediate extends RefCounted {
544
+        hasRef(): boolean;
545
+        _onImmediate: Function; // to distinguish it from the Timeout class
546
+    }
547
+
548
+    interface Timeout extends Timer {
549
+        hasRef(): boolean;
550
+        refresh(): this;
551
+        [Symbol.toPrimitive](): number;
552
+    }
553
+
554
+    type TypedArray =
555
+        | Uint8Array
556
+        | Uint8ClampedArray
557
+        | Uint16Array
558
+        | Uint32Array
559
+        | Int8Array
560
+        | Int16Array
561
+        | Int32Array
562
+        | BigUint64Array
563
+        | BigInt64Array
564
+        | Float32Array
565
+        | Float64Array;
566
+    type ArrayBufferView = TypedArray | DataView;
567
+
568
+    interface Require {
569
+        (id: string): any;
570
+        resolve: RequireResolve;
571
+        cache: Dict<NodeModule>;
572
+        /**
573
+         * @deprecated
574
+         */
575
+        extensions: RequireExtensions;
576
+        main: Module | undefined;
577
+    }
578
+
579
+    interface RequireResolve {
580
+        (id: string, options?: { paths?: string[]; }): string;
581
+        paths(request: string): string[] | null;
582
+    }
583
+
584
+    interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
585
+        '.js': (m: Module, filename: string) => any;
586
+        '.json': (m: Module, filename: string) => any;
587
+        '.node': (m: Module, filename: string) => any;
588
+    }
589
+    interface Module {
590
+        exports: any;
591
+        require: Require;
592
+        id: string;
593
+        filename: string;
594
+        loaded: boolean;
595
+        /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
596
+        parent: Module | null | undefined;
597
+        children: Module[];
598
+        /**
599
+         * @since 11.14.0
600
+         *
601
+         * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
602
+         */
603
+        path: string;
604
+        paths: string[];
605
+    }
606
+
607
+    interface Dict<T> {
608
+        [key: string]: T | undefined;
609
+    }
610
+
611
+    interface ReadOnlyDict<T> {
612
+        readonly [key: string]: T | undefined;
613
+    }
614
+}
... ...
@@ -0,0 +1 @@
1
+declare var global: NodeJS.Global & typeof globalThis;
... ...
@@ -0,0 +1,427 @@
1
+declare module 'node:http' {
2
+    export * from 'http';
3
+}
4
+
5
+declare module 'http' {
6
+    import * as stream from 'node:stream';
7
+    import { URL } from 'node:url';
8
+    import { Socket, Server as NetServer } from 'node:net';
9
+
10
+    // incoming headers will never contain number
11
+    interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
12
+        'accept'?: string;
13
+        'accept-language'?: string;
14
+        'accept-patch'?: string;
15
+        'accept-ranges'?: string;
16
+        'access-control-allow-credentials'?: string;
17
+        'access-control-allow-headers'?: string;
18
+        'access-control-allow-methods'?: string;
19
+        'access-control-allow-origin'?: string;
20
+        'access-control-expose-headers'?: string;
21
+        'access-control-max-age'?: string;
22
+        'access-control-request-headers'?: string;
23
+        'access-control-request-method'?: string;
24
+        'age'?: string;
25
+        'allow'?: string;
26
+        'alt-svc'?: string;
27
+        'authorization'?: string;
28
+        'cache-control'?: string;
29
+        'connection'?: string;
30
+        'content-disposition'?: string;
31
+        'content-encoding'?: string;
32
+        'content-language'?: string;
33
+        'content-length'?: string;
34
+        'content-location'?: string;
35
+        'content-range'?: string;
36
+        'content-type'?: string;
37
+        'cookie'?: string;
38
+        'date'?: string;
39
+        'expect'?: string;
40
+        'expires'?: string;
41
+        'forwarded'?: string;
42
+        'from'?: string;
43
+        'host'?: string;
44
+        'if-match'?: string;
45
+        'if-modified-since'?: string;
46
+        'if-none-match'?: string;
47
+        'if-unmodified-since'?: string;
48
+        'last-modified'?: string;
49
+        'location'?: string;
50
+        'origin'?: string;
51
+        'pragma'?: string;
52
+        'proxy-authenticate'?: string;
53
+        'proxy-authorization'?: string;
54
+        'public-key-pins'?: string;
55
+        'range'?: string;
56
+        'referer'?: string;
57
+        'retry-after'?: string;
58
+        'sec-websocket-accept'?: string;
59
+        'sec-websocket-extensions'?: string;
60
+        'sec-websocket-key'?: string;
61
+        'sec-websocket-protocol'?: string;
62
+        'sec-websocket-version'?: string;
63
+        'set-cookie'?: string[];
64
+        'strict-transport-security'?: string;
65
+        'tk'?: string;
66
+        'trailer'?: string;
67
+        'transfer-encoding'?: string;
68
+        'upgrade'?: string;
69
+        'user-agent'?: string;
70
+        'vary'?: string;
71
+        'via'?: string;
72
+        'warning'?: string;
73
+        'www-authenticate'?: string;
74
+    }
75
+
76
+    // outgoing headers allows numbers (as they are converted internally to strings)
77
+    type OutgoingHttpHeader = number | string | string[];
78
+
79
+    interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
80
+    }
81
+
82
+    interface ClientRequestArgs {
83
+        protocol?: string | null;
84
+        host?: string | null;
85
+        hostname?: string | null;
86
+        family?: number;
87
+        port?: number | string | null;
88
+        defaultPort?: number | string;
89
+        localAddress?: string;
90
+        socketPath?: string;
91
+        /**
92
+         * @default 8192
93
+         */
94
+        maxHeaderSize?: number;
95
+        method?: string;
96
+        path?: string | null;
97
+        headers?: OutgoingHttpHeaders;
98
+        auth?: string | null;
99
+        agent?: Agent | boolean;
100
+        _defaultAgent?: Agent;
101
+        timeout?: number;
102
+        setHost?: boolean;
103
+        // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
104
+        createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket;
105
+    }
106
+
107
+    interface ServerOptions {
108
+        IncomingMessage?: typeof IncomingMessage;
109
+        ServerResponse?: typeof ServerResponse;
110
+        /**
111
+         * Optionally overrides the value of
112
+         * [`--max-http-header-size`][] for requests received by this server, i.e.
113
+         * the maximum length of request headers in bytes.
114
+         * @default 8192
115
+         */
116
+        maxHeaderSize?: number;
117
+        /**
118
+         * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
119
+         * Using the insecure parser should be avoided.
120
+         * See --insecure-http-parser for more information.
121
+         * @default false
122
+         */
123
+        insecureHTTPParser?: boolean;
124
+    }
125
+
126
+    type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
127
+
128
+    interface HttpBase {
129
+        setTimeout(msecs?: number, callback?: () => void): this;
130
+        setTimeout(callback: () => void): this;
131
+        /**
132
+         * Limits maximum incoming headers count. If set to 0, no limit will be applied.
133
+         * @default 2000
134
+         * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
135
+         */
136
+        maxHeadersCount: number | null;
137
+        timeout: number;
138
+        /**
139
+         * Limit the amount of time the parser will wait to receive the complete HTTP headers.
140
+         * @default 60000
141
+         * {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
142
+         */
143
+        headersTimeout: number;
144
+        keepAliveTimeout: number;
145
+        /**
146
+         * Sets the timeout value in milliseconds for receiving the entire request from the client.
147
+         * @default 0
148
+         * {@link https://nodejs.org/api/http.html#http_server_requesttimeout}
149
+         */
150
+        requestTimeout: number;
151
+    }
152
+
153
+    interface Server extends HttpBase {}
154
+    class Server extends NetServer {
155
+        constructor(requestListener?: RequestListener);
156
+        constructor(options: ServerOptions, requestListener?: RequestListener);
157
+    }
158
+
159
+    // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js
160
+    class OutgoingMessage extends stream.Writable {
161
+        upgrading: boolean;
162
+        chunkedEncoding: boolean;
163
+        shouldKeepAlive: boolean;
164
+        useChunkedEncodingByDefault: boolean;
165
+        sendDate: boolean;
166
+        /**
167
+         * @deprecated Use `writableEnded` instead.
168
+         */
169
+        finished: boolean;
170
+        headersSent: boolean;
171
+        /**
172
+         * @deprecate Use `socket` instead.
173
+         */
174
+        connection: Socket | null;
175
+        socket: Socket | null;
176
+
177
+        constructor();
178
+
179
+        setTimeout(msecs: number, callback?: () => void): this;
180
+        setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
181
+        getHeader(name: string): number | string | string[] | undefined;
182
+        getHeaders(): OutgoingHttpHeaders;
183
+        getHeaderNames(): string[];
184
+        hasHeader(name: string): boolean;
185
+        removeHeader(name: string): void;
186
+        addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
187
+        flushHeaders(): void;
188
+    }
189
+
190
+    // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256
191
+    class ServerResponse extends OutgoingMessage {
192
+        statusCode: number;
193
+        statusMessage: string;
194
+
195
+        constructor(req: IncomingMessage);
196
+
197
+        assignSocket(socket: Socket): void;
198
+        detachSocket(socket: Socket): void;
199
+        // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
200
+        // no args in writeContinue callback
201
+        writeContinue(callback?: () => void): void;
202
+        writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
203
+        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
204
+        writeProcessing(): void;
205
+    }
206
+
207
+    interface InformationEvent {
208
+        statusCode: number;
209
+        statusMessage: string;
210
+        httpVersion: string;
211
+        httpVersionMajor: number;
212
+        httpVersionMinor: number;
213
+        headers: IncomingHttpHeaders;
214
+        rawHeaders: string[];
215
+    }
216
+
217
+    // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
218
+    class ClientRequest extends OutgoingMessage {
219
+        aborted: boolean;
220
+        host: string;
221
+        protocol: string;
222
+
223
+        constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
224
+
225
+        method: string;
226
+        path: string;
227
+        /** @deprecated since v14.1.0 Use `request.destroy()` instead. */
228
+        abort(): void;
229
+        onSocket(socket: Socket): void;
230
+        setTimeout(timeout: number, callback?: () => void): this;
231
+        setNoDelay(noDelay?: boolean): void;
232
+        setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
233
+
234
+        addListener(event: 'abort', listener: () => void): this;
235
+        addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
236
+        addListener(event: 'continue', listener: () => void): this;
237
+        addListener(event: 'information', listener: (info: InformationEvent) => void): this;
238
+        addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
239
+        addListener(event: 'socket', listener: (socket: Socket) => void): this;
240
+        addListener(event: 'timeout', listener: () => void): this;
241
+        addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
242
+        addListener(event: 'close', listener: () => void): this;
243
+        addListener(event: 'drain', listener: () => void): this;
244
+        addListener(event: 'error', listener: (err: Error) => void): this;
245
+        addListener(event: 'finish', listener: () => void): this;
246
+        addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
247
+        addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
248
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
249
+
250
+        on(event: 'abort', listener: () => void): this;
251
+        on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
252
+        on(event: 'continue', listener: () => void): this;
253
+        on(event: 'information', listener: (info: InformationEvent) => void): this;
254
+        on(event: 'response', listener: (response: IncomingMessage) => void): this;
255
+        on(event: 'socket', listener: (socket: Socket) => void): this;
256
+        on(event: 'timeout', listener: () => void): this;
257
+        on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
258
+        on(event: 'close', listener: () => void): this;
259
+        on(event: 'drain', listener: () => void): this;
260
+        on(event: 'error', listener: (err: Error) => void): this;
261
+        on(event: 'finish', listener: () => void): this;
262
+        on(event: 'pipe', listener: (src: stream.Readable) => void): this;
263
+        on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
264
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
265
+
266
+        once(event: 'abort', listener: () => void): this;
267
+        once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
268
+        once(event: 'continue', listener: () => void): this;
269
+        once(event: 'information', listener: (info: InformationEvent) => void): this;
270
+        once(event: 'response', listener: (response: IncomingMessage) => void): this;
271
+        once(event: 'socket', listener: (socket: Socket) => void): this;
272
+        once(event: 'timeout', listener: () => void): this;
273
+        once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
274
+        once(event: 'close', listener: () => void): this;
275
+        once(event: 'drain', listener: () => void): this;
276
+        once(event: 'error', listener: (err: Error) => void): this;
277
+        once(event: 'finish', listener: () => void): this;
278
+        once(event: 'pipe', listener: (src: stream.Readable) => void): this;
279
+        once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
280
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
281
+
282
+        prependListener(event: 'abort', listener: () => void): this;
283
+        prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
284
+        prependListener(event: 'continue', listener: () => void): this;
285
+        prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
286
+        prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
287
+        prependListener(event: 'socket', listener: (socket: Socket) => void): this;
288
+        prependListener(event: 'timeout', listener: () => void): this;
289
+        prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
290
+        prependListener(event: 'close', listener: () => void): this;
291
+        prependListener(event: 'drain', listener: () => void): this;
292
+        prependListener(event: 'error', listener: (err: Error) => void): this;
293
+        prependListener(event: 'finish', listener: () => void): this;
294
+        prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
295
+        prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
296
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
297
+
298
+        prependOnceListener(event: 'abort', listener: () => void): this;
299
+        prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
300
+        prependOnceListener(event: 'continue', listener: () => void): this;
301
+        prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
302
+        prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
303
+        prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
304
+        prependOnceListener(event: 'timeout', listener: () => void): this;
305
+        prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
306
+        prependOnceListener(event: 'close', listener: () => void): this;
307
+        prependOnceListener(event: 'drain', listener: () => void): this;
308
+        prependOnceListener(event: 'error', listener: (err: Error) => void): this;
309
+        prependOnceListener(event: 'finish', listener: () => void): this;
310
+        prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
311
+        prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
312
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
313
+    }
314
+
315
+    class IncomingMessage extends stream.Readable {
316
+        constructor(socket: Socket);
317
+
318
+        aborted: boolean;
319
+        httpVersion: string;
320
+        httpVersionMajor: number;
321
+        httpVersionMinor: number;
322
+        complete: boolean;
323
+        /**
324
+         * @deprecated since v13.0.0 - Use `socket` instead.
325
+         */
326
+        connection: Socket;
327
+        socket: Socket;
328
+        headers: IncomingHttpHeaders;
329
+        rawHeaders: string[];
330
+        trailers: NodeJS.Dict<string>;
331
+        rawTrailers: string[];
332
+        setTimeout(msecs: number, callback?: () => void): this;
333
+        /**
334
+         * Only valid for request obtained from http.Server.
335
+         */
336
+        method?: string;
337
+        /**
338
+         * Only valid for request obtained from http.Server.
339
+         */
340
+        url?: string;
341
+        /**
342
+         * Only valid for response obtained from http.ClientRequest.
343
+         */
344
+        statusCode?: number;
345
+        /**
346
+         * Only valid for response obtained from http.ClientRequest.
347
+         */
348
+        statusMessage?: string;
349
+        destroy(error?: Error): void;
350
+    }
351
+
352
+    interface AgentOptions {
353
+        /**
354
+         * Keep sockets around in a pool to be used by other requests in the future. Default = false
355
+         */
356
+        keepAlive?: boolean;
357
+        /**
358
+         * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
359
+         * Only relevant if keepAlive is set to true.
360
+         */
361
+        keepAliveMsecs?: number;
362
+        /**
363
+         * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
364
+         */
365
+        maxSockets?: number;
366
+        /**
367
+         * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
368
+         */
369
+        maxTotalSockets?: number;
370
+        /**
371
+         * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
372
+         */
373
+        maxFreeSockets?: number;
374
+        /**
375
+         * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
376
+         */
377
+        timeout?: number;
378
+        /**
379
+         * Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
380
+         */
381
+        scheduling?: 'fifo' | 'lifo';
382
+    }
383
+
384
+    class Agent {
385
+        maxFreeSockets: number;
386
+        maxSockets: number;
387
+        maxTotalSockets: number;
388
+        readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
389
+        readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
390
+        readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
391
+
392
+        constructor(opts?: AgentOptions);
393
+
394
+        /**
395
+         * Destroy any sockets that are currently in use by the agent.
396
+         * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
397
+         * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
398
+         * sockets may hang open for quite a long time before the server terminates them.
399
+         */
400
+        destroy(): void;
401
+    }
402
+
403
+    const METHODS: string[];
404
+
405
+    const STATUS_CODES: {
406
+        [errorCode: number]: string | undefined;
407
+        [errorCode: string]: string | undefined;
408
+    };
409
+
410
+    function createServer(requestListener?: RequestListener): Server;
411
+    function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
412
+
413
+    // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
414
+    // create interface RequestOptions would make the naming more clear to developers
415
+    interface RequestOptions extends ClientRequestArgs { }
416
+    function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
417
+    function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
418
+    function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
419
+    function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
420
+    let globalAgent: Agent;
421
+
422
+    /**
423
+     * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
424
+     * Defaults to 16KB. Configurable using the [`--max-http-header-size`][] CLI option.
425
+     */
426
+    const maxHeaderSize: number;
427
+}
... ...
@@ -0,0 +1,962 @@
1
+declare module 'node:http2' {
2
+    export * from 'http2';
3
+}
4
+
5
+declare module 'http2' {
6
+    import EventEmitter = require('node:events');
7
+    import * as fs from 'node:fs';
8
+    import * as net from 'node:net';
9
+    import * as stream from 'node:stream';
10
+    import * as tls from 'node:tls';
11
+    import * as url from 'node:url';
12
+
13
+    import {
14
+        IncomingHttpHeaders as Http1IncomingHttpHeaders,
15
+        OutgoingHttpHeaders,
16
+        IncomingMessage,
17
+        ServerResponse,
18
+    } from 'node:http';
19
+    export { OutgoingHttpHeaders } from 'node:http';
20
+
21
+    export interface IncomingHttpStatusHeader {
22
+        ":status"?: number;
23
+    }
24
+
25
+    export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
26
+        ":path"?: string;
27
+        ":method"?: string;
28
+        ":authority"?: string;
29
+        ":scheme"?: string;
30
+    }
31
+
32
+    // Http2Stream
33
+
34
+    export interface StreamPriorityOptions {
35
+        exclusive?: boolean;
36
+        parent?: number;
37
+        weight?: number;
38
+        silent?: boolean;
39
+    }
40
+
41
+    export interface StreamState {
42
+        localWindowSize?: number;
43
+        state?: number;
44
+        localClose?: number;
45
+        remoteClose?: number;
46
+        sumDependencyWeight?: number;
47
+        weight?: number;
48
+    }
49
+
50
+    export interface ServerStreamResponseOptions {
51
+        endStream?: boolean;
52
+        waitForTrailers?: boolean;
53
+    }
54
+
55
+    export interface StatOptions {
56
+        offset: number;
57
+        length: number;
58
+    }
59
+
60
+    export interface ServerStreamFileResponseOptions {
61
+        statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
62
+        waitForTrailers?: boolean;
63
+        offset?: number;
64
+        length?: number;
65
+    }
66
+
67
+    export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
68
+        onError?(err: NodeJS.ErrnoException): void;
69
+    }
70
+
71
+    export interface Http2Stream extends stream.Duplex {
72
+        readonly aborted: boolean;
73
+        readonly bufferSize: number;
74
+        readonly closed: boolean;
75
+        readonly destroyed: boolean;
76
+        /**
77
+         * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received,
78
+         * indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
79
+         */
80
+        readonly endAfterHeaders: boolean;
81
+        readonly id?: number;
82
+        readonly pending: boolean;
83
+        readonly rstCode: number;
84
+        readonly sentHeaders: OutgoingHttpHeaders;
85
+        readonly sentInfoHeaders?: OutgoingHttpHeaders[];
86
+        readonly sentTrailers?: OutgoingHttpHeaders;
87
+        readonly session: Http2Session;
88
+        readonly state: StreamState;
89
+
90
+        close(code?: number, callback?: () => void): void;
91
+        priority(options: StreamPriorityOptions): void;
92
+        setTimeout(msecs: number, callback?: () => void): void;
93
+        sendTrailers(headers: OutgoingHttpHeaders): void;
94
+
95
+        addListener(event: "aborted", listener: () => void): this;
96
+        addListener(event: "close", listener: () => void): this;
97
+        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
98
+        addListener(event: "drain", listener: () => void): this;
99
+        addListener(event: "end", listener: () => void): this;
100
+        addListener(event: "error", listener: (err: Error) => void): this;
101
+        addListener(event: "finish", listener: () => void): this;
102
+        addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
103
+        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
104
+        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
105
+        addListener(event: "streamClosed", listener: (code: number) => void): this;
106
+        addListener(event: "timeout", listener: () => void): this;
107
+        addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
108
+        addListener(event: "wantTrailers", listener: () => void): this;
109
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
110
+
111
+        emit(event: "aborted"): boolean;
112
+        emit(event: "close"): boolean;
113
+        emit(event: "data", chunk: Buffer | string): boolean;
114
+        emit(event: "drain"): boolean;
115
+        emit(event: "end"): boolean;
116
+        emit(event: "error", err: Error): boolean;
117
+        emit(event: "finish"): boolean;
118
+        emit(event: "frameError", frameType: number, errorCode: number): boolean;
119
+        emit(event: "pipe", src: stream.Readable): boolean;
120
+        emit(event: "unpipe", src: stream.Readable): boolean;
121
+        emit(event: "streamClosed", code: number): boolean;
122
+        emit(event: "timeout"): boolean;
123
+        emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean;
124
+        emit(event: "wantTrailers"): boolean;
125
+        emit(event: string | symbol, ...args: any[]): boolean;
126
+
127
+        on(event: "aborted", listener: () => void): this;
128
+        on(event: "close", listener: () => void): this;
129
+        on(event: "data", listener: (chunk: Buffer | string) => void): this;
130
+        on(event: "drain", listener: () => void): this;
131
+        on(event: "end", listener: () => void): this;
132
+        on(event: "error", listener: (err: Error) => void): this;
133
+        on(event: "finish", listener: () => void): this;
134
+        on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
135
+        on(event: "pipe", listener: (src: stream.Readable) => void): this;
136
+        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
137
+        on(event: "streamClosed", listener: (code: number) => void): this;
138
+        on(event: "timeout", listener: () => void): this;
139
+        on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
140
+        on(event: "wantTrailers", listener: () => void): this;
141
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
142
+
143
+        once(event: "aborted", listener: () => void): this;
144
+        once(event: "close", listener: () => void): this;
145
+        once(event: "data", listener: (chunk: Buffer | string) => void): this;
146
+        once(event: "drain", listener: () => void): this;
147
+        once(event: "end", listener: () => void): this;
148
+        once(event: "error", listener: (err: Error) => void): this;
149
+        once(event: "finish", listener: () => void): this;
150
+        once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
151
+        once(event: "pipe", listener: (src: stream.Readable) => void): this;
152
+        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
153
+        once(event: "streamClosed", listener: (code: number) => void): this;
154
+        once(event: "timeout", listener: () => void): this;
155
+        once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
156
+        once(event: "wantTrailers", listener: () => void): this;
157
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
158
+
159
+        prependListener(event: "aborted", listener: () => void): this;
160
+        prependListener(event: "close", listener: () => void): this;
161
+        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
162
+        prependListener(event: "drain", listener: () => void): this;
163
+        prependListener(event: "end", listener: () => void): this;
164
+        prependListener(event: "error", listener: (err: Error) => void): this;
165
+        prependListener(event: "finish", listener: () => void): this;
166
+        prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
167
+        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
168
+        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
169
+        prependListener(event: "streamClosed", listener: (code: number) => void): this;
170
+        prependListener(event: "timeout", listener: () => void): this;
171
+        prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
172
+        prependListener(event: "wantTrailers", listener: () => void): this;
173
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
174
+
175
+        prependOnceListener(event: "aborted", listener: () => void): this;
176
+        prependOnceListener(event: "close", listener: () => void): this;
177
+        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
178
+        prependOnceListener(event: "drain", listener: () => void): this;
179
+        prependOnceListener(event: "end", listener: () => void): this;
180
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
181
+        prependOnceListener(event: "finish", listener: () => void): this;
182
+        prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
183
+        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
184
+        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
185
+        prependOnceListener(event: "streamClosed", listener: (code: number) => void): this;
186
+        prependOnceListener(event: "timeout", listener: () => void): this;
187
+        prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
188
+        prependOnceListener(event: "wantTrailers", listener: () => void): this;
189
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
190
+    }
191
+
192
+    export interface ClientHttp2Stream extends Http2Stream {
193
+        addListener(event: "continue", listener: () => {}): this;
194
+        addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
195
+        addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
196
+        addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
197
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
198
+
199
+        emit(event: "continue"): boolean;
200
+        emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
201
+        emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean;
202
+        emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
203
+        emit(event: string | symbol, ...args: any[]): boolean;
204
+
205
+        on(event: "continue", listener: () => {}): this;
206
+        on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
207
+        on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
208
+        on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
209
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
210
+
211
+        once(event: "continue", listener: () => {}): this;
212
+        once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
213
+        once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
214
+        once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
215
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
216
+
217
+        prependListener(event: "continue", listener: () => {}): this;
218
+        prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
219
+        prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
220
+        prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
221
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
222
+
223
+        prependOnceListener(event: "continue", listener: () => {}): this;
224
+        prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
225
+        prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
226
+        prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
227
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
228
+    }
229
+
230
+    export interface ServerHttp2Stream extends Http2Stream {
231
+        readonly headersSent: boolean;
232
+        readonly pushAllowed: boolean;
233
+        additionalHeaders(headers: OutgoingHttpHeaders): void;
234
+        pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
235
+        pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
236
+        respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
237
+        respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
238
+        respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
239
+    }
240
+
241
+    // Http2Session
242
+
243
+    export interface Settings {
244
+        headerTableSize?: number;
245
+        enablePush?: boolean;
246
+        initialWindowSize?: number;
247
+        maxFrameSize?: number;
248
+        maxConcurrentStreams?: number;
249
+        maxHeaderListSize?: number;
250
+        enableConnectProtocol?: boolean;
251
+    }
252
+
253
+    export interface ClientSessionRequestOptions {
254
+        endStream?: boolean;
255
+        exclusive?: boolean;
256
+        parent?: number;
257
+        weight?: number;
258
+        waitForTrailers?: boolean;
259
+    }
260
+
261
+    export interface SessionState {
262
+        effectiveLocalWindowSize?: number;
263
+        effectiveRecvDataLength?: number;
264
+        nextStreamID?: number;
265
+        localWindowSize?: number;
266
+        lastProcStreamID?: number;
267
+        remoteWindowSize?: number;
268
+        outboundQueueSize?: number;
269
+        deflateDynamicTableSize?: number;
270
+        inflateDynamicTableSize?: number;
271
+    }
272
+
273
+    export interface Http2Session extends EventEmitter {
274
+        readonly alpnProtocol?: string;
275
+        readonly closed: boolean;
276
+        readonly connecting: boolean;
277
+        readonly destroyed: boolean;
278
+        readonly encrypted?: boolean;
279
+        readonly localSettings: Settings;
280
+        readonly originSet?: string[];
281
+        readonly pendingSettingsAck: boolean;
282
+        readonly remoteSettings: Settings;
283
+        readonly socket: net.Socket | tls.TLSSocket;
284
+        readonly state: SessionState;
285
+        readonly type: number;
286
+
287
+        close(callback?: () => void): void;
288
+        destroy(error?: Error, code?: number): void;
289
+        goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
290
+        ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
291
+        ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
292
+        ref(): void;
293
+        setLocalWindowSize(windowSize: number): void;
294
+        setTimeout(msecs: number, callback?: () => void): void;
295
+        settings(settings: Settings): void;
296
+        unref(): void;
297
+
298
+        addListener(event: "close", listener: () => void): this;
299
+        addListener(event: "error", listener: (err: Error) => void): this;
300
+        addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
301
+        addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
302
+        addListener(event: "localSettings", listener: (settings: Settings) => void): this;
303
+        addListener(event: "ping", listener: () => void): this;
304
+        addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
305
+        addListener(event: "timeout", listener: () => void): this;
306
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
307
+
308
+        emit(event: "close"): boolean;
309
+        emit(event: "error", err: Error): boolean;
310
+        emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean;
311
+        emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
312
+        emit(event: "localSettings", settings: Settings): boolean;
313
+        emit(event: "ping"): boolean;
314
+        emit(event: "remoteSettings", settings: Settings): boolean;
315
+        emit(event: "timeout"): boolean;
316
+        emit(event: string | symbol, ...args: any[]): boolean;
317
+
318
+        on(event: "close", listener: () => void): this;
319
+        on(event: "error", listener: (err: Error) => void): this;
320
+        on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
321
+        on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
322
+        on(event: "localSettings", listener: (settings: Settings) => void): this;
323
+        on(event: "ping", listener: () => void): this;
324
+        on(event: "remoteSettings", listener: (settings: Settings) => void): this;
325
+        on(event: "timeout", listener: () => void): this;
326
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
327
+
328
+        once(event: "close", listener: () => void): this;
329
+        once(event: "error", listener: (err: Error) => void): this;
330
+        once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
331
+        once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
332
+        once(event: "localSettings", listener: (settings: Settings) => void): this;
333
+        once(event: "ping", listener: () => void): this;
334
+        once(event: "remoteSettings", listener: (settings: Settings) => void): this;
335
+        once(event: "timeout", listener: () => void): this;
336
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
337
+
338
+        prependListener(event: "close", listener: () => void): this;
339
+        prependListener(event: "error", listener: (err: Error) => void): this;
340
+        prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
341
+        prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
342
+        prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
343
+        prependListener(event: "ping", listener: () => void): this;
344
+        prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
345
+        prependListener(event: "timeout", listener: () => void): this;
346
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
347
+
348
+        prependOnceListener(event: "close", listener: () => void): this;
349
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
350
+        prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
351
+        prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
352
+        prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
353
+        prependOnceListener(event: "ping", listener: () => void): this;
354
+        prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
355
+        prependOnceListener(event: "timeout", listener: () => void): this;
356
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
357
+    }
358
+
359
+    export interface ClientHttp2Session extends Http2Session {
360
+        request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
361
+
362
+        addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
363
+        addListener(event: "origin", listener: (origins: string[]) => void): this;
364
+        addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
365
+        addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
366
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
367
+
368
+        emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
369
+        emit(event: "origin", origins: ReadonlyArray<string>): boolean;
370
+        emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
371
+        emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
372
+        emit(event: string | symbol, ...args: any[]): boolean;
373
+
374
+        on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
375
+        on(event: "origin", listener: (origins: string[]) => void): this;
376
+        on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
377
+        on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
378
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
379
+
380
+        once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
381
+        once(event: "origin", listener: (origins: string[]) => void): this;
382
+        once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
383
+        once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
384
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
385
+
386
+        prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
387
+        prependListener(event: "origin", listener: (origins: string[]) => void): this;
388
+        prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
389
+        prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
390
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
391
+
392
+        prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
393
+        prependOnceListener(event: "origin", listener: (origins: string[]) => void): this;
394
+        prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
395
+        prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
396
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
397
+    }
398
+
399
+    export interface AlternativeServiceOptions {
400
+        origin: number | string | url.URL;
401
+    }
402
+
403
+    export interface ServerHttp2Session extends Http2Session {
404
+        readonly server: Http2Server | Http2SecureServer;
405
+
406
+        altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
407
+        origin(...args: Array<string | url.URL | { origin: string }>): void;
408
+
409
+        addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
410
+        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
411
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
412
+
413
+        emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
414
+        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
415
+        emit(event: string | symbol, ...args: any[]): boolean;
416
+
417
+        on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
418
+        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
419
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
420
+
421
+        once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
422
+        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
423
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
424
+
425
+        prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
426
+        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
427
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
428
+
429
+        prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
430
+        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
431
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
432
+    }
433
+
434
+    // Http2Server
435
+
436
+    export interface SessionOptions {
437
+        maxDeflateDynamicTableSize?: number;
438
+        maxSessionMemory?: number;
439
+        maxHeaderListPairs?: number;
440
+        maxOutstandingPings?: number;
441
+        maxSendHeaderBlockLength?: number;
442
+        paddingStrategy?: number;
443
+        peerMaxConcurrentStreams?: number;
444
+        settings?: Settings;
445
+
446
+        selectPadding?(frameLen: number, maxFrameLen: number): number;
447
+        createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
448
+    }
449
+
450
+    export interface ClientSessionOptions extends SessionOptions {
451
+        maxReservedRemoteStreams?: number;
452
+        createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
453
+        protocol?: 'http:' | 'https:';
454
+    }
455
+
456
+    export interface ServerSessionOptions extends SessionOptions {
457
+        Http1IncomingMessage?: typeof IncomingMessage;
458
+        Http1ServerResponse?: typeof ServerResponse;
459
+        Http2ServerRequest?: typeof Http2ServerRequest;
460
+        Http2ServerResponse?: typeof Http2ServerResponse;
461
+    }
462
+
463
+    export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
464
+    export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
465
+
466
+    export interface ServerOptions extends ServerSessionOptions { }
467
+
468
+    export interface SecureServerOptions extends SecureServerSessionOptions {
469
+        allowHTTP1?: boolean;
470
+        origins?: string[];
471
+    }
472
+
473
+    export interface Http2Server extends net.Server {
474
+        addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
475
+        addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
476
+        addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
477
+        addListener(event: "sessionError", listener: (err: Error) => void): this;
478
+        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
479
+        addListener(event: "timeout", listener: () => void): this;
480
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
481
+
482
+        emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
483
+        emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
484
+        emit(event: "session", session: ServerHttp2Session): boolean;
485
+        emit(event: "sessionError", err: Error): boolean;
486
+        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
487
+        emit(event: "timeout"): boolean;
488
+        emit(event: string | symbol, ...args: any[]): boolean;
489
+
490
+        on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
491
+        on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
492
+        on(event: "session", listener: (session: ServerHttp2Session) => void): this;
493
+        on(event: "sessionError", listener: (err: Error) => void): this;
494
+        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
495
+        on(event: "timeout", listener: () => void): this;
496
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
497
+
498
+        once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
499
+        once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
500
+        once(event: "session", listener: (session: ServerHttp2Session) => void): this;
501
+        once(event: "sessionError", listener: (err: Error) => void): this;
502
+        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
503
+        once(event: "timeout", listener: () => void): this;
504
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
505
+
506
+        prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
507
+        prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
508
+        prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
509
+        prependListener(event: "sessionError", listener: (err: Error) => void): this;
510
+        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
511
+        prependListener(event: "timeout", listener: () => void): this;
512
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
513
+
514
+        prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
515
+        prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
516
+        prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
517
+        prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
518
+        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
519
+        prependOnceListener(event: "timeout", listener: () => void): this;
520
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
521
+
522
+        setTimeout(msec?: number, callback?: () => void): this;
523
+    }
524
+
525
+    export interface Http2SecureServer extends tls.Server {
526
+        addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
527
+        addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
528
+        addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
529
+        addListener(event: "sessionError", listener: (err: Error) => void): this;
530
+        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
531
+        addListener(event: "timeout", listener: () => void): this;
532
+        addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
533
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
534
+
535
+        emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
536
+        emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
537
+        emit(event: "session", session: ServerHttp2Session): boolean;
538
+        emit(event: "sessionError", err: Error): boolean;
539
+        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
540
+        emit(event: "timeout"): boolean;
541
+        emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
542
+        emit(event: string | symbol, ...args: any[]): boolean;
543
+
544
+        on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
545
+        on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
546
+        on(event: "session", listener: (session: ServerHttp2Session) => void): this;
547
+        on(event: "sessionError", listener: (err: Error) => void): this;
548
+        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
549
+        on(event: "timeout", listener: () => void): this;
550
+        on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
551
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
552
+
553
+        once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
554
+        once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
555
+        once(event: "session", listener: (session: ServerHttp2Session) => void): this;
556
+        once(event: "sessionError", listener: (err: Error) => void): this;
557
+        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
558
+        once(event: "timeout", listener: () => void): this;
559
+        once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
560
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
561
+
562
+        prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
563
+        prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
564
+        prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
565
+        prependListener(event: "sessionError", listener: (err: Error) => void): this;
566
+        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
567
+        prependListener(event: "timeout", listener: () => void): this;
568
+        prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
569
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
570
+
571
+        prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
572
+        prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
573
+        prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
574
+        prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
575
+        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
576
+        prependOnceListener(event: "timeout", listener: () => void): this;
577
+        prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
578
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
579
+
580
+        setTimeout(msec?: number, callback?: () => void): this;
581
+    }
582
+
583
+    export class Http2ServerRequest extends stream.Readable {
584
+        constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
585
+
586
+        readonly aborted: boolean;
587
+        readonly authority: string;
588
+        readonly connection: net.Socket | tls.TLSSocket;
589
+        readonly complete: boolean;
590
+        readonly headers: IncomingHttpHeaders;
591
+        readonly httpVersion: string;
592
+        readonly httpVersionMinor: number;
593
+        readonly httpVersionMajor: number;
594
+        readonly method: string;
595
+        readonly rawHeaders: string[];
596
+        readonly rawTrailers: string[];
597
+        readonly scheme: string;
598
+        readonly socket: net.Socket | tls.TLSSocket;
599
+        readonly stream: ServerHttp2Stream;
600
+        readonly trailers: IncomingHttpHeaders;
601
+        readonly url: string;
602
+
603
+        setTimeout(msecs: number, callback?: () => void): void;
604
+        read(size?: number): Buffer | string | null;
605
+
606
+        addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
607
+        addListener(event: "close", listener: () => void): this;
608
+        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
609
+        addListener(event: "end", listener: () => void): this;
610
+        addListener(event: "readable", listener: () => void): this;
611
+        addListener(event: "error", listener: (err: Error) => void): this;
612
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
613
+
614
+        emit(event: "aborted", hadError: boolean, code: number): boolean;
615
+        emit(event: "close"): boolean;
616
+        emit(event: "data", chunk: Buffer | string): boolean;
617
+        emit(event: "end"): boolean;
618
+        emit(event: "readable"): boolean;
619
+        emit(event: "error", err: Error): boolean;
620
+        emit(event: string | symbol, ...args: any[]): boolean;
621
+
622
+        on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
623
+        on(event: "close", listener: () => void): this;
624
+        on(event: "data", listener: (chunk: Buffer | string) => void): this;
625
+        on(event: "end", listener: () => void): this;
626
+        on(event: "readable", listener: () => void): this;
627
+        on(event: "error", listener: (err: Error) => void): this;
628
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
629
+
630
+        once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
631
+        once(event: "close", listener: () => void): this;
632
+        once(event: "data", listener: (chunk: Buffer | string) => void): this;
633
+        once(event: "end", listener: () => void): this;
634
+        once(event: "readable", listener: () => void): this;
635
+        once(event: "error", listener: (err: Error) => void): this;
636
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
637
+
638
+        prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
639
+        prependListener(event: "close", listener: () => void): this;
640
+        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
641
+        prependListener(event: "end", listener: () => void): this;
642
+        prependListener(event: "readable", listener: () => void): this;
643
+        prependListener(event: "error", listener: (err: Error) => void): this;
644
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
645
+
646
+        prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
647
+        prependOnceListener(event: "close", listener: () => void): this;
648
+        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
649
+        prependOnceListener(event: "end", listener: () => void): this;
650
+        prependOnceListener(event: "readable", listener: () => void): this;
651
+        prependOnceListener(event: "error", listener: (err: Error) => void): this;
652
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
653
+    }
654
+
655
+    export class Http2ServerResponse extends stream.Stream {
656
+        constructor(stream: ServerHttp2Stream);
657
+
658
+        readonly connection: net.Socket | tls.TLSSocket;
659
+        readonly finished: boolean;
660
+        readonly headersSent: boolean;
661
+        readonly socket: net.Socket | tls.TLSSocket;
662
+        readonly stream: ServerHttp2Stream;
663
+        sendDate: boolean;
664
+        statusCode: number;
665
+        statusMessage: '';
666
+        addTrailers(trailers: OutgoingHttpHeaders): void;
667
+        end(callback?: () => void): void;
668
+        end(data: string | Uint8Array, callback?: () => void): void;
669
+        end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void;
670
+        getHeader(name: string): string;
671
+        getHeaderNames(): string[];
672
+        getHeaders(): OutgoingHttpHeaders;
673
+        hasHeader(name: string): boolean;
674
+        removeHeader(name: string): void;
675
+        setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
676
+        setTimeout(msecs: number, callback?: () => void): void;
677
+        write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
678
+        write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
679
+        writeContinue(): void;
680
+        writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
681
+        writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
682
+        createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
683
+
684
+        addListener(event: "close", listener: () => void): this;
685
+        addListener(event: "drain", listener: () => void): this;
686
+        addListener(event: "error", listener: (error: Error) => void): this;
687
+        addListener(event: "finish", listener: () => void): this;
688
+        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
689
+        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
690
+        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
691
+
692
+        emit(event: "close"): boolean;
693
+        emit(event: "drain"): boolean;
694
+        emit(event: "error", error: Error): boolean;
695
+        emit(event: "finish"): boolean;
696
+        emit(event: "pipe", src: stream.Readable): boolean;
697
+        emit(event: "unpipe", src: stream.Readable): boolean;
698
+        emit(event: string | symbol, ...args: any[]): boolean;
699
+
700
+        on(event: "close", listener: () => void): this;
701
+        on(event: "drain", listener: () => void): this;
702
+        on(event: "error", listener: (error: Error) => void): this;
703
+        on(event: "finish", listener: () => void): this;
704
+        on(event: "pipe", listener: (src: stream.Readable) => void): this;
705
+        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
706
+        on(event: string | symbol, listener: (...args: any[]) => void): this;
707
+
708
+        once(event: "close", listener: () => void): this;
709
+        once(event: "drain", listener: () => void): this;
710
+        once(event: "error", listener: (error: Error) => void): this;
711
+        once(event: "finish", listener: () => void): this;
712
+        once(event: "pipe", listener: (src: stream.Readable) => void): this;
713
+        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
714
+        once(event: string | symbol, listener: (...args: any[]) => void): this;
715
+
716
+        prependListener(event: "close", listener: () => void): this;
717
+        prependListener(event: "drain", listener: () => void): this;
718
+        prependListener(event: "error", listener: (error: Error) => void): this;
719
+        prependListener(event: "finish", listener: () => void): this;
720
+        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
721
+        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
722
+        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
723
+
724
+        prependOnceListener(event: "close", listener: () => void): this;
725
+        prependOnceListener(event: "drain", listener: () => void): this;
726
+        prependOnceListener(event: "error", listener: (error: Error) => void): this;
727
+        prependOnceListener(event: "finish", listener: () => void): this;
728
+        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
729
+        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
730
+        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
731
+    }
732
+
733
+    // Public API
734
+
735
+    export namespace constants {
736
+        const NGHTTP2_SESSION_SERVER: number;
737
+        const NGHTTP2_SESSION_CLIENT: number;
738
+        const NGHTTP2_STREAM_STATE_IDLE: number;
739
+        const NGHTTP2_STREAM_STATE_OPEN: number;
740
+        const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
741
+        const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
742
+        const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
743
+        const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
744
+        const NGHTTP2_STREAM_STATE_CLOSED: number;
745
+        const NGHTTP2_NO_ERROR: number;
746
+        const NGHTTP2_PROTOCOL_ERROR: number;
747
+        const NGHTTP2_INTERNAL_ERROR: number;
748
+        const NGHTTP2_FLOW_CONTROL_ERROR: number;
749
+        const NGHTTP2_SETTINGS_TIMEOUT: number;
750
+        const NGHTTP2_STREAM_CLOSED: number;
751
+        const NGHTTP2_FRAME_SIZE_ERROR: number;
752
+        const NGHTTP2_REFUSED_STREAM: number;
753
+        const NGHTTP2_CANCEL: number;
754
+        const NGHTTP2_COMPRESSION_ERROR: number;
755
+        const NGHTTP2_CONNECT_ERROR: number;
756
+        const NGHTTP2_ENHANCE_YOUR_CALM: number;
757
+        const NGHTTP2_INADEQUATE_SECURITY: number;
758
+        const NGHTTP2_HTTP_1_1_REQUIRED: number;
759
+        const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
760
+        const NGHTTP2_FLAG_NONE: number;
761
+        const NGHTTP2_FLAG_END_STREAM: number;
762
+        const NGHTTP2_FLAG_END_HEADERS: number;
763
+        const NGHTTP2_FLAG_ACK: number;
764
+        const NGHTTP2_FLAG_PADDED: number;
765
+        const NGHTTP2_FLAG_PRIORITY: number;
766
+        const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
767
+        const DEFAULT_SETTINGS_ENABLE_PUSH: number;
768
+        const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
769
+        const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
770
+        const MAX_MAX_FRAME_SIZE: number;
771
+        const MIN_MAX_FRAME_SIZE: number;
772
+        const MAX_INITIAL_WINDOW_SIZE: number;
773
+        const NGHTTP2_DEFAULT_WEIGHT: number;
774
+        const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
775
+        const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
776
+        const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
777
+        const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
778
+        const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
779
+        const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
780
+        const PADDING_STRATEGY_NONE: number;
781
+        const PADDING_STRATEGY_MAX: number;
782
+        const PADDING_STRATEGY_CALLBACK: number;
783
+        const HTTP2_HEADER_STATUS: string;
784
+        const HTTP2_HEADER_METHOD: string;
785
+        const HTTP2_HEADER_AUTHORITY: string;
786
+        const HTTP2_HEADER_SCHEME: string;
787
+        const HTTP2_HEADER_PATH: string;
788
+        const HTTP2_HEADER_ACCEPT_CHARSET: string;
789
+        const HTTP2_HEADER_ACCEPT_ENCODING: string;
790
+        const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
791
+        const HTTP2_HEADER_ACCEPT_RANGES: string;
792
+        const HTTP2_HEADER_ACCEPT: string;
793
+        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
794
+        const HTTP2_HEADER_AGE: string;
795
+        const HTTP2_HEADER_ALLOW: string;
796
+        const HTTP2_HEADER_AUTHORIZATION: string;
797
+        const HTTP2_HEADER_CACHE_CONTROL: string;
798
+        const HTTP2_HEADER_CONNECTION: string;
799
+        const HTTP2_HEADER_CONTENT_DISPOSITION: string;
800
+        const HTTP2_HEADER_CONTENT_ENCODING: string;
801
+        const HTTP2_HEADER_CONTENT_LANGUAGE: string;
802
+        const HTTP2_HEADER_CONTENT_LENGTH: string;
803
+        const HTTP2_HEADER_CONTENT_LOCATION: string;
804
+        const HTTP2_HEADER_CONTENT_MD5: string;
805
+        const HTTP2_HEADER_CONTENT_RANGE: string;
806
+        const HTTP2_HEADER_CONTENT_TYPE: string;
807
+        const HTTP2_HEADER_COOKIE: string;
808
+        const HTTP2_HEADER_DATE: string;
809
+        const HTTP2_HEADER_ETAG: string;
810
+        const HTTP2_HEADER_EXPECT: string;
811
+        const HTTP2_HEADER_EXPIRES: string;
812
+        const HTTP2_HEADER_FROM: string;
813
+        const HTTP2_HEADER_HOST: string;
814
+        const HTTP2_HEADER_IF_MATCH: string;
815
+        const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
816
+        const HTTP2_HEADER_IF_NONE_MATCH: string;
817
+        const HTTP2_HEADER_IF_RANGE: string;
818
+        const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
819
+        const HTTP2_HEADER_LAST_MODIFIED: string;
820
+        const HTTP2_HEADER_LINK: string;
821
+        const HTTP2_HEADER_LOCATION: string;
822
+        const HTTP2_HEADER_MAX_FORWARDS: string;
823
+        const HTTP2_HEADER_PREFER: string;
824
+        const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
825
+        const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
826
+        const HTTP2_HEADER_RANGE: string;
827
+        const HTTP2_HEADER_REFERER: string;
828
+        const HTTP2_HEADER_REFRESH: string;
829
+        const HTTP2_HEADER_RETRY_AFTER: string;
830
+        const HTTP2_HEADER_SERVER: string;
831
+        const HTTP2_HEADER_SET_COOKIE: string;
832
+        const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
833
+        const HTTP2_HEADER_TRANSFER_ENCODING: string;
834
+        const HTTP2_HEADER_TE: string;
835
+        const HTTP2_HEADER_UPGRADE: string;
836
+        const HTTP2_HEADER_USER_AGENT: string;
837
+        const HTTP2_HEADER_VARY: string;
838
+        const HTTP2_HEADER_VIA: string;
839
+        const HTTP2_HEADER_WWW_AUTHENTICATE: string;