@types/node 22.15.33 → 24.10.3
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 v22.15 → node v24.10}/assert.d.ts +162 -101
- {node v22.15 → node v24.10}/async_hooks.d.ts +26 -6
- {node v22.15 → node v24.10}/buffer.buffer.d.ts +9 -0
- {node v22.15 → node v24.10}/buffer.d.ts +15 -7
- {node v22.15 → node v24.10}/child_process.d.ts +91 -164
- {node v22.15 → node v24.10}/cluster.d.ts +19 -20
- {node v22.15 → node v24.10}/compatibility/iterators.d.ts +1 -0
- {node v22.15 → node v24.10}/console.d.ts +19 -18
- {node v22.15 → node v24.10}/crypto.d.ts +1264 -356
- {node v22.15 → node v24.10}/dgram.d.ts +10 -9
- {node v22.15 → node v24.10}/diagnostics_channel.d.ts +1 -3
- {node v22.15 → node v24.10}/dns/promises.d.ts +12 -11
- {node v22.15 → node v24.10}/dns.d.ts +41 -37
- {node v22.15 → node v24.10}/domain.d.ts +1 -1
- {node v22.15 → node v24.10}/events.d.ts +81 -36
- {node v22.15 → node v24.10}/fs/promises.d.ts +101 -57
- {node v22.15 → node v24.10}/fs.d.ts +413 -136
- node v24.10/globals.d.ts +170 -0
- node v24.10/globals.typedarray.d.ts +41 -0
- {node v22.15 → node v24.10}/http.d.ts +187 -37
- {node v22.15 → node v24.10}/http2.d.ts +197 -66
- {node v22.15 → node v24.10}/https.d.ts +97 -63
- {node v22.15 → node v24.10}/index.d.ts +16 -7
- node v24.10/inspector.d.ts +277 -0
- node v22.15/inspector.d.ts → node v24.10/inspector.generated.d.ts +1059 -828
- {node v22.15 → node v24.10}/module.d.ts +90 -30
- {node v22.15 → node v24.10}/net.d.ts +35 -16
- {node v22.15 → node v24.10}/os.d.ts +22 -10
- {node v22.15 → node v24.10}/package.json +14 -84
- {node v22.15 → node v24.10}/path.d.ts +2 -2
- {node v22.15 → node v24.10}/perf_hooks.d.ts +28 -16
- {node v22.15 → node v24.10}/process.d.ts +40 -34
- {node v22.15 → node v24.10}/punycode.d.ts +1 -1
- {node v22.15 → node v24.10}/querystring.d.ts +1 -1
- {node v22.15 → node v24.10}/readline/promises.d.ts +1 -2
- {node v22.15 → node v24.10}/readline.d.ts +13 -13
- {node v22.15 → node v24.10}/repl.d.ts +25 -17
- {node v22.15 → node v24.10}/sea.d.ts +10 -1
- {node v22.15 → node v24.10}/sqlite.d.ts +438 -9
- {node v22.15 → node v24.10}/stream/consumers.d.ts +2 -2
- {node v22.15 → node v24.10}/stream/web.d.ts +13 -54
- {node v22.15 → node v24.10}/stream.d.ts +63 -48
- {node v22.15 → node v24.10}/string_decoder.d.ts +3 -3
- node v24.10/test.d.ts +2339 -0
- {node v22.15 → node v24.10}/timers/promises.d.ts +1 -1
- {node v22.15 → node v24.10}/timers.d.ts +1 -3
- {node v22.15 → node v24.10}/tls.d.ts +124 -114
- {node v22.15 → node v24.10}/trace_events.d.ts +6 -6
- {node v22.15 → 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 v22.15 → 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 v22.15 → node v24.10}/tty.d.ts +1 -1
- {node v22.15 → node v24.10}/url.d.ts +119 -34
- {node v22.15 → node v24.10}/util.d.ts +45 -304
- {node v22.15 → node v24.10}/v8.d.ts +68 -38
- {node v22.15 → node v24.10}/vm.d.ts +258 -107
- {node v22.15 → 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 v22.15/dom-events.d.ts → node v24.10/web-globals/events.d.ts +49 -51
- 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 v22.15 → node v24.10}/worker_threads.d.ts +206 -68
- {node v22.15 → node v24.10}/zlib.d.ts +44 -33
- node v22.15/README.md +0 -15
- node v22.15/assert/strict.d.ts +0 -8
- node v22.15/compatibility/disposable.d.ts +0 -14
- node v22.15/compatibility/index.d.ts +0 -9
- node v22.15/compatibility/indexable.d.ts +0 -20
- node v22.15/globals.d.ts +0 -364
- node v22.15/globals.typedarray.d.ts +0 -21
- node v22.15/test.d.ts +0 -2278
- node v22.15/ts5.6/globals.typedarray.d.ts +0 -19
- {node v22.15 → node v24.10}/LICENSE +0 -0
- {node v22.15 → node v24.10}/constants.d.ts +0 -0
- {node v22.15 → node v24.10}/stream/promises.d.ts +0 -0
|
@@ -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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -748,7 +749,7 @@ declare module "process" {
|
|
|
748
749
|
* should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
|
|
749
750
|
* unless there are specific reasons such as custom dlopen flags or loading from ES modules.
|
|
750
751
|
*
|
|
751
|
-
* The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-
|
|
752
|
+
* 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
753
|
* documentation for details.
|
|
753
754
|
*
|
|
754
755
|
* An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
|
|
@@ -991,7 +992,7 @@ declare module "process" {
|
|
|
991
992
|
* @since v0.1.13
|
|
992
993
|
* @param [code=0] The exit code. For string type, only integer strings (e.g.,'1') are allowed.
|
|
993
994
|
*/
|
|
994
|
-
exit(code?: number | string | null
|
|
995
|
+
exit(code?: number | string | null): never;
|
|
995
996
|
/**
|
|
996
997
|
* A number which will be the process exit code, when the process either
|
|
997
998
|
* exits gracefully, or is exited via {@link exit} without specifying
|
|
@@ -1002,7 +1003,7 @@ declare module "process" {
|
|
|
1002
1003
|
* @default undefined
|
|
1003
1004
|
* @since v0.11.8
|
|
1004
1005
|
*/
|
|
1005
|
-
exitCode
|
|
1006
|
+
exitCode: number | string | null | undefined;
|
|
1006
1007
|
finalization: {
|
|
1007
1008
|
/**
|
|
1008
1009
|
* 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 +1467,7 @@ declare module "process" {
|
|
|
1466
1467
|
* @since v20.12.0
|
|
1467
1468
|
* @param path The path to the .env file
|
|
1468
1469
|
*/
|
|
1469
|
-
loadEnvFile(path?:
|
|
1470
|
+
loadEnvFile(path?: PathLike): void;
|
|
1470
1471
|
/**
|
|
1471
1472
|
* The `process.pid` property returns the PID of the process.
|
|
1472
1473
|
*
|
|
@@ -1490,6 +1491,18 @@ declare module "process" {
|
|
|
1490
1491
|
* @since v9.2.0, v8.10.0, v6.13.0
|
|
1491
1492
|
*/
|
|
1492
1493
|
readonly ppid: number;
|
|
1494
|
+
/**
|
|
1495
|
+
* The `process.threadCpuUsage()` method returns the user and system CPU time usage of
|
|
1496
|
+
* the current worker thread, in an object with properties `user` and `system`, whose
|
|
1497
|
+
* values are microsecond values (millionth of a second).
|
|
1498
|
+
*
|
|
1499
|
+
* The result of a previous call to `process.threadCpuUsage()` can be passed as the
|
|
1500
|
+
* argument to the function, to get a diff reading.
|
|
1501
|
+
* @since v23.9.0
|
|
1502
|
+
* @param previousValue A previous return value from calling
|
|
1503
|
+
* `process.threadCpuUsage()`
|
|
1504
|
+
*/
|
|
1505
|
+
threadCpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
1493
1506
|
/**
|
|
1494
1507
|
* The `process.title` property returns the current process title (i.e. returns
|
|
1495
1508
|
* the current value of `ps`). Assigning a new value to `process.title` modifies
|
|
@@ -1510,7 +1523,8 @@ declare module "process" {
|
|
|
1510
1523
|
title: string;
|
|
1511
1524
|
/**
|
|
1512
1525
|
* The operating system CPU architecture for which the Node.js binary was compiled.
|
|
1513
|
-
* Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
|
|
1526
|
+
* Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`,
|
|
1527
|
+
* `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
|
|
1514
1528
|
*
|
|
1515
1529
|
* ```js
|
|
1516
1530
|
* import { arch } from 'node:process';
|
|
@@ -1556,7 +1570,7 @@ declare module "process" {
|
|
|
1556
1570
|
* @since v0.1.17
|
|
1557
1571
|
* @deprecated Since v14.0.0 - Use `main` instead.
|
|
1558
1572
|
*/
|
|
1559
|
-
mainModule?: Module
|
|
1573
|
+
mainModule?: Module;
|
|
1560
1574
|
memoryUsage: MemoryUsageFn;
|
|
1561
1575
|
/**
|
|
1562
1576
|
* Gets the amount of memory available to the process (in bytes) based on
|
|
@@ -1566,13 +1580,11 @@ declare module "process" {
|
|
|
1566
1580
|
* See [`uv_get_constrained_memory`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_constrained_memory) for more
|
|
1567
1581
|
* information.
|
|
1568
1582
|
* @since v19.6.0, v18.15.0
|
|
1569
|
-
* @experimental
|
|
1570
1583
|
*/
|
|
1571
1584
|
constrainedMemory(): number;
|
|
1572
1585
|
/**
|
|
1573
1586
|
* 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
|
|
1587
|
+
* See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v24.x/api/process.html#processavailablememory) for more information.
|
|
1576
1588
|
* @since v20.13.0
|
|
1577
1589
|
*/
|
|
1578
1590
|
availableMemory(): number;
|
|
@@ -1750,18 +1762,7 @@ declare module "process" {
|
|
|
1750
1762
|
* If no IPC channel exists, this property is undefined.
|
|
1751
1763
|
* @since v7.1.0
|
|
1752
1764
|
*/
|
|
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
|
-
};
|
|
1765
|
+
channel?: Control;
|
|
1765
1766
|
/**
|
|
1766
1767
|
* If Node.js is spawned with an IPC channel, the `process.send()` method can be
|
|
1767
1768
|
* used to send messages to the parent process. Messages will be received as a `'message'` event on the parent's `ChildProcess` object.
|
|
@@ -1775,10 +1776,8 @@ declare module "process" {
|
|
|
1775
1776
|
*/
|
|
1776
1777
|
send?(
|
|
1777
1778
|
message: any,
|
|
1778
|
-
sendHandle?:
|
|
1779
|
-
options?:
|
|
1780
|
-
keepOpen?: boolean | undefined;
|
|
1781
|
-
},
|
|
1779
|
+
sendHandle?: SendHandle,
|
|
1780
|
+
options?: MessageOptions,
|
|
1782
1781
|
callback?: (error: Error | null) => void,
|
|
1783
1782
|
): boolean;
|
|
1784
1783
|
/**
|
|
@@ -1845,7 +1844,7 @@ declare module "process" {
|
|
|
1845
1844
|
allowedNodeEnvironmentFlags: ReadonlySet<string>;
|
|
1846
1845
|
/**
|
|
1847
1846
|
* `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-
|
|
1847
|
+
* Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v24.x/api/report.html).
|
|
1849
1848
|
* @since v11.8.0
|
|
1850
1849
|
*/
|
|
1851
1850
|
report: ProcessReport;
|
|
@@ -1970,6 +1969,7 @@ declare module "process" {
|
|
|
1970
1969
|
addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
1971
1970
|
addListener(event: "warning", listener: WarningListener): this;
|
|
1972
1971
|
addListener(event: "message", listener: MessageListener): this;
|
|
1972
|
+
addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
1973
1973
|
addListener(event: Signals, listener: SignalsListener): this;
|
|
1974
1974
|
addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
1975
1975
|
addListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -1981,7 +1981,8 @@ declare module "process" {
|
|
|
1981
1981
|
emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
|
|
1982
1982
|
emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
|
|
1983
1983
|
emit(event: "warning", warning: Error): boolean;
|
|
1984
|
-
emit(event: "message", message: unknown, sendHandle:
|
|
1984
|
+
emit(event: "message", message: unknown, sendHandle: SendHandle): this;
|
|
1985
|
+
emit(event: "workerMessage", value: any, source: number): this;
|
|
1985
1986
|
emit(event: Signals, signal?: Signals): boolean;
|
|
1986
1987
|
emit(
|
|
1987
1988
|
event: "multipleResolves",
|
|
@@ -2002,6 +2003,7 @@ declare module "process" {
|
|
|
2002
2003
|
on(event: Signals, listener: SignalsListener): this;
|
|
2003
2004
|
on(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2004
2005
|
on(event: "worker", listener: WorkerListener): this;
|
|
2006
|
+
on(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2005
2007
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
2006
2008
|
once(event: "beforeExit", listener: BeforeExitListener): this;
|
|
2007
2009
|
once(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -2015,6 +2017,7 @@ declare module "process" {
|
|
|
2015
2017
|
once(event: Signals, listener: SignalsListener): this;
|
|
2016
2018
|
once(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2017
2019
|
once(event: "worker", listener: WorkerListener): this;
|
|
2020
|
+
once(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2018
2021
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
2019
2022
|
prependListener(event: "beforeExit", listener: BeforeExitListener): this;
|
|
2020
2023
|
prependListener(event: "disconnect", listener: DisconnectListener): this;
|
|
@@ -2025,6 +2028,7 @@ declare module "process" {
|
|
|
2025
2028
|
prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
2026
2029
|
prependListener(event: "warning", listener: WarningListener): this;
|
|
2027
2030
|
prependListener(event: "message", listener: MessageListener): this;
|
|
2031
|
+
prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2028
2032
|
prependListener(event: Signals, listener: SignalsListener): this;
|
|
2029
2033
|
prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2030
2034
|
prependListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -2037,6 +2041,7 @@ declare module "process" {
|
|
|
2037
2041
|
prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
|
|
2038
2042
|
prependOnceListener(event: "warning", listener: WarningListener): this;
|
|
2039
2043
|
prependOnceListener(event: "message", listener: MessageListener): this;
|
|
2044
|
+
prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
|
|
2040
2045
|
prependOnceListener(event: Signals, listener: SignalsListener): this;
|
|
2041
2046
|
prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
|
|
2042
2047
|
prependOnceListener(event: "worker", listener: WorkerListener): this;
|
|
@@ -2049,6 +2054,7 @@ declare module "process" {
|
|
|
2049
2054
|
listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
|
|
2050
2055
|
listeners(event: "warning"): WarningListener[];
|
|
2051
2056
|
listeners(event: "message"): MessageListener[];
|
|
2057
|
+
listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
|
|
2052
2058
|
listeners(event: Signals): SignalsListener[];
|
|
2053
2059
|
listeners(event: "multipleResolves"): MultipleResolveListener[];
|
|
2054
2060
|
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
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-
|
|
3
|
-
* (such as [`process.stdin`](https://nodejs.org/docs/latest-
|
|
2
|
+
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
|
|
3
|
+
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
|
|
4
4
|
*
|
|
5
5
|
* To use the promise-based APIs:
|
|
6
6
|
*
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*
|
|
32
32
|
* Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be
|
|
33
33
|
* received on the `input` stream.
|
|
34
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
34
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
|
|
35
35
|
*/
|
|
36
36
|
declare module "readline" {
|
|
37
37
|
import { Abortable, EventEmitter } from "node:events";
|
|
@@ -46,7 +46,7 @@ declare module "readline" {
|
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
|
|
49
|
-
* single `input` [Readable](https://nodejs.org/docs/latest-
|
|
49
|
+
* single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
|
|
50
50
|
* The `output` stream is used to print prompts for user input that arrives on,
|
|
51
51
|
* and is read from, the `input` stream.
|
|
52
52
|
* @since v0.1.104
|
|
@@ -100,7 +100,7 @@ declare module "readline" {
|
|
|
100
100
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
101
101
|
* > `readline.createInterface()` method.
|
|
102
102
|
*
|
|
103
|
-
* @see https://nodejs.org/dist/latest-
|
|
103
|
+
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
|
|
104
104
|
*/
|
|
105
105
|
protected constructor(
|
|
106
106
|
input: NodeJS.ReadableStream,
|
|
@@ -114,7 +114,7 @@ declare module "readline" {
|
|
|
114
114
|
* > Instances of the `readline.Interface` class are constructed using the
|
|
115
115
|
* > `readline.createInterface()` method.
|
|
116
116
|
*
|
|
117
|
-
* @see https://nodejs.org/dist/latest-
|
|
117
|
+
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
|
|
118
118
|
*/
|
|
119
119
|
protected constructor(options: ReadLineOptions);
|
|
120
120
|
/**
|
|
@@ -320,11 +320,11 @@ declare module "readline" {
|
|
|
320
320
|
export type CompleterResult = [string[], string];
|
|
321
321
|
export interface ReadLineOptions {
|
|
322
322
|
/**
|
|
323
|
-
* The [`Readable`](https://nodejs.org/docs/latest-
|
|
323
|
+
* The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
|
|
324
324
|
*/
|
|
325
325
|
input: NodeJS.ReadableStream;
|
|
326
326
|
/**
|
|
327
|
-
* The [`Writable`](https://nodejs.org/docs/latest-
|
|
327
|
+
* The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
|
|
328
328
|
*/
|
|
329
329
|
output?: NodeJS.WritableStream | undefined;
|
|
330
330
|
/**
|
|
@@ -369,7 +369,7 @@ declare module "readline" {
|
|
|
369
369
|
* `crlfDelay` will be coerced to a number no less than `100`.
|
|
370
370
|
* It can be set to `Infinity`, in which case
|
|
371
371
|
* `\r` followed by `\n` will always be considered a single newline
|
|
372
|
-
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-
|
|
372
|
+
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
|
|
373
373
|
* @default 100
|
|
374
374
|
*/
|
|
375
375
|
crlfDelay?: number | undefined;
|
|
@@ -557,7 +557,7 @@ declare module "readline" {
|
|
|
557
557
|
cols: number;
|
|
558
558
|
}
|
|
559
559
|
/**
|
|
560
|
-
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-
|
|
560
|
+
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
|
|
561
561
|
* in a specified direction identified by `dir`.
|
|
562
562
|
* @since v0.7.7
|
|
563
563
|
* @param callback Invoked once the operation completes.
|
|
@@ -565,7 +565,7 @@ declare module "readline" {
|
|
|
565
565
|
*/
|
|
566
566
|
export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
|
|
567
567
|
/**
|
|
568
|
-
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-
|
|
568
|
+
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
|
|
569
569
|
* the current position of the cursor down.
|
|
570
570
|
* @since v0.7.7
|
|
571
571
|
* @param callback Invoked once the operation completes.
|
|
@@ -574,7 +574,7 @@ declare module "readline" {
|
|
|
574
574
|
export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
|
|
575
575
|
/**
|
|
576
576
|
* The `readline.cursorTo()` method moves cursor to the specified position in a
|
|
577
|
-
* given [TTY](https://nodejs.org/docs/latest-
|
|
577
|
+
* given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
|
|
578
578
|
* @since v0.7.7
|
|
579
579
|
* @param callback Invoked once the operation completes.
|
|
580
580
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
@@ -582,7 +582,7 @@ declare module "readline" {
|
|
|
582
582
|
export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
583
583
|
/**
|
|
584
584
|
* The `readline.moveCursor()` method moves the cursor _relative_ to its current
|
|
585
|
-
* position in a given [TTY](https://nodejs.org/docs/latest-
|
|
585
|
+
* position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
|
|
586
586
|
* @since v0.7.7
|
|
587
587
|
* @param callback Invoked once the operation completes.
|
|
588
588
|
* @return `false` if `stream` wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|