@types/node 20.14.11 → 22.0.0
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/README.md +1 -1
- node/assert.d.ts +5 -5
- node/async_hooks.d.ts +5 -5
- node/buffer.d.ts +1 -82
- node/child_process.d.ts +2 -2
- node/cluster.d.ts +15 -15
- node/console.d.ts +17 -17
- node/crypto.d.ts +5 -78
- node/dgram.d.ts +1 -1
- node/diagnostics_channel.d.ts +1 -1
- node/dns.d.ts +17 -17
- node/domain.d.ts +1 -1
- node/events.d.ts +1 -1
- node/fs/promises.d.ts +16 -0
- node/fs.d.ts +60 -2
- node/http.d.ts +2 -2
- node/http2.d.ts +2 -2
- node/https.d.ts +1 -1
- node/inspector.d.ts +1 -1
- node/module.d.ts +0 -14
- node/net.d.ts +1 -1
- node/os.d.ts +3 -3
- node/package.json +3 -3
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +8 -8
- node/process.d.ts +2 -2
- node/punycode.d.ts +1 -1
- node/querystring.d.ts +1 -1
- node/readline.d.ts +10 -10
- node/repl.d.ts +12 -12
- node/sea.d.ts +1 -1
- node/stream.d.ts +9 -9
- node/string_decoder.d.ts +1 -1
- node/test.d.ts +12 -11
- node/timers.d.ts +1 -1
- node/tls.d.ts +2 -2
- node/trace_events.d.ts +6 -6
- node/tty.d.ts +1 -1
- node/url.d.ts +1 -1
- node/util.d.ts +2 -2
- node/v8.d.ts +2 -2
- node/vm.d.ts +5 -7
- node/wasi.d.ts +1 -1
- node/worker_threads.d.ts +1 -1
- node/zlib.d.ts +3 -3
node/repl.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* ```js
|
7
7
|
* const repl = require('node:repl');
|
8
8
|
* ```
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/repl.js)
|
10
10
|
*/
|
11
11
|
declare module "repl" {
|
12
12
|
import { AsyncCompleter, Completer, Interface } from "node:readline";
|
@@ -41,8 +41,8 @@ declare module "repl" {
|
|
41
41
|
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
|
42
42
|
* additional lines.
|
43
43
|
*
|
44
|
-
* @see https://nodejs.org/dist/latest-
|
45
|
-
* @see https://nodejs.org/dist/latest-
|
44
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_default_evaluation
|
45
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_custom_evaluation_functions
|
46
46
|
*/
|
47
47
|
eval?: REPLEval | undefined;
|
48
48
|
/**
|
@@ -74,13 +74,13 @@ declare module "repl" {
|
|
74
74
|
* The function to invoke to format the output of each command before writing to `output`.
|
75
75
|
* @default a wrapper for `util.inspect`
|
76
76
|
*
|
77
|
-
* @see https://nodejs.org/dist/latest-
|
77
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_customizing_repl_output
|
78
78
|
*/
|
79
79
|
writer?: REPLWriter | undefined;
|
80
80
|
/**
|
81
81
|
* An optional function used for custom Tab auto completion.
|
82
82
|
*
|
83
|
-
* @see https://nodejs.org/dist/latest-
|
83
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#readline_use_of_the_completer_function
|
84
84
|
*/
|
85
85
|
completer?: Completer | AsyncCompleter | undefined;
|
86
86
|
/**
|
@@ -168,33 +168,33 @@ declare module "repl" {
|
|
168
168
|
/**
|
169
169
|
* A value indicating whether the REPL is currently in "editor mode".
|
170
170
|
*
|
171
|
-
* @see https://nodejs.org/dist/latest-
|
171
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_commands_and_special_keys
|
172
172
|
*/
|
173
173
|
readonly editorMode: boolean;
|
174
174
|
/**
|
175
175
|
* A value indicating whether the `_` variable has been assigned.
|
176
176
|
*
|
177
|
-
* @see https://nodejs.org/dist/latest-
|
177
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
178
178
|
*/
|
179
179
|
readonly underscoreAssigned: boolean;
|
180
180
|
/**
|
181
181
|
* The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
|
182
182
|
*
|
183
|
-
* @see https://nodejs.org/dist/latest-
|
183
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
184
184
|
*/
|
185
185
|
readonly last: any;
|
186
186
|
/**
|
187
187
|
* A value indicating whether the `_error` variable has been assigned.
|
188
188
|
*
|
189
189
|
* @since v9.8.0
|
190
|
-
* @see https://nodejs.org/dist/latest-
|
190
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
191
191
|
*/
|
192
192
|
readonly underscoreErrAssigned: boolean;
|
193
193
|
/**
|
194
194
|
* The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
|
195
195
|
*
|
196
196
|
* @since v9.8.0
|
197
|
-
* @see https://nodejs.org/dist/latest-
|
197
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
198
198
|
*/
|
199
199
|
readonly lastError: any;
|
200
200
|
/**
|
@@ -246,7 +246,7 @@ declare module "repl" {
|
|
246
246
|
*
|
247
247
|
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
248
248
|
*
|
249
|
-
* @see https://nodejs.org/dist/latest-
|
249
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_class_replserver
|
250
250
|
*/
|
251
251
|
private constructor();
|
252
252
|
/**
|
@@ -418,7 +418,7 @@ declare module "repl" {
|
|
418
418
|
/**
|
419
419
|
* Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
|
420
420
|
*
|
421
|
-
* @see https://nodejs.org/dist/latest-
|
421
|
+
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_recoverable_errors
|
422
422
|
*/
|
423
423
|
class Recoverable extends SyntaxError {
|
424
424
|
err: Error;
|
node/sea.d.ts
CHANGED
@@ -111,7 +111,7 @@
|
|
111
111
|
* ```
|
112
112
|
* @since v19.7.0, v18.16.0
|
113
113
|
* @experimental
|
114
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
114
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/src/node_sea.cc)
|
115
115
|
*/
|
116
116
|
declare module "node:sea" {
|
117
117
|
type AssetKey = string;
|
node/stream.d.ts
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
* A stream is an abstract interface for working with streaming data in Node.js.
|
3
3
|
* The `node:stream` module provides an API for implementing the stream interface.
|
4
4
|
*
|
5
|
-
* There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-
|
6
|
-
* and [`process.stdout`](https://nodejs.org/docs/latest-
|
5
|
+
* There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage)
|
6
|
+
* and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances.
|
7
7
|
*
|
8
|
-
* Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-
|
8
|
+
* Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter).
|
9
9
|
*
|
10
10
|
* To access the `node:stream` module:
|
11
11
|
*
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*
|
16
16
|
* The `node:stream` module is useful for creating new types of stream instances.
|
17
17
|
* It is usually not necessary to use the `node:stream` module to consume streams.
|
18
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
18
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js)
|
19
19
|
*/
|
20
20
|
declare module "stream" {
|
21
21
|
import { Abortable, EventEmitter } from "node:events";
|
@@ -87,13 +87,13 @@ declare module "stream" {
|
|
87
87
|
*/
|
88
88
|
readonly readableEncoding: BufferEncoding | null;
|
89
89
|
/**
|
90
|
-
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-
|
90
|
+
* Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.
|
91
91
|
* @since v12.9.0
|
92
92
|
*/
|
93
93
|
readonly readableEnded: boolean;
|
94
94
|
/**
|
95
95
|
* This property reflects the current state of a `Readable` stream as described
|
96
|
-
* in the [Three states](https://nodejs.org/docs/latest-
|
96
|
+
* in the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.
|
97
97
|
* @since v9.4.0
|
98
98
|
*/
|
99
99
|
readonly readableFlowing: boolean | null;
|
@@ -1376,7 +1376,7 @@ declare module "stream" {
|
|
1376
1376
|
function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
|
1377
1377
|
/**
|
1378
1378
|
* Returns the default highWaterMark used by streams.
|
1379
|
-
* Defaults to `
|
1379
|
+
* Defaults to `65536` (64 KiB), or `16` for `objectMode`.
|
1380
1380
|
* @since v19.9.0
|
1381
1381
|
*/
|
1382
1382
|
function getDefaultHighWaterMark(objectMode: boolean): number;
|
@@ -1417,7 +1417,7 @@ declare module "stream" {
|
|
1417
1417
|
* Especially useful in error handling scenarios where a stream is destroyed
|
1418
1418
|
* prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
|
1419
1419
|
*
|
1420
|
-
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-
|
1420
|
+
* The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamfinishedstream-options).
|
1421
1421
|
*
|
1422
1422
|
* `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
|
1423
1423
|
* invoked. The reason for this is so that unexpected `'error'` events (due to
|
@@ -1505,7 +1505,7 @@ declare module "stream" {
|
|
1505
1505
|
* );
|
1506
1506
|
* ```
|
1507
1507
|
*
|
1508
|
-
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-
|
1508
|
+
* The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streampipelinesource-transforms-destination-options).
|
1509
1509
|
*
|
1510
1510
|
* `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
|
1511
1511
|
*
|
node/string_decoder.d.ts
CHANGED
@@ -36,7 +36,7 @@
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
37
37
|
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
|
38
38
|
* ```
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js)
|
40
40
|
*/
|
41
41
|
declare module "string_decoder" {
|
42
42
|
class StringDecoder {
|
node/test.d.ts
CHANGED
@@ -76,7 +76,7 @@
|
|
76
76
|
*
|
77
77
|
* If any tests fail, the process exit code is set to `1`.
|
78
78
|
* @since v18.0.0, v16.17.0
|
79
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
79
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test.js)
|
80
80
|
*/
|
81
81
|
declare module "node:test" {
|
82
82
|
import { Readable } from "node:stream";
|
@@ -144,7 +144,7 @@ declare module "node:test" {
|
|
144
144
|
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
145
145
|
function test(fn?: TestFn): Promise<void>;
|
146
146
|
namespace test {
|
147
|
-
export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, test, todo };
|
147
|
+
export { after, afterEach, before, beforeEach, describe, it, mock, only, run, skip, suite, test, todo };
|
148
148
|
}
|
149
149
|
/**
|
150
150
|
* The `suite()` function is imported from the `node:test` module.
|
@@ -160,7 +160,7 @@ declare module "node:test" {
|
|
160
160
|
function suite(fn?: SuiteFn): Promise<void>;
|
161
161
|
namespace suite {
|
162
162
|
/**
|
163
|
-
* Shorthand for skipping a suite. This is the same as [`suite([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-
|
163
|
+
* Shorthand for skipping a suite. This is the same as [`suite([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
164
164
|
* @since v20.13.0
|
165
165
|
*/
|
166
166
|
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -168,7 +168,7 @@ declare module "node:test" {
|
|
168
168
|
function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
169
169
|
function skip(fn?: SuiteFn): Promise<void>;
|
170
170
|
/**
|
171
|
-
* Shorthand for marking a suite as `TODO`. This is the same as [`suite([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-
|
171
|
+
* Shorthand for marking a suite as `TODO`. This is the same as [`suite([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
172
172
|
* @since v20.13.0
|
173
173
|
*/
|
174
174
|
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -176,7 +176,7 @@ declare module "node:test" {
|
|
176
176
|
function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
177
177
|
function todo(fn?: SuiteFn): Promise<void>;
|
178
178
|
/**
|
179
|
-
* Shorthand for marking a suite as `only`. This is the same as [`suite([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-
|
179
|
+
* Shorthand for marking a suite as `only`. This is the same as [`suite([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#suitename-options-fn).
|
180
180
|
* @since v20.13.0
|
181
181
|
*/
|
182
182
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -195,7 +195,7 @@ declare module "node:test" {
|
|
195
195
|
function describe(fn?: SuiteFn): Promise<void>;
|
196
196
|
namespace describe {
|
197
197
|
/**
|
198
|
-
* Shorthand for skipping a suite. This is the same as [`describe([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-
|
198
|
+
* Shorthand for skipping a suite. This is the same as [`describe([name], { skip: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
199
199
|
* @since v18.15.0
|
200
200
|
*/
|
201
201
|
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -203,7 +203,7 @@ declare module "node:test" {
|
|
203
203
|
function skip(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
204
204
|
function skip(fn?: SuiteFn): Promise<void>;
|
205
205
|
/**
|
206
|
-
* Shorthand for marking a suite as `TODO`. This is the same as [`describe([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-
|
206
|
+
* Shorthand for marking a suite as `TODO`. This is the same as [`describe([name], { todo: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
207
207
|
* @since v18.15.0
|
208
208
|
*/
|
209
209
|
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -211,7 +211,7 @@ declare module "node:test" {
|
|
211
211
|
function todo(options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
212
212
|
function todo(fn?: SuiteFn): Promise<void>;
|
213
213
|
/**
|
214
|
-
* Shorthand for marking a suite as `only`. This is the same as [`describe([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-
|
214
|
+
* Shorthand for marking a suite as `only`. This is the same as [`describe([name], { only: true }[, fn])`](https://nodejs.org/docs/latest-v22.x/api/test.html#describename-options-fn).
|
215
215
|
* @since v18.15.0
|
216
216
|
*/
|
217
217
|
function only(name?: string, options?: TestOptions, fn?: SuiteFn): Promise<void>;
|
@@ -306,7 +306,7 @@ declare module "node:test" {
|
|
306
306
|
concurrency?: number | boolean | undefined;
|
307
307
|
/**
|
308
308
|
* An array containing the list of files to run. **Default** matching files from
|
309
|
-
* [test runner execution model](https://nodejs.org/docs/latest-
|
309
|
+
* [test runner execution model](https://nodejs.org/docs/latest-v22.x/api/test.html#test-runner-execution-model).
|
310
310
|
*/
|
311
311
|
files?: readonly string[] | undefined;
|
312
312
|
/**
|
@@ -1326,6 +1326,7 @@ declare module "node:test" {
|
|
1326
1326
|
only,
|
1327
1327
|
run,
|
1328
1328
|
skip,
|
1329
|
+
suite,
|
1329
1330
|
SuiteContext,
|
1330
1331
|
test,
|
1331
1332
|
test as default,
|
@@ -1679,7 +1680,7 @@ interface TestStdout extends TestLocationInfo {
|
|
1679
1680
|
* import test from 'test/reporters';
|
1680
1681
|
* ```
|
1681
1682
|
* @since v19.9.0
|
1682
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
1683
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/test/reporters.js)
|
1683
1684
|
*/
|
1684
1685
|
declare module "node:test/reporters" {
|
1685
1686
|
import { Transform, TransformOptions } from "node:stream";
|
@@ -1720,7 +1721,7 @@ declare module "node:test/reporters" {
|
|
1720
1721
|
*/
|
1721
1722
|
function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
|
1722
1723
|
/**
|
1723
|
-
* The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-
|
1724
|
+
* The `lcov` reporter outputs test coverage when used with the [`--experimental-test-coverage`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--experimental-test-coverage) flag.
|
1724
1725
|
*/
|
1725
1726
|
class Lcov extends Transform {
|
1726
1727
|
constructor(opts?: TransformOptions);
|
node/timers.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* The timer functions within Node.js implement a similar API as the timers API
|
7
7
|
* provided by Web Browsers but use a different internal implementation that is
|
8
8
|
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/timers.js)
|
10
10
|
*/
|
11
11
|
declare module "timers" {
|
12
12
|
import { Abortable } from "node:events";
|
node/tls.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* ```js
|
7
7
|
* const tls = require('node:tls');
|
8
8
|
* ```
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tls.js)
|
10
10
|
*/
|
11
11
|
declare module "tls" {
|
12
12
|
import { X509Certificate } from "node:crypto";
|
@@ -1155,7 +1155,7 @@ declare module "tls" {
|
|
1155
1155
|
* the `ciphers` option of `{@link createSecureContext}`.
|
1156
1156
|
*
|
1157
1157
|
* Not all supported ciphers are enabled by default. See
|
1158
|
-
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-
|
1158
|
+
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v22.x/api/tls.html#modifying-the-default-tls-cipher-suite).
|
1159
1159
|
*
|
1160
1160
|
* Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
|
1161
1161
|
* TLSv1.2 and below.
|
node/trace_events.d.ts
CHANGED
@@ -9,8 +9,8 @@
|
|
9
9
|
* The available categories are:
|
10
10
|
*
|
11
11
|
* * `node`: An empty placeholder.
|
12
|
-
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-
|
13
|
-
* The [`async_hooks`](https://nodejs.org/docs/latest-
|
12
|
+
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) trace data.
|
13
|
+
* The [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
|
14
14
|
* * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
|
15
15
|
* * `node.console`: Enables capture of `console.time()` and `console.count()` output.
|
16
16
|
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
|
@@ -22,7 +22,7 @@
|
|
22
22
|
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods.
|
23
23
|
* * `node.fs.async`: Enables capture of trace data for file system async methods.
|
24
24
|
* * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
|
25
|
-
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-
|
25
|
+
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v22.x/api/perf_hooks.html) measurements.
|
26
26
|
* * `node.perf.usertiming`: Enables capture of only Performance API User Timing
|
27
27
|
* measures and marks.
|
28
28
|
* * `node.perf.timerify`: Enables capture of only Performance API timerify
|
@@ -30,7 +30,7 @@
|
|
30
30
|
* * `node.promises.rejections`: Enables capture of trace data tracking the number
|
31
31
|
* of unhandled Promise rejections and handled-after-rejections.
|
32
32
|
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
|
33
|
-
* * `v8`: The [V8](https://nodejs.org/docs/latest-
|
33
|
+
* * `v8`: The [V8](https://nodejs.org/docs/latest-v22.x/api/v8.html) events are GC, compiling, and execution related.
|
34
34
|
* * `node.http`: Enables capture of trace data for http request / response.
|
35
35
|
*
|
36
36
|
* By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
|
@@ -88,9 +88,9 @@
|
|
88
88
|
* However the trace-event timestamps are expressed in microseconds,
|
89
89
|
* unlike `process.hrtime()` which returns nanoseconds.
|
90
90
|
*
|
91
|
-
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-
|
91
|
+
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#class-worker) threads.
|
92
92
|
* @experimental
|
93
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
93
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/trace_events.js)
|
94
94
|
*/
|
95
95
|
declare module "trace_events" {
|
96
96
|
/**
|
node/tty.d.ts
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
*
|
22
22
|
* In most cases, there should be little to no reason for an application to
|
23
23
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
|
24
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
24
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tty.js)
|
25
25
|
*/
|
26
26
|
declare module "tty" {
|
27
27
|
import * as net from "node:net";
|
node/url.d.ts
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* ```js
|
6
6
|
* import url from 'node:url';
|
7
7
|
* ```
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/url.js)
|
9
9
|
*/
|
10
10
|
declare module "url" {
|
11
11
|
import { Blob as NodeBlob } from "node:buffer";
|
node/util.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* ```js
|
7
7
|
* const util = require('node:util');
|
8
8
|
* ```
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/util.js)
|
10
10
|
*/
|
11
11
|
declare module "util" {
|
12
12
|
import * as types from "node:util/types";
|
@@ -1269,7 +1269,7 @@ declare module "util" {
|
|
1269
1269
|
* );
|
1270
1270
|
* ```
|
1271
1271
|
*
|
1272
|
-
* The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-
|
1272
|
+
* The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v22.x/api/util.html#modifiers).
|
1273
1273
|
* @param format A text format or an Array of text formats defined in `util.inspect.colors`.
|
1274
1274
|
* @param text The text to to be formatted.
|
1275
1275
|
* @since v20.12.0
|
node/v8.d.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
* ```js
|
5
5
|
* const v8 = require('node:v8');
|
6
6
|
* ```
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/v8.js)
|
8
8
|
*/
|
9
9
|
declare module "v8" {
|
10
10
|
import { Readable } from "node:stream";
|
@@ -466,7 +466,7 @@ declare module "v8" {
|
|
466
466
|
function stopCoverage(): void;
|
467
467
|
/**
|
468
468
|
* The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
|
469
|
-
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-
|
469
|
+
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
|
470
470
|
* @experimental
|
471
471
|
* @since v18.10.0, v16.18.0
|
472
472
|
*/
|
node/vm.d.ts
CHANGED
@@ -34,7 +34,7 @@
|
|
34
34
|
*
|
35
35
|
* console.log(x); // 1; y is not defined.
|
36
36
|
* ```
|
37
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
37
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/vm.js)
|
38
38
|
*/
|
39
39
|
declare module "vm" {
|
40
40
|
import { ImportAttributes } from "node:module";
|
@@ -66,7 +66,7 @@ declare module "vm" {
|
|
66
66
|
/**
|
67
67
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
68
68
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
69
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
69
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
70
70
|
*/
|
71
71
|
importModuleDynamically?:
|
72
72
|
| ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module)
|
@@ -348,9 +348,9 @@ declare module "vm" {
|
|
348
348
|
}
|
349
349
|
/**
|
350
350
|
* If given a `contextObject`, the `vm.createContext()` method will
|
351
|
-
* [prepare that object](https://nodejs.org/docs/latest-
|
351
|
+
* [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
352
352
|
* and return a reference to it so that it can be used in `{@link runInContext}` or
|
353
|
-
* [`script.runInContext()`](https://nodejs.org/docs/latest-
|
353
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options). Inside such
|
354
354
|
* scripts, the `contextObject` will be the global object, retaining all of its
|
355
355
|
* existing properties but also having the built-in objects and functions any
|
356
356
|
* standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
@@ -598,8 +598,6 @@ declare module "vm" {
|
|
598
598
|
specifier: string,
|
599
599
|
referencingModule: Module,
|
600
600
|
extra: {
|
601
|
-
/** @deprecated Use `attributes` instead */
|
602
|
-
assert: ImportAttributes;
|
603
601
|
attributes: ImportAttributes;
|
604
602
|
},
|
605
603
|
) => Module | Promise<Module>;
|
@@ -914,7 +912,7 @@ declare module "vm" {
|
|
914
912
|
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
915
913
|
* context to load the requested module.
|
916
914
|
*
|
917
|
-
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
915
|
+
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
918
916
|
*/
|
919
917
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
920
918
|
}
|
node/wasi.d.ts
CHANGED
@@ -67,7 +67,7 @@
|
|
67
67
|
* wat2wasm demo.wat
|
68
68
|
* ```
|
69
69
|
* @experimental
|
70
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
70
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/wasi.js)
|
71
71
|
*/
|
72
72
|
declare module "wasi" {
|
73
73
|
interface WASIOptions {
|
node/worker_threads.d.ts
CHANGED
@@ -49,7 +49,7 @@
|
|
49
49
|
*
|
50
50
|
* Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
|
51
51
|
* specifically `argv` and `execArgv` options.
|
52
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
52
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/worker_threads.js)
|
53
53
|
*/
|
54
54
|
declare module "worker_threads" {
|
55
55
|
import { Blob } from "node:buffer";
|
node/zlib.d.ts
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
* ```
|
10
10
|
*
|
11
11
|
* Compression and decompression are built around the Node.js
|
12
|
-
* [Streams API](https://nodejs.org/docs/latest-
|
12
|
+
* [Streams API](https://nodejs.org/docs/latest-v22.x/api/stream.html).
|
13
13
|
*
|
14
14
|
* Compressing or decompressing a stream (such as a file) can be accomplished by
|
15
15
|
* piping the source stream through a `zlib` `Transform` stream into a destination
|
@@ -89,7 +89,7 @@
|
|
89
89
|
* });
|
90
90
|
* ```
|
91
91
|
* @since v0.5.8
|
92
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
92
|
+
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
|
93
93
|
*/
|
94
94
|
declare module "zlib" {
|
95
95
|
import * as stream from "node:stream";
|
@@ -143,7 +143,7 @@ declare module "zlib" {
|
|
143
143
|
}
|
144
144
|
| undefined;
|
145
145
|
/**
|
146
|
-
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-
|
146
|
+
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
|
147
147
|
* @default buffer.kMaxLength
|
148
148
|
*/
|
149
149
|
maxOutputLength?: number | undefined;
|