@types/node 22.15.21 → 24.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node v24.10/README.md +15 -0
- node v24.10/assert/strict.d.ts +111 -0
- node/assert.d.ts → node v24.10/assert.d.ts +162 -101
- node/async_hooks.d.ts → node v24.10/async_hooks.d.ts +26 -6
- node/buffer.buffer.d.ts → node v24.10/buffer.buffer.d.ts +9 -0
- node/buffer.d.ts → node v24.10/buffer.d.ts +15 -7
- node/child_process.d.ts → node v24.10/child_process.d.ts +91 -164
- node/cluster.d.ts → node v24.10/cluster.d.ts +19 -20
- node/console.d.ts → node v24.10/console.d.ts +19 -18
- node/crypto.d.ts → node v24.10/crypto.d.ts +1264 -356
- node/dgram.d.ts → node v24.10/dgram.d.ts +10 -9
- node/diagnostics_channel.d.ts → node v24.10/diagnostics_channel.d.ts +18 -15
- node/dns/promises.d.ts → node v24.10/dns/promises.d.ts +36 -9
- node/dns.d.ts → node v24.10/dns.d.ts +95 -37
- node/domain.d.ts → node v24.10/domain.d.ts +1 -1
- node/events.d.ts → node v24.10/events.d.ts +81 -36
- node/fs/promises.d.ts → node v24.10/fs/promises.d.ts +117 -59
- node/fs.d.ts → node v24.10/fs.d.ts +414 -137
- node v24.10/globals.d.ts +170 -0
- node v24.10/globals.typedarray.d.ts +41 -0
- node/http.d.ts → node v24.10/http.d.ts +187 -37
- node/http2.d.ts → node v24.10/http2.d.ts +266 -67
- node/https.d.ts → node v24.10/https.d.ts +97 -63
- node/index.d.ts → node v24.10/index.d.ts +16 -7
- node v24.10/inspector.d.ts +277 -0
- node/inspector.d.ts → node v24.10/inspector.generated.d.ts +1059 -828
- node/module.d.ts → node v24.10/module.d.ts +153 -31
- node/net.d.ts → node v24.10/net.d.ts +35 -16
- node/os.d.ts → node v24.10/os.d.ts +22 -10
- node/package.json → node v24.10/package.json +14 -84
- node/path.d.ts → node v24.10/path.d.ts +2 -2
- node/perf_hooks.d.ts → node v24.10/perf_hooks.d.ts +30 -18
- node/process.d.ts → node v24.10/process.d.ts +59 -34
- node/punycode.d.ts → node v24.10/punycode.d.ts +1 -1
- node/querystring.d.ts → node v24.10/querystring.d.ts +1 -1
- node/readline/promises.d.ts → node v24.10/readline/promises.d.ts +1 -2
- node/readline.d.ts → node v24.10/readline.d.ts +13 -13
- node/repl.d.ts → node v24.10/repl.d.ts +25 -17
- node/sea.d.ts → node v24.10/sea.d.ts +10 -1
- node/sqlite.d.ts → node v24.10/sqlite.d.ts +438 -9
- node/stream/consumers.d.ts → node v24.10/stream/consumers.d.ts +2 -2
- node/stream/web.d.ts → node v24.10/stream/web.d.ts +13 -54
- node/stream.d.ts → node v24.10/stream.d.ts +68 -47
- node/string_decoder.d.ts → node v24.10/string_decoder.d.ts +3 -3
- node v24.10/test.d.ts +2339 -0
- node/timers/promises.d.ts → node v24.10/timers/promises.d.ts +1 -1
- node/timers.d.ts → node v24.10/timers.d.ts +1 -3
- node/tls.d.ts → node v24.10/tls.d.ts +128 -114
- node/trace_events.d.ts → node v24.10/trace_events.d.ts +6 -6
- node/ts5.6/buffer.buffer.d.ts → node v24.10/ts5.6/buffer.buffer.d.ts +10 -2
- node v24.10/ts5.6/compatibility/float16array.d.ts +71 -0
- node v24.10/ts5.6/globals.typedarray.d.ts +36 -0
- node/ts5.6/index.d.ts → node v24.10/ts5.6/index.d.ts +18 -7
- node v24.10/ts5.7/compatibility/float16array.d.ts +72 -0
- node v24.10/ts5.7/index.d.ts +103 -0
- node/tty.d.ts → node v24.10/tty.d.ts +1 -1
- node/url.d.ts → node v24.10/url.d.ts +119 -34
- node/util.d.ts → node v24.10/util.d.ts +46 -305
- node/v8.d.ts → node v24.10/v8.d.ts +100 -37
- node/vm.d.ts → node v24.10/vm.d.ts +299 -110
- node/wasi.d.ts → node v24.10/wasi.d.ts +23 -2
- node v24.10/web-globals/abortcontroller.d.ts +34 -0
- node v24.10/web-globals/crypto.d.ts +32 -0
- node v24.10/web-globals/domexception.d.ts +68 -0
- node v24.10/web-globals/events.d.ts +97 -0
- node v24.10/web-globals/fetch.d.ts +50 -0
- node v24.10/web-globals/navigator.d.ts +25 -0
- node v24.10/web-globals/storage.d.ts +24 -0
- node v24.10/web-globals/streams.d.ts +22 -0
- node/worker_threads.d.ts → node v24.10/worker_threads.d.ts +225 -75
- node/zlib.d.ts → node v24.10/zlib.d.ts +44 -33
- node/README.md +0 -15
- node/assert/strict.d.ts +0 -8
- node/compatibility/disposable.d.ts +0 -16
- node/compatibility/index.d.ts +0 -9
- node/compatibility/indexable.d.ts +0 -23
- node/dom-events.d.ts +0 -124
- node/globals.d.ts +0 -371
- node/globals.typedarray.d.ts +0 -21
- node/test.d.ts +0 -2280
- node/ts5.6/globals.typedarray.d.ts +0 -19
- {node → node v24.10}/LICENSE +0 -0
- {node → node v24.10}/compatibility/iterators.d.ts +0 -0
- {node → node v24.10}/constants.d.ts +0 -0
- {node → node v24.10}/stream/promises.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.10.9",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,11 +15,6 @@
|
|
|
15
15
|
"githubUsername": "jkomyno",
|
|
16
16
|
"url": "https://github.com/jkomyno"
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"name": "Alvis HT Tang",
|
|
20
|
-
"githubUsername": "alvis",
|
|
21
|
-
"url": "https://github.com/alvis"
|
|
22
|
-
},
|
|
23
18
|
{
|
|
24
19
|
"name": "Andrew Makarov",
|
|
25
20
|
"githubUsername": "r3nya",
|
|
@@ -30,56 +25,11 @@
|
|
|
30
25
|
"githubUsername": "btoueg",
|
|
31
26
|
"url": "https://github.com/btoueg"
|
|
32
27
|
},
|
|
33
|
-
{
|
|
34
|
-
"name": "Chigozirim C.",
|
|
35
|
-
"githubUsername": "smac89",
|
|
36
|
-
"url": "https://github.com/smac89"
|
|
37
|
-
},
|
|
38
28
|
{
|
|
39
29
|
"name": "David Junger",
|
|
40
30
|
"githubUsername": "touffy",
|
|
41
31
|
"url": "https://github.com/touffy"
|
|
42
32
|
},
|
|
43
|
-
{
|
|
44
|
-
"name": "Deividas Bakanas",
|
|
45
|
-
"githubUsername": "DeividasBakanas",
|
|
46
|
-
"url": "https://github.com/DeividasBakanas"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "Eugene Y. Q. Shen",
|
|
50
|
-
"githubUsername": "eyqs",
|
|
51
|
-
"url": "https://github.com/eyqs"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"name": "Hannes Magnusson",
|
|
55
|
-
"githubUsername": "Hannes-Magnusson-CK",
|
|
56
|
-
"url": "https://github.com/Hannes-Magnusson-CK"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "Huw",
|
|
60
|
-
"githubUsername": "hoo29",
|
|
61
|
-
"url": "https://github.com/hoo29"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "Kelvin Jin",
|
|
65
|
-
"githubUsername": "kjin",
|
|
66
|
-
"url": "https://github.com/kjin"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"name": "Klaus Meinhardt",
|
|
70
|
-
"githubUsername": "ajafff",
|
|
71
|
-
"url": "https://github.com/ajafff"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"name": "Lishude",
|
|
75
|
-
"githubUsername": "islishude",
|
|
76
|
-
"url": "https://github.com/islishude"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "Mariusz Wiktorczyk",
|
|
80
|
-
"githubUsername": "mwiktorczyk",
|
|
81
|
-
"url": "https://github.com/mwiktorczyk"
|
|
82
|
-
},
|
|
83
33
|
{
|
|
84
34
|
"name": "Mohsen Azimi",
|
|
85
35
|
"githubUsername": "mohsen1",
|
|
@@ -90,46 +40,16 @@
|
|
|
90
40
|
"githubUsername": "galkin",
|
|
91
41
|
"url": "https://github.com/galkin"
|
|
92
42
|
},
|
|
93
|
-
{
|
|
94
|
-
"name": "Parambir Singh",
|
|
95
|
-
"githubUsername": "parambirs",
|
|
96
|
-
"url": "https://github.com/parambirs"
|
|
97
|
-
},
|
|
98
43
|
{
|
|
99
44
|
"name": "Sebastian Silbermann",
|
|
100
45
|
"githubUsername": "eps1lon",
|
|
101
46
|
"url": "https://github.com/eps1lon"
|
|
102
47
|
},
|
|
103
|
-
{
|
|
104
|
-
"name": "Thomas den Hollander",
|
|
105
|
-
"githubUsername": "ThomasdenH",
|
|
106
|
-
"url": "https://github.com/ThomasdenH"
|
|
107
|
-
},
|
|
108
48
|
{
|
|
109
49
|
"name": "Wilco Bakker",
|
|
110
50
|
"githubUsername": "WilcoBakker",
|
|
111
51
|
"url": "https://github.com/WilcoBakker"
|
|
112
52
|
},
|
|
113
|
-
{
|
|
114
|
-
"name": "wwwy3y3",
|
|
115
|
-
"githubUsername": "wwwy3y3",
|
|
116
|
-
"url": "https://github.com/wwwy3y3"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"name": "Samuel Ainsworth",
|
|
120
|
-
"githubUsername": "samuela",
|
|
121
|
-
"url": "https://github.com/samuela"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "Kyle Uehlein",
|
|
125
|
-
"githubUsername": "kuehlein",
|
|
126
|
-
"url": "https://github.com/kuehlein"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"name": "Thanik Bhongbhibhat",
|
|
130
|
-
"githubUsername": "bhongy",
|
|
131
|
-
"url": "https://github.com/bhongy"
|
|
132
|
-
},
|
|
133
53
|
{
|
|
134
54
|
"name": "Marcin Kopacz",
|
|
135
55
|
"githubUsername": "chyzwar",
|
|
@@ -199,6 +119,11 @@
|
|
|
199
119
|
"name": "René",
|
|
200
120
|
"githubUsername": "Renegade334",
|
|
201
121
|
"url": "https://github.com/Renegade334"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "Yagiz Nizipli",
|
|
125
|
+
"githubUsername": "anonrig",
|
|
126
|
+
"url": "https://github.com/anonrig"
|
|
202
127
|
}
|
|
203
128
|
],
|
|
204
129
|
"main": "",
|
|
@@ -208,6 +133,11 @@
|
|
|
208
133
|
"*": [
|
|
209
134
|
"ts5.6/*"
|
|
210
135
|
]
|
|
136
|
+
},
|
|
137
|
+
"<=5.7": {
|
|
138
|
+
"*": [
|
|
139
|
+
"ts5.7/*"
|
|
140
|
+
]
|
|
211
141
|
}
|
|
212
142
|
},
|
|
213
143
|
"repository": {
|
|
@@ -217,9 +147,9 @@
|
|
|
217
147
|
},
|
|
218
148
|
"scripts": {},
|
|
219
149
|
"dependencies": {
|
|
220
|
-
"undici-types": "~
|
|
150
|
+
"undici-types": "~7.16.0"
|
|
221
151
|
},
|
|
222
152
|
"peerDependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
224
|
-
"typeScriptVersion": "5.
|
|
153
|
+
"typesPublisherContentHash": "954a409903f39d045c638dd3e8f4973e9d11ba4e21d517cd13a5b104a47e1c47",
|
|
154
|
+
"typeScriptVersion": "5.2"
|
|
225
155
|
}
|
|
@@ -13,7 +13,7 @@ declare module "path/win32" {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* import path from 'node:path';
|
|
15
15
|
* ```
|
|
16
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
16
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js)
|
|
17
17
|
*/
|
|
18
18
|
declare module "path" {
|
|
19
19
|
namespace path {
|
|
@@ -67,7 +67,7 @@ declare module "path" {
|
|
|
67
67
|
interface PlatformPath {
|
|
68
68
|
/**
|
|
69
69
|
* Normalize a string path, reducing '..' and '.' parts.
|
|
70
|
-
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
|
|
70
|
+
* When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. If the path is a zero-length string, '.' is returned, representing the current working directory.
|
|
71
71
|
*
|
|
72
72
|
* @param path string path to normalize.
|
|
73
73
|
* @throws {TypeError} if `path` is not a string.
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* performance.measure('A to B', 'A', 'B');
|
|
28
28
|
* });
|
|
29
29
|
* ```
|
|
30
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
30
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/perf_hooks.js)
|
|
31
31
|
*/
|
|
32
32
|
declare module "perf_hooks" {
|
|
33
33
|
import { AsyncResource } from "node:async_hooks";
|
|
@@ -48,13 +48,13 @@ declare module "perf_hooks" {
|
|
|
48
48
|
* the type of garbage collection operation that occurred.
|
|
49
49
|
* See perf_hooks.constants for valid values.
|
|
50
50
|
*/
|
|
51
|
-
readonly kind
|
|
51
|
+
readonly kind: number;
|
|
52
52
|
/**
|
|
53
53
|
* When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
|
|
54
54
|
* property contains additional information about garbage collection operation.
|
|
55
55
|
* See perf_hooks.constants for valid values.
|
|
56
56
|
*/
|
|
57
|
-
readonly flags
|
|
57
|
+
readonly flags: number;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* The constructor of this class is not exposed to users directly.
|
|
@@ -92,11 +92,6 @@ declare module "perf_hooks" {
|
|
|
92
92
|
* @since v8.5.0
|
|
93
93
|
*/
|
|
94
94
|
readonly entryType: EntryType;
|
|
95
|
-
/**
|
|
96
|
-
* Additional detail specific to the `entryType`.
|
|
97
|
-
* @since v16.0.0
|
|
98
|
-
*/
|
|
99
|
-
readonly detail?: NodeGCPerformanceDetail | unknown | undefined; // TODO: Narrow this based on entry type.
|
|
100
95
|
toJSON(): any;
|
|
101
96
|
}
|
|
102
97
|
/**
|
|
@@ -104,6 +99,7 @@ declare module "perf_hooks" {
|
|
|
104
99
|
* @since v18.2.0, v16.17.0
|
|
105
100
|
*/
|
|
106
101
|
class PerformanceMark extends PerformanceEntry {
|
|
102
|
+
readonly detail: any;
|
|
107
103
|
readonly duration: 0;
|
|
108
104
|
readonly entryType: "mark";
|
|
109
105
|
}
|
|
@@ -114,6 +110,7 @@ declare module "perf_hooks" {
|
|
|
114
110
|
* @since v18.2.0, v16.17.0
|
|
115
111
|
*/
|
|
116
112
|
class PerformanceMeasure extends PerformanceEntry {
|
|
113
|
+
readonly detail: any;
|
|
117
114
|
readonly entryType: "measure";
|
|
118
115
|
}
|
|
119
116
|
interface UVMetrics {
|
|
@@ -130,6 +127,7 @@ declare module "perf_hooks" {
|
|
|
130
127
|
*/
|
|
131
128
|
readonly eventsWaiting: number;
|
|
132
129
|
}
|
|
130
|
+
// TODO: PerformanceNodeEntry is missing
|
|
133
131
|
/**
|
|
134
132
|
* _This property is an extension by Node.js. It is not available in Web browsers._
|
|
135
133
|
*
|
|
@@ -225,7 +223,7 @@ declare module "perf_hooks" {
|
|
|
225
223
|
/**
|
|
226
224
|
* Additional optional detail to include with the mark.
|
|
227
225
|
*/
|
|
228
|
-
detail?: unknown
|
|
226
|
+
detail?: unknown;
|
|
229
227
|
/**
|
|
230
228
|
* Duration between start and end times.
|
|
231
229
|
*/
|
|
@@ -813,6 +811,20 @@ declare module "perf_hooks" {
|
|
|
813
811
|
* @since v11.10.0
|
|
814
812
|
*/
|
|
815
813
|
disable(): boolean;
|
|
814
|
+
/**
|
|
815
|
+
* Disables the update interval timer when the histogram is disposed.
|
|
816
|
+
*
|
|
817
|
+
* ```js
|
|
818
|
+
* const { monitorEventLoopDelay } = require('node:perf_hooks');
|
|
819
|
+
* {
|
|
820
|
+
* using hist = monitorEventLoopDelay({ resolution: 20 });
|
|
821
|
+
* hist.enable();
|
|
822
|
+
* // The histogram will be disabled when the block is exited.
|
|
823
|
+
* }
|
|
824
|
+
* ```
|
|
825
|
+
* @since v24.2.0
|
|
826
|
+
*/
|
|
827
|
+
[Symbol.dispose](): void;
|
|
816
828
|
}
|
|
817
829
|
interface RecordableHistogram extends Histogram {
|
|
818
830
|
/**
|
|
@@ -866,12 +878,12 @@ declare module "perf_hooks" {
|
|
|
866
878
|
* The minimum recordable value. Must be an integer value greater than 0.
|
|
867
879
|
* @default 1
|
|
868
880
|
*/
|
|
869
|
-
|
|
881
|
+
lowest?: number | bigint | undefined;
|
|
870
882
|
/**
|
|
871
883
|
* The maximum recordable value. Must be an integer value greater than min.
|
|
872
884
|
* @default Number.MAX_SAFE_INTEGER
|
|
873
885
|
*/
|
|
874
|
-
|
|
886
|
+
highest?: number | bigint | undefined;
|
|
875
887
|
/**
|
|
876
888
|
* The number of accuracy digits. Must be a number between 1 and 5.
|
|
877
889
|
* @default 3
|
|
@@ -895,7 +907,7 @@ declare module "perf_hooks" {
|
|
|
895
907
|
global {
|
|
896
908
|
/**
|
|
897
909
|
* `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'`
|
|
898
|
-
* @see https://nodejs.org/docs/latest-
|
|
910
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceentry
|
|
899
911
|
* @since v19.0.0
|
|
900
912
|
*/
|
|
901
913
|
var PerformanceEntry: typeof globalThis extends {
|
|
@@ -905,7 +917,7 @@ declare module "perf_hooks" {
|
|
|
905
917
|
: typeof _PerformanceEntry;
|
|
906
918
|
/**
|
|
907
919
|
* `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'`
|
|
908
|
-
* @see https://nodejs.org/docs/latest-
|
|
920
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemark
|
|
909
921
|
* @since v19.0.0
|
|
910
922
|
*/
|
|
911
923
|
var PerformanceMark: typeof globalThis extends {
|
|
@@ -915,7 +927,7 @@ declare module "perf_hooks" {
|
|
|
915
927
|
: typeof _PerformanceMark;
|
|
916
928
|
/**
|
|
917
929
|
* `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'`
|
|
918
|
-
* @see https://nodejs.org/docs/latest-
|
|
930
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemeasure
|
|
919
931
|
* @since v19.0.0
|
|
920
932
|
*/
|
|
921
933
|
var PerformanceMeasure: typeof globalThis extends {
|
|
@@ -925,7 +937,7 @@ declare module "perf_hooks" {
|
|
|
925
937
|
: typeof _PerformanceMeasure;
|
|
926
938
|
/**
|
|
927
939
|
* `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'`
|
|
928
|
-
* @see https://nodejs.org/docs/latest-
|
|
940
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserver
|
|
929
941
|
* @since v19.0.0
|
|
930
942
|
*/
|
|
931
943
|
var PerformanceObserver: typeof globalThis extends {
|
|
@@ -935,7 +947,7 @@ declare module "perf_hooks" {
|
|
|
935
947
|
: typeof _PerformanceObserver;
|
|
936
948
|
/**
|
|
937
949
|
* `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'`
|
|
938
|
-
* @see https://nodejs.org/docs/latest-
|
|
950
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserverentrylist
|
|
939
951
|
* @since v19.0.0
|
|
940
952
|
*/
|
|
941
953
|
var PerformanceObserverEntryList: typeof globalThis extends {
|
|
@@ -945,7 +957,7 @@ declare module "perf_hooks" {
|
|
|
945
957
|
: typeof _PerformanceObserverEntryList;
|
|
946
958
|
/**
|
|
947
959
|
* `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'`
|
|
948
|
-
* @see https://nodejs.org/docs/latest-
|
|
960
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceresourcetiming
|
|
949
961
|
* @since v19.0.0
|
|
950
962
|
*/
|
|
951
963
|
var PerformanceResourceTiming: typeof globalThis extends {
|
|
@@ -955,7 +967,7 @@ declare module "perf_hooks" {
|
|
|
955
967
|
: typeof _PerformanceResourceTiming;
|
|
956
968
|
/**
|
|
957
969
|
* `performance` is a global reference for `import { performance } from 'node:perf_hooks'`
|
|
958
|
-
* @see https://nodejs.org/docs/latest-
|
|
970
|
+
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performance
|
|
959
971
|
* @since v16.0.0
|
|
960
972
|
*/
|
|
961
973
|
var performance: typeof globalThis extends {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
declare module "process" {
|
|
2
|
+
import { Control, MessageOptions, SendHandle } from "node:child_process";
|
|
3
|
+
import { PathLike } from "node:fs";
|
|
2
4
|
import * as tty from "node:tty";
|
|
3
5
|
import { Worker } from "node:worker_threads";
|
|
4
6
|
|
|
@@ -194,7 +196,7 @@ declare module "process" {
|
|
|
194
196
|
readonly ipv6: boolean;
|
|
195
197
|
/**
|
|
196
198
|
* A boolean value that is `true` if the current Node.js build supports
|
|
197
|
-
* [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-
|
|
199
|
+
* [loading ECMAScript modules using `require()`](https://nodejs.org/docs/latest-v24.x/api/modules.md#loading-ecmascript-modules-using-require).
|
|
198
200
|
* @since v22.10.0
|
|
199
201
|
*/
|
|
200
202
|
readonly require_module: boolean;
|
|
@@ -231,8 +233,9 @@ declare module "process" {
|
|
|
231
233
|
*/
|
|
232
234
|
readonly tls_sni: boolean;
|
|
233
235
|
/**
|
|
234
|
-
* A value that is `"strip"`
|
|
235
|
-
* `"transform"` if Node.js is run with `--experimental-transform-types`, and `false`
|
|
236
|
+
* A value that is `"strip"` by default,
|
|
237
|
+
* `"transform"` if Node.js is run with `--experimental-transform-types`, and `false` if
|
|
238
|
+
* Node.js is run with `--no-experimental-strip-types`.
|
|
236
239
|
* @since v22.10.0
|
|
237
240
|
*/
|
|
238
241
|
readonly typescript: "strip" | "transform" | false;
|
|
@@ -274,10 +277,8 @@ declare module "process" {
|
|
|
274
277
|
| "loong64"
|
|
275
278
|
| "mips"
|
|
276
279
|
| "mipsel"
|
|
277
|
-
| "ppc"
|
|
278
280
|
| "ppc64"
|
|
279
281
|
| "riscv64"
|
|
280
|
-
| "s390"
|
|
281
282
|
| "s390x"
|
|
282
283
|
| "x64";
|
|
283
284
|
type Signals =
|
|
@@ -331,7 +332,7 @@ declare module "process" {
|
|
|
331
332
|
*/
|
|
332
333
|
type UnhandledRejectionListener = (reason: unknown, promise: Promise<unknown>) => void;
|
|
333
334
|
type WarningListener = (warning: Error) => void;
|
|
334
|
-
type MessageListener = (message: unknown, sendHandle:
|
|
335
|
+
type MessageListener = (message: unknown, sendHandle: SendHandle) => void;
|
|
335
336
|
type SignalsListener = (signal: Signals) => void;
|
|
336
337
|
type MultipleResolveListener = (
|
|
337
338
|
type: MultipleResolveType,
|
|
@@ -347,7 +348,7 @@ declare module "process" {
|
|
|
347
348
|
/**
|
|
348
349
|
* Can be used to change the default timezone at runtime
|
|
349
350
|
*/
|
|
350
|
-
TZ?: string;
|
|
351
|
+
TZ?: string | undefined;
|
|
351
352
|
}
|
|
352
353
|
interface HRTime {
|
|
353
354
|
/**
|
|
@@ -471,6 +472,11 @@ declare module "process" {
|
|
|
471
472
|
* @default false
|
|
472
473
|
*/
|
|
473
474
|
reportOnUncaughtException: boolean;
|
|
475
|
+
/**
|
|
476
|
+
* If true, a diagnostic report is generated without the environment variables.
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
excludeEnv: boolean;
|
|
474
480
|
/**
|
|
475
481
|
* The signal used to trigger the creation of a diagnostic report.
|
|
476
482
|
* @default 'SIGUSR2'
|
|
@@ -748,7 +754,7 @@ declare module "process" {
|
|
|
748
754
|
* should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
|
|
749
755
|
* unless there are specific reasons such as custom dlopen flags or loading from ES modules.
|
|
750
756
|
*
|
|
751
|
-
* The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-
|
|
757
|
+
* The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v24.x/api/os.html#dlopen-constants)`
|
|
752
758
|
* documentation for details.
|
|
753
759
|
*
|
|
754
760
|
* An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
|
|
@@ -991,7 +997,7 @@ declare module "process" {
|
|
|
991
997
|
* @since v0.1.13
|
|
992
998
|
* @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
|
|
993
999
|
*/
|
|
994
|
-
exit(code?: number | string | null
|
|
1000
|
+
exit(code?: number | string | null): never;
|
|
995
1001
|
/**
|
|
996
1002
|
* A number which will be the process exit code, when the process either
|
|
997
1003
|
* exits gracefully, or is exited via {@link exit} without specifying
|
|
@@ -1002,7 +1008,7 @@ declare module "process" {
|
|
|
1002
1008
|
* @default undefined
|
|
1003
1009
|
* @since v0.11.8
|
|
1004
1010
|
*/
|
|
1005
|
-
exitCode
|
|
1011
|
+
exitCode: number | string | null | undefined;
|
|
1006
1012
|
finalization: {
|
|
1007
1013
|
/**
|
|
1008
1014
|
* This function registers a callback to be called when the process emits the `exit` event if the `ref` object was not garbage collected.
|
|
@@ -1466,7 +1472,7 @@ declare module "process" {
|
|
|
1466
1472
|
* @since v20.12.0
|
|
1467
1473
|
* @param path The path to the .env file
|
|
1468
1474
|
*/
|
|
1469
|
-
loadEnvFile(path?:
|
|
1475
|
+
loadEnvFile(path?: PathLike): void;
|
|
1470
1476
|
/**
|
|
1471
1477
|
* The `process.pid` property returns the PID of the process.
|
|
1472
1478
|
*
|
|
@@ -1490,6 +1496,18 @@ declare module "process" {
|
|
|
1490
1496
|
* @since v9.2.0, v8.10.0, v6.13.0
|
|
1491
1497
|
*/
|
|
1492
1498
|
readonly ppid: number;
|
|
1499
|
+
/**
|
|
1500
|
+
* The `process.threadCpuUsage()` method returns the user and system CPU time usage of
|
|
1501
|
+
* the current worker thread, in an object with properties `user` and `system`, whose
|
|
1502
|
+
* values are microsecond values (millionth of a second).
|
|
1503
|
+
*
|
|
1504
|
+
* The result of a previous call to `process.threadCpuUsage()` can be passed as the
|
|
1505
|
+
* argument to the function, to get a diff reading.
|
|
1506
|
+
* @since v23.9.0
|
|
1507
|
+
* @param previousValue A previous return value from calling
|
|
1508
|
+
* `process.threadCpuUsage()`
|
|
1509
|
+
*/
|
|
1510
|
+
threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
1493
1511
|
/**
|
|
1494
1512
|
* The `process.title` property returns the current process title (i.e. returns
|
|
1495
1513
|
* the current value of `ps`). Assigning a new value to `process.title` modifies
|
|
@@ -1510,7 +1528,8 @@ declare module "process" {
|
|
|
1510
1528
|
title: string;
|
|
1511
1529
|
/**
|
|
1512
1530
|
* The operating system CPU architecture for which the Node.js binary was compiled.
|
|
1513
|
-
* Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
|
|
1531
|
+
* Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
|
|
1532
|
+
* `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
|
|
1514
1533
|
*
|
|
1515
1534
|
* ```js
|
|
1516
1535
|
* import { arch } from 'node:process';
|
|
@@ -1556,7 +1575,7 @@ declare module "process" {
|
|
|
1556
1575
|
* @since v0.1.17
|
|
1557
1576
|
* @deprecated Since v14.0.0 - Use `main` instead.
|
|
1558
1577
|
*/
|
|
1559
|
-
mainModule?: Module
|
|
1578
|
+
mainModule?: Module;
|
|
1560
1579
|
memoryUsage: MemoryUsageFn;
|
|
1561
1580
|
/**
|
|
1562
1581
|
* Gets the amount of memory available to the process (in bytes) based on
|
|
@@ -1566,13 +1585,11 @@ declare module "process" {
|
|
|
1566
1585
|
* See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
|
|
1567
1586
|
* information.
|
|
1568
1587
|
* @since v19.6.0, v18.15.0
|
|
1569
|
-
* @experimental
|
|
1570
1588
|
*/
|
|
1571
1589
|
constrainedMemory(): number;
|
|
1572
1590
|
/**
|
|
1573
1591
|
* Gets the amount of free memory that is still available to the process (in bytes).
|
|
1574
|
-
* See [`uv_get_available_memory`](https://nodejs.org/docs/latest-
|
|
1575
|
-
* @experimental
|
|
1592
|
+
* See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
|
|
1576
1593
|
* @since v20.13.0
|
|
1577
1594
|
*/
|
|
1578
1595
|
availableMemory(): number;
|
|
@@ -1692,6 +1709,11 @@ declare module "process" {
|
|
|
1692
1709
|
* @param args Additional arguments to pass when invoking the `callback`
|
|
1693
1710
|
*/
|
|
1694
1711
|
nextTick(callback: Function, ...args: any[]): void;
|
|
1712
|
+
/**
|
|
1713
|
+
* The process.noDeprecation property indicates whether the --no-deprecation flag is set on the current Node.js process.
|
|
1714
|
+
* See the documentation for the ['warning' event](https://nodejs.org/docs/latest/api/process.html#event-warning) and the [emitWarning()](https://nodejs.org/docs/latest/api/process.html#processemitwarningwarning-type-code-ctor) method for more information about this flag's behavior.
|
|
1715
|
+
*/
|
|
1716
|
+
noDeprecation?: boolean;
|
|
1695
1717
|
/**
|
|
1696
1718
|
* This API is available through the [--permission](https://nodejs.org/api/cli.html#--permission) flag.
|
|
1697
1719
|
*
|
|
@@ -1750,18 +1772,7 @@ declare module "process" {
|
|
|
1750
1772
|
* If no IPC channel exists, this property is undefined.
|
|
1751
1773
|
* @since v7.1.0
|
|
1752
1774
|
*/
|
|
1753
|
-
channel?:
|
|
1754
|
-
/**
|
|
1755
|
-
* This method makes the IPC channel keep the event loop of the process running if .unref() has been called before.
|
|
1756
|
-
* @since v7.1.0
|
|
1757
|
-
*/
|
|
1758
|
-
ref(): void;
|
|
1759
|
-
/**
|
|
1760
|
-
* This method makes the IPC channel not keep the event loop of the process running, and lets it finish even while the channel is open.
|
|
1761
|
-
* @since v7.1.0
|
|
1762
|
-
*/
|
|
1763
|
-
unref(): void;
|
|
1764
|
-
};
|
|
1775
|
+
channel?: Control;
|
|
1765
1776
|
/**
|
|
1766
1777
|
* If Node.js is spawned with an IPC channel, the `process.send()` method can be
|
|
1767
1778
|
* used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
|
|
@@ -1775,12 +1786,19 @@ declare module "process" {
|
|
|
1775
1786
|
*/
|
|
1776
1787
|
send?(
|
|
1777
1788
|
message: any,
|
|
1778
|
-
sendHandle?:
|
|
1779
|
-
options?:
|
|
1780
|
-
keepOpen?: boolean | undefined;
|
|
1781
|
-
},
|
|
1789
|
+
sendHandle?: SendHandle,
|
|
1790
|
+
options?: MessageOptions,
|
|
1782
1791
|
callback?: (error: Error | null) => void,
|
|
1783
1792
|
): boolean;
|
|
1793
|
+
send?(
|
|
1794
|
+
message: any,
|
|
1795
|
+
sendHandle: SendHandle,
|
|
1796
|
+
callback?: (error: Error | null) => void,
|
|
1797
|
+
): boolean;
|
|
1798
|
+
send?(
|
|
1799
|
+
message: any,
|
|
1800
|
+
callback: (error: Error | null) => void,
|
|
1801
|
+
): boolean;
|
|
1784
1802
|
/**
|
|
1785
1803
|
* If the Node.js process is spawned with an IPC channel (see the `Child Process` and `Cluster` documentation), the `process.disconnect()` method will close the
|
|
1786
1804
|
* IPC channel to the parent process, allowing the child process to exit gracefully
|
|
@@ -1845,7 +1863,7 @@ declare module "process" {
|
|
|
1845
1863
|
allowedNodeEnvironmentFlags: ReadonlySet<string>;
|
|
1846
1864
|
/**
|
|
1847
1865
|
* `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
|
|
1848
|
-
* Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-
|
|
1866
|
+
* Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
|
|
1849
1867
|
* @since v11.8.0
|
|
1850
1868
|
*/
|
|
1851
1869
|
report: ProcessReport;
|
|
@@ -1970,6 +1988,7 @@ declare module "process" {
|
|
|
1970
1988
|
addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
1971
1989
|
addListener(event: "warning", listener: WarningListener): this;
|
|
1972
1990
|
addListener(event: "message", listener: MessageListener): this;
|
|
1991
|
+
addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
1973
1992
|
addListener(event: Signals, listener: SignalsListener): this;
|
|
1974
1993
|
addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
1975
1994
|
addListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -1981,7 +2000,8 @@ declare module "process" {
|
|
|
1981
2000
|
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
|
1982
2001
|
emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
|
|
1983
2002
|
emit(event: "warning", warning: Error): boolean;
|
|
1984
|
-
emit(event: "message", message: unknown, sendHandle:
|
|
2003
|
+
emit(event: "message", message: unknown, sendHandle: SendHandle): this;
|
|
2004
|
+
emit(event: "workerMessage", value: any, source: number): this;
|
|
1985
2005
|
emit(event: Signals, signal?: Signals): boolean;
|
|
1986
2006
|
emit(
|
|
1987
2007
|
event: "multipleResolves",
|
|
@@ -2002,6 +2022,7 @@ declare module "process" {
|
|
|
2002
2022
|
on(event: Signals, listener: SignalsListener): this;
|
|
2003
2023
|
on(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2004
2024
|
on(event: "worker", listener: WorkerListener): this;
|
|
2025
|
+
on(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2005
2026
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
2006
2027
|
once(event: "beforeExit", listener: BeforeExitListener): this;
|
|
2007
2028
|
once(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -2015,6 +2036,7 @@ declare module "process" {
|
|
|
2015
2036
|
once(event: Signals, listener: SignalsListener): this;
|
|
2016
2037
|
once(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2017
2038
|
once(event: "worker", listener: WorkerListener): this;
|
|
2039
|
+
once(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2018
2040
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
2019
2041
|
prependListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
2020
2042
|
prependListener(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -2025,6 +2047,7 @@ declare module "process" {
|
|
|
2025
2047
|
prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
2026
2048
|
prependListener(event: "warning", listener: WarningListener): this;
|
|
2027
2049
|
prependListener(event: "message", listener: MessageListener): this;
|
|
2050
|
+
prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2028
2051
|
prependListener(event: Signals, listener: SignalsListener): this;
|
|
2029
2052
|
prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2030
2053
|
prependListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -2037,6 +2060,7 @@ declare module "process" {
|
|
|
2037
2060
|
prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
2038
2061
|
prependOnceListener(event: "warning", listener: WarningListener): this;
|
|
2039
2062
|
prependOnceListener(event: "message", listener: MessageListener): this;
|
|
2063
|
+
prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2040
2064
|
prependOnceListener(event: Signals, listener: SignalsListener): this;
|
|
2041
2065
|
prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2042
2066
|
prependOnceListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -2049,6 +2073,7 @@ declare module "process" {
|
|
|
2049
2073
|
listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
|
|
2050
2074
|
listeners(event: "warning"): WarningListener[];
|
|
2051
2075
|
listeners(event: "message"): MessageListener[];
|
|
2076
|
+
listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
|
|
2052
2077
|
listeners(event: Signals): SignalsListener[];
|
|
2053
2078
|
listeners(event: "multipleResolves"): MultipleResolveListener[];
|
|
2054
2079
|
listeners(event: "worker"): WorkerListener[];
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
25
|
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
26
|
* @deprecated Since v7.0.0 - Deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module "punycode" {
|
|
30
30
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `querystring` is more performant than `URLSearchParams` but is not a
|
|
10
10
|
* standardized API. Use `URLSearchParams` when performance is not critical or
|
|
11
11
|
* when compatibility with browser code is desirable.
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module "querystring" {
|
|
15
15
|
interface StringifyOptions {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since v17.0.0
|
|
3
|
-
* @experimental
|
|
4
3
|
*/
|
|
5
4
|
declare module "readline/promises" {
|
|
6
5
|
import { Abortable } from "node:events";
|
|
@@ -65,7 +64,7 @@ declare module "readline/promises" {
|
|
|
65
64
|
constructor(
|
|
66
65
|
stream: NodeJS.WritableStream,
|
|
67
66
|
options?: {
|
|
68
|
-
autoCommit?: boolean;
|
|
67
|
+
autoCommit?: boolean | undefined;
|
|
69
68
|
},
|
|
70
69
|
);
|
|
71
70
|
/**
|