cdk-common 2.1.11 → 2.1.13
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.
- package/.jsii +81 -3
- package/API.md +78 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +14 -1
- package/lib/managed-policies.js +14 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/concat-stream/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +18 -38
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +0 -45
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +0 -67
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +0 -54
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +0 -58
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +0 -18
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +0 -27
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +0 -24
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +0 -46
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +0 -16
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +0 -36
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +0 -20
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +0 -41
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +0 -6
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +0 -5
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +53 -16
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +0 -31
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +0 -28
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +0 -13
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +0 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +0 -35
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +0 -115
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +0 -44
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +81 -5
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +27 -23
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +0 -40
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +7 -80
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +0 -15
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +6 -16
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +0 -94
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +0 -25
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +0 -9
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +0 -10
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +0 -8
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +0 -38
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +0 -71
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +15 -61
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +0 -93
- package/node_modules/@types/form-data/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +10 -0
- package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
- package/node_modules/qs/CHANGELOG.md +6 -0
- package/node_modules/qs/dist/qs.js +16 -16
- package/node_modules/qs/lib/parse.js +2 -2
- package/node_modules/qs/package.json +3 -3
- package/node_modules/qs/test/parse.js +86 -0
- package/node_modules/qs/test/stringify.js +9 -0
- package/node_modules/qs/test/utils.js +31 -3
- package/node_modules/side-channel-list/CHANGELOG.md +25 -4
- package/node_modules/side-channel-list/index.js +1 -3
- package/node_modules/side-channel-list/package.json +8 -8
- package/node_modules/side-channel-list/test/index.js +50 -0
- package/package.json +27 -27
|
@@ -1,57 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Clusters of Node.js processes can be used to run multiple instances of Node.js
|
|
3
|
-
* that can distribute workloads among their application threads. When process isolation
|
|
4
|
-
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html)
|
|
5
|
-
* module instead, which allows running multiple application threads within a single Node.js instance.
|
|
6
|
-
*
|
|
7
|
-
* The cluster module allows easy creation of child processes that all share
|
|
8
|
-
* server ports.
|
|
9
|
-
*
|
|
10
|
-
* ```js
|
|
11
|
-
* import cluster from 'node:cluster';
|
|
12
|
-
* import http from 'node:http';
|
|
13
|
-
* import { availableParallelism } from 'node:os';
|
|
14
|
-
* import process from 'node:process';
|
|
15
|
-
*
|
|
16
|
-
* const numCPUs = availableParallelism();
|
|
17
|
-
*
|
|
18
|
-
* if (cluster.isPrimary) {
|
|
19
|
-
* console.log(`Primary ${process.pid} is running`);
|
|
20
|
-
*
|
|
21
|
-
* // Fork workers.
|
|
22
|
-
* for (let i = 0; i < numCPUs; i++) {
|
|
23
|
-
* cluster.fork();
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* cluster.on('exit', (worker, code, signal) => {
|
|
27
|
-
* console.log(`worker ${worker.process.pid} died`);
|
|
28
|
-
* });
|
|
29
|
-
* } else {
|
|
30
|
-
* // Workers can share any TCP connection
|
|
31
|
-
* // In this case it is an HTTP server
|
|
32
|
-
* http.createServer((req, res) => {
|
|
33
|
-
* res.writeHead(200);
|
|
34
|
-
* res.end('hello world\n');
|
|
35
|
-
* }).listen(8000);
|
|
36
|
-
*
|
|
37
|
-
* console.log(`Worker ${process.pid} started`);
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* Running Node.js will now share port 8000 between the workers:
|
|
42
|
-
*
|
|
43
|
-
* ```console
|
|
44
|
-
* $ node server.js
|
|
45
|
-
* Primary 3596 is running
|
|
46
|
-
* Worker 4324 started
|
|
47
|
-
* Worker 4520 started
|
|
48
|
-
* Worker 6056 started
|
|
49
|
-
* Worker 5644 started
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
53
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js)
|
|
54
|
-
*/
|
|
55
1
|
declare module "node:cluster" {
|
|
56
2
|
import * as child_process from "node:child_process";
|
|
57
3
|
import { EventEmitter, InternalEventEmitter } from "node:events";
|
|
@@ -1,61 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:console` module provides a simple debugging console that is similar to
|
|
3
|
-
* the JavaScript console mechanism provided by web browsers.
|
|
4
|
-
*
|
|
5
|
-
* The module exports two specific components:
|
|
6
|
-
*
|
|
7
|
-
* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
|
|
8
|
-
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and
|
|
9
|
-
* [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
|
|
10
|
-
*
|
|
11
|
-
* _**Warning**_: The global console object's methods are neither consistently
|
|
12
|
-
* synchronous like the browser APIs they resemble, nor are they consistently
|
|
13
|
-
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for
|
|
14
|
-
* more information.
|
|
15
|
-
*
|
|
16
|
-
* Example using the global `console`:
|
|
17
|
-
*
|
|
18
|
-
* ```js
|
|
19
|
-
* console.log('hello world');
|
|
20
|
-
* // Prints: hello world, to stdout
|
|
21
|
-
* console.log('hello %s', 'world');
|
|
22
|
-
* // Prints: hello world, to stdout
|
|
23
|
-
* console.error(new Error('Whoops, something bad happened'));
|
|
24
|
-
* // Prints error message and stack trace to stderr:
|
|
25
|
-
* // Error: Whoops, something bad happened
|
|
26
|
-
* // at [eval]:5:15
|
|
27
|
-
* // at Script.runInThisContext (node:vm:132:18)
|
|
28
|
-
* // at Object.runInThisContext (node:vm:309:38)
|
|
29
|
-
* // at node:internal/process/execution:77:19
|
|
30
|
-
* // at [eval]-wrapper:6:22
|
|
31
|
-
* // at evalScript (node:internal/process/execution:76:60)
|
|
32
|
-
* // at node:internal/main/eval_string:23:3
|
|
33
|
-
*
|
|
34
|
-
* const name = 'Will Robinson';
|
|
35
|
-
* console.warn(`Danger ${name}! Danger!`);
|
|
36
|
-
* // Prints: Danger Will Robinson! Danger!, to stderr
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* Example using the `Console` class:
|
|
40
|
-
*
|
|
41
|
-
* ```js
|
|
42
|
-
* const out = getStreamSomehow();
|
|
43
|
-
* const err = getStreamSomehow();
|
|
44
|
-
* const myConsole = new console.Console(out, err);
|
|
45
|
-
*
|
|
46
|
-
* myConsole.log('hello world');
|
|
47
|
-
* // Prints: hello world, to out
|
|
48
|
-
* myConsole.log('hello %s', 'world');
|
|
49
|
-
* // Prints: hello world, to out
|
|
50
|
-
* myConsole.error(new Error('Whoops, something bad happened'));
|
|
51
|
-
* // Prints: [Error: Whoops, something bad happened], to err
|
|
52
|
-
*
|
|
53
|
-
* const name = 'Will Robinson';
|
|
54
|
-
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
55
|
-
* // Prints: Danger Will Robinson! Danger!, to err
|
|
56
|
-
* ```
|
|
57
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js)
|
|
58
|
-
*/
|
|
59
1
|
declare module "node:console" {
|
|
60
2
|
import { InspectOptions } from "node:util";
|
|
61
3
|
namespace console {
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated The `node:constants` module is deprecated. When requiring access to constants
|
|
3
|
-
* relevant to specific Node.js builtin modules, developers should instead refer
|
|
4
|
-
* to the `constants` property exposed by the relevant module. For instance,
|
|
5
|
-
* `require('node:fs').constants` and `require('node:os').constants`.
|
|
6
|
-
*/
|
|
7
1
|
declare module "node:constants" {
|
|
8
2
|
const constants:
|
|
9
3
|
& typeof import("node:os").constants.dlopen
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:crypto` module provides cryptographic functionality that includes a
|
|
3
|
-
* set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify
|
|
4
|
-
* functions.
|
|
5
|
-
*
|
|
6
|
-
* ```js
|
|
7
|
-
* const { createHmac } = await import('node:crypto');
|
|
8
|
-
*
|
|
9
|
-
* const secret = 'abcdefg';
|
|
10
|
-
* const hash = createHmac('sha256', secret)
|
|
11
|
-
* .update('I love cupcakes')
|
|
12
|
-
* .digest('hex');
|
|
13
|
-
* console.log(hash);
|
|
14
|
-
* // Prints:
|
|
15
|
-
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
|
|
16
|
-
* ```
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/crypto.js)
|
|
18
|
-
*/
|
|
19
1
|
declare module "node:crypto" {
|
|
20
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
21
3
|
import * as stream from "node:stream";
|
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:dgram` module provides an implementation of UDP datagram sockets.
|
|
3
|
-
*
|
|
4
|
-
* ```js
|
|
5
|
-
* import dgram from 'node:dgram';
|
|
6
|
-
*
|
|
7
|
-
* const server = dgram.createSocket('udp4');
|
|
8
|
-
*
|
|
9
|
-
* server.on('error', (err) => {
|
|
10
|
-
* console.error(`server error:\n${err.stack}`);
|
|
11
|
-
* server.close();
|
|
12
|
-
* });
|
|
13
|
-
*
|
|
14
|
-
* server.on('message', (msg, rinfo) => {
|
|
15
|
-
* console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`);
|
|
16
|
-
* });
|
|
17
|
-
*
|
|
18
|
-
* server.on('listening', () => {
|
|
19
|
-
* const address = server.address();
|
|
20
|
-
* console.log(`server listening ${address.address}:${address.port}`);
|
|
21
|
-
* });
|
|
22
|
-
*
|
|
23
|
-
* server.bind(41234);
|
|
24
|
-
* // Prints: server listening 0.0.0.0:41234
|
|
25
|
-
* ```
|
|
26
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dgram.js)
|
|
27
|
-
*/
|
|
28
1
|
declare module "node:dgram" {
|
|
29
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
30
3
|
import * as dns from "node:dns";
|
|
@@ -1,27 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:diagnostics_channel` module provides an API to create named channels
|
|
3
|
-
* to report arbitrary message data for diagnostics purposes.
|
|
4
|
-
*
|
|
5
|
-
* It can be accessed using:
|
|
6
|
-
*
|
|
7
|
-
* ```js
|
|
8
|
-
* import diagnostics_channel from 'node:diagnostics_channel';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* It is intended that a module writer wanting to report diagnostics messages
|
|
12
|
-
* will create one or many top-level channels to report messages through.
|
|
13
|
-
* Channels may also be acquired at runtime but it is not encouraged
|
|
14
|
-
* due to the additional overhead of doing so. Channels may be exported for
|
|
15
|
-
* convenience, but as long as the name is known it can be acquired anywhere.
|
|
16
|
-
*
|
|
17
|
-
* If you intend for your module to produce diagnostics data for others to
|
|
18
|
-
* consume it is recommended that you include documentation of what named
|
|
19
|
-
* channels are used along with the shape of the message data. Channel names
|
|
20
|
-
* should generally include the module name to avoid collisions with data from
|
|
21
|
-
* other modules.
|
|
22
|
-
* @since v15.1.0, v14.17.0
|
|
23
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/diagnostics_channel.js)
|
|
24
|
-
*/
|
|
25
1
|
declare module "node:diagnostics_channel" {
|
|
26
2
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
27
3
|
/**
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
|
|
3
|
-
* that return `Promise` objects rather than using callbacks. The API is accessible
|
|
4
|
-
* via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`.
|
|
5
|
-
* @since v10.6.0
|
|
6
|
-
*/
|
|
7
1
|
declare module "node:dns/promises" {
|
|
8
2
|
import {
|
|
9
3
|
AnyRecord,
|
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:dns` module enables name resolution. For example, use it to look up IP
|
|
3
|
-
* addresses of host names.
|
|
4
|
-
*
|
|
5
|
-
* Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the
|
|
6
|
-
* DNS protocol for lookups. {@link lookup} uses the operating system
|
|
7
|
-
* facilities to perform name resolution. It may not need to perform any network
|
|
8
|
-
* communication. To perform name resolution the way other applications on the same
|
|
9
|
-
* system do, use {@link lookup}.
|
|
10
|
-
*
|
|
11
|
-
* ```js
|
|
12
|
-
* import dns from 'node:dns';
|
|
13
|
-
*
|
|
14
|
-
* dns.lookup('example.org', (err, address, family) => {
|
|
15
|
-
* console.log('address: %j family: IPv%s', address, family);
|
|
16
|
-
* });
|
|
17
|
-
* // address: "93.184.216.34" family: IPv4
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* All other functions in the `node:dns` module connect to an actual DNS server to
|
|
21
|
-
* perform name resolution. They will always use the network to perform DNS
|
|
22
|
-
* queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform
|
|
23
|
-
* DNS queries, bypassing other name-resolution facilities.
|
|
24
|
-
*
|
|
25
|
-
* ```js
|
|
26
|
-
* import dns from 'node:dns';
|
|
27
|
-
*
|
|
28
|
-
* dns.resolve4('archive.org', (err, addresses) => {
|
|
29
|
-
* if (err) throw err;
|
|
30
|
-
*
|
|
31
|
-
* console.log(`addresses: ${JSON.stringify(addresses)}`);
|
|
32
|
-
*
|
|
33
|
-
* addresses.forEach((a) => {
|
|
34
|
-
* dns.reverse(a, (err, hostnames) => {
|
|
35
|
-
* if (err) {
|
|
36
|
-
* throw err;
|
|
37
|
-
* }
|
|
38
|
-
* console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`);
|
|
39
|
-
* });
|
|
40
|
-
* });
|
|
41
|
-
* });
|
|
42
|
-
* ```
|
|
43
|
-
*
|
|
44
|
-
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information.
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js)
|
|
46
|
-
*/
|
|
47
1
|
declare module "node:dns" {
|
|
48
2
|
// Supported getaddrinfo flags.
|
|
49
3
|
/**
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* **This module is pending deprecation.** Once a replacement API has been
|
|
3
|
-
* finalized, this module will be fully deprecated. Most developers should
|
|
4
|
-
* **not** have cause to use this module. Users who absolutely must have
|
|
5
|
-
* the functionality that domains provide may rely on it for the time being
|
|
6
|
-
* but should expect to have to migrate to a different solution
|
|
7
|
-
* in the future.
|
|
8
|
-
*
|
|
9
|
-
* Domains provide a way to handle multiple different IO operations as a
|
|
10
|
-
* single group. If any of the event emitters or callbacks registered to a
|
|
11
|
-
* domain emit an `'error'` event, or throw an error, then the domain object
|
|
12
|
-
* will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
|
|
13
|
-
* exit immediately with an error code.
|
|
14
|
-
* @deprecated Since v1.4.2 - Deprecated
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/domain.js)
|
|
16
|
-
*/
|
|
17
1
|
declare module "node:domain" {
|
|
18
2
|
import { EventEmitter } from "node:events";
|
|
19
3
|
/**
|
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Much of the Node.js core API is built around an idiomatic asynchronous
|
|
3
|
-
* event-driven architecture in which certain kinds of objects (called "emitters")
|
|
4
|
-
* emit named events that cause `Function` objects ("listeners") to be called.
|
|
5
|
-
*
|
|
6
|
-
* For instance: a `net.Server` object emits an event each time a peer
|
|
7
|
-
* connects to it; a `fs.ReadStream` emits an event when the file is opened;
|
|
8
|
-
* a `stream` emits an event whenever data is available to be read.
|
|
9
|
-
*
|
|
10
|
-
* All objects that emit events are instances of the `EventEmitter` class. These
|
|
11
|
-
* objects expose an `eventEmitter.on()` function that allows one or more
|
|
12
|
-
* functions to be attached to named events emitted by the object. Typically,
|
|
13
|
-
* event names are camel-cased strings but any valid JavaScript property key
|
|
14
|
-
* can be used.
|
|
15
|
-
*
|
|
16
|
-
* When the `EventEmitter` object emits an event, all of the functions attached
|
|
17
|
-
* to that specific event are called _synchronously_. Any values returned by the
|
|
18
|
-
* called listeners are _ignored_ and discarded.
|
|
19
|
-
*
|
|
20
|
-
* The following example shows a simple `EventEmitter` instance with a single
|
|
21
|
-
* listener. The `eventEmitter.on()` method is used to register listeners, while
|
|
22
|
-
* the `eventEmitter.emit()` method is used to trigger the event.
|
|
23
|
-
*
|
|
24
|
-
* ```js
|
|
25
|
-
* import { EventEmitter } from 'node:events';
|
|
26
|
-
*
|
|
27
|
-
* class MyEmitter extends EventEmitter {}
|
|
28
|
-
*
|
|
29
|
-
* const myEmitter = new MyEmitter();
|
|
30
|
-
* myEmitter.on('event', () => {
|
|
31
|
-
* console.log('an event occurred!');
|
|
32
|
-
* });
|
|
33
|
-
* myEmitter.emit('event');
|
|
34
|
-
* ```
|
|
35
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/events.js)
|
|
36
|
-
*/
|
|
37
1
|
declare module "node:events" {
|
|
38
2
|
import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
|
|
39
3
|
// #region Event map helpers
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `fs/promises` API provides asynchronous file system methods that return
|
|
3
|
-
* promises.
|
|
4
|
-
*
|
|
5
|
-
* The promise APIs use the underlying Node.js threadpool to perform file
|
|
6
|
-
* system operations off the event loop thread. These operations are not
|
|
7
|
-
* synchronized or threadsafe. Care must be taken when performing multiple
|
|
8
|
-
* concurrent modifications on the same file or data corruption may occur.
|
|
9
|
-
* @since v10.0.0
|
|
10
|
-
*/
|
|
11
1
|
declare module "node:fs/promises" {
|
|
12
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
13
3
|
import { Abortable } from "node:events";
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:fs` module enables interacting with the file system in a
|
|
3
|
-
* way modeled on standard POSIX functions.
|
|
4
|
-
*
|
|
5
|
-
* To use the promise-based APIs:
|
|
6
|
-
*
|
|
7
|
-
* ```js
|
|
8
|
-
* import * as fs from 'node:fs/promises';
|
|
9
|
-
* ```
|
|
10
|
-
*
|
|
11
|
-
* To use the callback and sync APIs:
|
|
12
|
-
*
|
|
13
|
-
* ```js
|
|
14
|
-
* import * as fs from 'node:fs';
|
|
15
|
-
* ```
|
|
16
|
-
*
|
|
17
|
-
* All file system operations have synchronous, callback, and promise-based
|
|
18
|
-
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
|
|
19
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/fs.js)
|
|
20
|
-
*/
|
|
21
1
|
declare module "node:fs" {
|
|
22
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
23
3
|
import { Abortable, EventEmitter, InternalEventEmitter } from "node:events";
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* To use the HTTP server and client one must import the `node:http` module.
|
|
3
|
-
*
|
|
4
|
-
* The HTTP interfaces in Node.js are designed to support many features
|
|
5
|
-
* of the protocol which have been traditionally difficult to use.
|
|
6
|
-
* In particular, large, possibly chunk-encoded, messages. The interface is
|
|
7
|
-
* careful to never buffer entire requests or responses, so the
|
|
8
|
-
* user is able to stream data.
|
|
9
|
-
*
|
|
10
|
-
* HTTP message headers are represented by an object like this:
|
|
11
|
-
*
|
|
12
|
-
* ```json
|
|
13
|
-
* { "content-length": "123",
|
|
14
|
-
* "content-type": "text/plain",
|
|
15
|
-
* "connection": "keep-alive",
|
|
16
|
-
* "host": "example.com",
|
|
17
|
-
* "accept": "*" }
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* Keys are lowercased. Values are not modified.
|
|
21
|
-
*
|
|
22
|
-
* In order to support the full spectrum of possible HTTP applications, the Node.js
|
|
23
|
-
* HTTP API is very low-level. It deals with stream handling and message
|
|
24
|
-
* parsing only. It parses a message into headers and body but it does not
|
|
25
|
-
* parse the actual headers or the body.
|
|
26
|
-
*
|
|
27
|
-
* See `message.headers` for details on how duplicate headers are handled.
|
|
28
|
-
*
|
|
29
|
-
* The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For
|
|
30
|
-
* example, the previous message header object might have a `rawHeaders` list like the following:
|
|
31
|
-
*
|
|
32
|
-
* ```js
|
|
33
|
-
* [ 'ConTent-Length', '123456',
|
|
34
|
-
* 'content-LENGTH', '123',
|
|
35
|
-
* 'content-type', 'text/plain',
|
|
36
|
-
* 'CONNECTION', 'keep-alive',
|
|
37
|
-
* 'Host', 'example.com',
|
|
38
|
-
* 'accepT', '*' ]
|
|
39
|
-
* ```
|
|
40
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js)
|
|
41
|
-
*/
|
|
42
1
|
declare module "node:http" {
|
|
43
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
44
3
|
import { LookupOptions } from "node:dns";
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol.
|
|
3
|
-
* It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import http2 from 'node:http2';
|
|
7
|
-
* ```
|
|
8
|
-
* @since v8.4.0
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http2.js)
|
|
10
|
-
*/
|
|
11
1
|
declare module "node:http2" {
|
|
12
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
13
3
|
import { InternalEventEmitter } from "node:events";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
|
|
3
|
-
* separate module.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js)
|
|
5
|
-
*/
|
|
6
1
|
declare module "node:https" {
|
|
7
2
|
import * as http from "node:http";
|
|
8
3
|
import { Duplex } from "node:stream";
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:inspector/promises` module provides an API for interacting with the V8
|
|
3
|
-
* inspector.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js)
|
|
5
|
-
* @since v19.0.0
|
|
6
|
-
*/
|
|
7
1
|
declare module "node:inspector/promises" {
|
|
8
2
|
import { EventEmitter } from "node:events";
|
|
9
3
|
export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* > Stability: 2 - Stable
|
|
3
|
-
*
|
|
4
|
-
* The `node:net` module provides an asynchronous network API for creating stream-based
|
|
5
|
-
* TCP or `IPC` servers ({@link createServer}) and clients
|
|
6
|
-
* ({@link createConnection}).
|
|
7
|
-
*
|
|
8
|
-
* It can be accessed using:
|
|
9
|
-
*
|
|
10
|
-
* ```js
|
|
11
|
-
* import net from 'node:net';
|
|
12
|
-
* ```
|
|
13
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js)
|
|
14
|
-
*/
|
|
15
1
|
declare module "node:net" {
|
|
16
2
|
import { NonSharedBuffer } from "node:buffer";
|
|
17
3
|
import * as dns from "node:dns";
|
|
@@ -38,6 +24,7 @@ declare module "node:net" {
|
|
|
38
24
|
keepAlive?: boolean | undefined;
|
|
39
25
|
keepAliveInitialDelay?: number | undefined;
|
|
40
26
|
blockList?: BlockList | undefined;
|
|
27
|
+
typeOfService?: number | undefined;
|
|
41
28
|
}
|
|
42
29
|
interface OnReadOpts {
|
|
43
30
|
buffer: Uint8Array | (() => Uint8Array);
|
|
@@ -116,9 +103,14 @@ declare module "node:net" {
|
|
|
116
103
|
* See `Writable` stream `write()` method for more
|
|
117
104
|
* information.
|
|
118
105
|
* @since v0.1.90
|
|
119
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
120
106
|
*/
|
|
121
107
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Sends data on the socket, with an explicit encoding for string data.
|
|
110
|
+
* @see {@link Socket.write} for full details.
|
|
111
|
+
* @since v0.1.90
|
|
112
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
113
|
+
*/
|
|
122
114
|
write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
123
115
|
/**
|
|
124
116
|
* Initiate a connection on a given socket.
|
|
@@ -226,6 +218,37 @@ declare module "node:net" {
|
|
|
226
218
|
* @return The socket itself.
|
|
227
219
|
*/
|
|
228
220
|
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
|
221
|
+
/**
|
|
222
|
+
* Returns the current Type of Service (TOS) field for IPv4 packets or Traffic
|
|
223
|
+
* Class for IPv6 packets for this socket.
|
|
224
|
+
*
|
|
225
|
+
* `setTypeOfService()` may be called before the socket is connected; the value
|
|
226
|
+
* will be cached and applied when the socket establishes a connection.
|
|
227
|
+
* `getTypeOfService()` will return the currently set value even before connection.
|
|
228
|
+
*
|
|
229
|
+
* On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
|
|
230
|
+
* and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
|
|
231
|
+
* should verify platform-specific semantics.
|
|
232
|
+
* @since v25.6.0
|
|
233
|
+
* @returns The current TOS value.
|
|
234
|
+
*/
|
|
235
|
+
getTypeOfService(): number;
|
|
236
|
+
/**
|
|
237
|
+
* Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6
|
|
238
|
+
* Packets sent from this socket. This can be used to prioritize network traffic.
|
|
239
|
+
*
|
|
240
|
+
* `setTypeOfService()` may be called before the socket is connected; the value
|
|
241
|
+
* will be cached and applied when the socket establishes a connection.
|
|
242
|
+
* `getTypeOfService()` will return the currently set value even before connection.
|
|
243
|
+
*
|
|
244
|
+
* On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored,
|
|
245
|
+
* and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers
|
|
246
|
+
* should verify platform-specific semantics.
|
|
247
|
+
* @since v25.6.0
|
|
248
|
+
* @param tos The TOS value to set (0-255).
|
|
249
|
+
* @returns The socket itself.
|
|
250
|
+
*/
|
|
251
|
+
setTypeOfService(tos: number): this;
|
|
229
252
|
/**
|
|
230
253
|
* Returns the bound `address`, the address `family` name and `port` of the
|
|
231
254
|
* socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`
|
|
@@ -358,12 +381,26 @@ declare module "node:net" {
|
|
|
358
381
|
*
|
|
359
382
|
* See `writable.end()` for further details.
|
|
360
383
|
* @since v0.1.90
|
|
361
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
362
384
|
* @param callback Optional callback for when the socket is finished.
|
|
363
385
|
* @return The socket itself.
|
|
364
386
|
*/
|
|
365
387
|
end(callback?: () => void): this;
|
|
388
|
+
/**
|
|
389
|
+
* Half-closes the socket, with one final chunk of data.
|
|
390
|
+
* @see {@link Socket.end} for full details.
|
|
391
|
+
* @since v0.1.90
|
|
392
|
+
* @param callback Optional callback for when the socket is finished.
|
|
393
|
+
* @return The socket itself.
|
|
394
|
+
*/
|
|
366
395
|
end(buffer: Uint8Array | string, callback?: () => void): this;
|
|
396
|
+
/**
|
|
397
|
+
* Half-closes the socket, with one final chunk of data.
|
|
398
|
+
* @see {@link Socket.end} for full details.
|
|
399
|
+
* @since v0.1.90
|
|
400
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
401
|
+
* @param callback Optional callback for when the socket is finished.
|
|
402
|
+
* @return The socket itself.
|
|
403
|
+
*/
|
|
367
404
|
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
|
368
405
|
// #region InternalEventEmitter
|
|
369
406
|
addListener<E extends keyof SocketEventMap>(eventName: E, listener: (...args: SocketEventMap[E]) => void): this;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:os` module provides operating system-related utility methods and
|
|
3
|
-
* properties. It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import os from 'node:os';
|
|
7
|
-
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js)
|
|
9
|
-
*/
|
|
10
1
|
declare module "node:os" {
|
|
11
2
|
import { NonSharedBuffer } from "buffer";
|
|
12
3
|
interface CpuInfo {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.6.0",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
},
|
|
148
148
|
"scripts": {},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"undici-types": "~7.
|
|
150
|
+
"undici-types": "~7.19.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
154
|
-
"typeScriptVersion": "5.
|
|
153
|
+
"typesPublisherContentHash": "753bd9272f1c86686cc2d1bb435a7f033157f700201f64f0319742347e1ca060",
|
|
154
|
+
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:path` module provides utilities for working with file and directory
|
|
3
|
-
* paths. It can be accessed using:
|
|
4
|
-
*
|
|
5
|
-
* ```js
|
|
6
|
-
* import path from 'node:path';
|
|
7
|
-
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js)
|
|
9
|
-
*/
|
|
10
1
|
declare module "node:path" {
|
|
11
2
|
namespace path {
|
|
12
3
|
/**
|
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for
|
|
3
|
-
* Node.js-specific performance measurements.
|
|
4
|
-
*
|
|
5
|
-
* Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/):
|
|
6
|
-
*
|
|
7
|
-
* * [High Resolution Time](https://www.w3.org/TR/hr-time-2)
|
|
8
|
-
* * [Performance Timeline](https://w3c.github.io/performance-timeline/)
|
|
9
|
-
* * [User Timing](https://www.w3.org/TR/user-timing/)
|
|
10
|
-
* * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* import { PerformanceObserver, performance } from 'node:perf_hooks';
|
|
14
|
-
*
|
|
15
|
-
* const obs = new PerformanceObserver((items) => {
|
|
16
|
-
* console.log(items.getEntries()[0].duration);
|
|
17
|
-
* performance.clearMarks();
|
|
18
|
-
* });
|
|
19
|
-
* obs.observe({ type: 'measure' });
|
|
20
|
-
* performance.measure('Start to Now');
|
|
21
|
-
*
|
|
22
|
-
* performance.mark('A');
|
|
23
|
-
* doSomeLongRunningProcess(() => {
|
|
24
|
-
* performance.measure('A to Now', 'A');
|
|
25
|
-
*
|
|
26
|
-
* performance.mark('B');
|
|
27
|
-
* performance.measure('A to B', 'A', 'B');
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/perf_hooks.js)
|
|
31
|
-
*/
|
|
32
1
|
declare module "node:perf_hooks" {
|
|
33
2
|
import { InternalEventTargetEventProperties } from "node:events";
|
|
34
3
|
// #region web types
|