@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/dns.d.ts CHANGED
@@ -41,8 +41,8 @@
41
41
  * });
42
42
  * ```
43
43
  *
44
- * See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information.
45
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js)
44
+ * See the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) for more information.
45
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dns.js)
46
46
  */
47
47
  declare module "dns" {
48
48
  import * as dnsPromises from "node:dns/promises";
@@ -71,7 +71,7 @@ declare module "dns" {
71
71
  */
72
72
  family?: number | "IPv4" | "IPv6" | undefined;
73
73
  /**
74
- * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v20.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
74
+ * One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v22.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
75
75
  * passed by bitwise `OR`ing their values.
76
76
  */
77
77
  hints?: number | undefined;
@@ -84,7 +84,7 @@ declare module "dns" {
84
84
  * When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
85
85
  * by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
86
86
  * addresses before IPv4 addresses. Default value is configurable using
87
- * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
87
+ * {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
88
88
  * @default `verbatim` (addresses are not reordered)
89
89
  */
90
90
  order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
@@ -92,7 +92,7 @@ declare module "dns" {
92
92
  * When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
93
93
  * addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
94
94
  * `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
95
- * or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
95
+ * or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
96
96
  * @default true (addresses are not reordered)
97
97
  */
98
98
  verbatim?: boolean | undefined;
@@ -132,7 +132,7 @@ declare module "dns" {
132
132
  * The implementation uses an operating system facility that can associate names
133
133
  * with addresses and vice versa. This implementation can have subtle but
134
134
  * important consequences on the behavior of any Node.js program. Please take some
135
- * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations)
135
+ * time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations)
136
136
  * before using `dns.lookup()`.
137
137
  *
138
138
  * Example usage:
@@ -154,7 +154,7 @@ declare module "dns" {
154
154
  * // addresses: [{"address":"2606:2800:220:1:248:1893:25c8:1946","family":6}]
155
155
  * ```
156
156
  *
157
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed
157
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
158
158
  * version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.
159
159
  * @since v0.1.90
160
160
  */
@@ -194,7 +194,7 @@ declare module "dns" {
194
194
  * If `address` is not a valid IP address, a `TypeError` will be thrown.
195
195
  * The `port` will be coerced to a number. If it is not a legal port, a `TypeError` will be thrown.
196
196
  *
197
- * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object,
197
+ * On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
198
198
  * where `err.code` is the error code.
199
199
  *
200
200
  * ```js
@@ -205,7 +205,7 @@ declare module "dns" {
205
205
  * });
206
206
  * ```
207
207
  *
208
- * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v20.x/api/util.html#utilpromisifyoriginal) ed
208
+ * If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
209
209
  * version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.
210
210
  * @since v0.11.14
211
211
  */
@@ -322,7 +322,7 @@ declare module "dns" {
322
322
  *
323
323
  * <omitted>
324
324
  *
325
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object,
325
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
326
326
  * where `err.code` is one of the `DNS error codes`.
327
327
  * @since v0.1.27
328
328
  * @param hostname Host name to resolve.
@@ -663,8 +663,8 @@ declare module "dns" {
663
663
  * Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an
664
664
  * array of host names.
665
665
  *
666
- * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-error) object, where `err.code` is
667
- * one of the [DNS error codes](https://nodejs.org/docs/latest-v20.x/api/dns.html#error-codes).
666
+ * On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is
667
+ * one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes).
668
668
  * @since v0.1.16
669
669
  */
670
670
  export function reverse(
@@ -672,7 +672,7 @@ declare module "dns" {
672
672
  callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
673
673
  ): void;
674
674
  /**
675
- * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
675
+ * Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
676
676
  * The value could be:
677
677
  *
678
678
  * * `ipv4first`: for `order` defaulting to `ipv4first`.
@@ -727,7 +727,7 @@ declare module "dns" {
727
727
  */
728
728
  export function getServers(): string[];
729
729
  /**
730
- * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
730
+ * Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
731
731
  * The value could be:
732
732
  *
733
733
  * * `ipv4first`: sets default `order` to `ipv4first`.
@@ -735,8 +735,8 @@ declare module "dns" {
735
735
  * * `verbatim`: sets default `order` to `verbatim`.
736
736
  *
737
737
  * The default is `verbatim` and {@link setDefaultResultOrder} have higher
738
- * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using
739
- * [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
738
+ * priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
739
+ * [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
740
740
  * thread won't affect the default dns orders in workers.
741
741
  * @since v16.4.0, v14.18.0
742
742
  * @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
@@ -782,7 +782,7 @@ declare module "dns" {
782
782
  * An independent resolver for DNS requests.
783
783
  *
784
784
  * Creating a new resolver uses the default server settings. Setting
785
- * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnssetserversservers) does not affect
785
+ * the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnssetserversservers) does not affect
786
786
  * other resolvers:
787
787
  *
788
788
  * ```js
node/domain.d.ts CHANGED
@@ -12,7 +12,7 @@
12
12
  * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
13
13
  * exit immediately with an error code.
14
14
  * @deprecated Since v1.4.2 - Deprecated
15
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/domain.js)
15
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/domain.js)
16
16
  */
17
17
  declare module "domain" {
18
18
  import EventEmitter = require("node:events");
node/events.d.ts CHANGED
@@ -32,7 +32,7 @@
32
32
  * });
33
33
  * myEmitter.emit('event');
34
34
  * ```
35
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/events.js)
35
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/events.js)
36
36
  */
37
37
  declare module "events" {
38
38
  import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
node/fs/promises.d.ts CHANGED
@@ -20,6 +20,9 @@ declare module "fs/promises" {
20
20
  CopyOptions,
21
21
  Dir,
22
22
  Dirent,
23
+ GlobOptions,
24
+ GlobOptionsWithFileTypes,
25
+ GlobOptionsWithoutFileTypes,
23
26
  MakeDirectoryOptions,
24
27
  Mode,
25
28
  ObjectEncodingOptions,
@@ -1239,6 +1242,19 @@ declare module "fs/promises" {
1239
1242
  * @return Fulfills with `undefined` upon success.
1240
1243
  */
1241
1244
  function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
1245
+ /**
1246
+ * Retrieves the files matching the specified pattern.
1247
+ */
1248
+ function glob(pattern: string | string[]): AsyncIterableIterator<string>;
1249
+ /**
1250
+ * Retrieves the files matching the specified pattern.
1251
+ */
1252
+ function glob<Options extends GlobOptions>(
1253
+ pattern: string | string[],
1254
+ opt: Options,
1255
+ ): Options extends GlobOptionsWithFileTypes ? AsyncIterableIterator<Dirent>
1256
+ : Options extends GlobOptionsWithoutFileTypes ? AsyncIterableIterator<string>
1257
+ : AsyncIterableIterator<Dirent> | AsyncIterableIterator<string>;
1242
1258
  }
1243
1259
  declare module "node:fs/promises" {
1244
1260
  export * from "fs/promises";
node/fs.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * All file system operations have synchronous, callback, and promise-based
18
18
  * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
19
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/fs.js)
19
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/fs.js)
20
20
  */
21
21
  declare module "fs" {
22
22
  import * as stream from "node:stream";
@@ -130,7 +130,9 @@ declare module "fs" {
130
130
  * ```
131
131
  * @since v0.1.21
132
132
  */
133
- export class Stats {}
133
+ export class Stats {
134
+ private constructor();
135
+ }
134
136
  export interface StatsFsBase<T> {
135
137
  /** Type of file system. */
136
138
  type: T;
@@ -4311,6 +4313,62 @@ declare module "fs" {
4311
4313
  * @param dest destination path to copy to.
4312
4314
  */
4313
4315
  export function cpSync(source: string | URL, destination: string | URL, opts?: CopySyncOptions): void;
4316
+
4317
+ export interface GlobOptions {
4318
+ /**
4319
+ * Current working directory.
4320
+ * @default process.cwd()
4321
+ */
4322
+ cwd?: string | undefined;
4323
+ /**
4324
+ * Function to filter out files/directories. Return true to exclude the item, false to include it.
4325
+ */
4326
+ exclude?: ((fileName: string) => boolean) | undefined;
4327
+ /**
4328
+ * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
4329
+ * @default false
4330
+ */
4331
+ withFileTypes?: boolean | undefined;
4332
+ }
4333
+ export interface GlobOptionsWithFileTypes extends GlobOptions {
4334
+ withFileTypes: true;
4335
+ }
4336
+ export interface GlobOptionsWithoutFileTypes extends GlobOptions {
4337
+ withFileTypes?: false | undefined;
4338
+ }
4339
+ /**
4340
+ * Retrieves the files matching the specified pattern.
4341
+ */
4342
+ export function glob(
4343
+ pattern: string | string[],
4344
+ callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
4345
+ ): void;
4346
+ /**
4347
+ * Retrieves the files matching the specified pattern.
4348
+ */
4349
+ export function glob<Options extends GlobOptions>(
4350
+ pattern: string | string[],
4351
+ options: Options,
4352
+ callback: (
4353
+ err: NodeJS.ErrnoException | null,
4354
+ matches: Options extends GlobOptionsWithFileTypes ? Dirent[]
4355
+ : Options extends GlobOptionsWithoutFileTypes ? string[]
4356
+ : Dirent[] | string[],
4357
+ ) => void,
4358
+ ): void;
4359
+ /**
4360
+ * Retrieves the files matching the specified pattern.
4361
+ */
4362
+ export function globSync(pattern: string | string[]): string[];
4363
+ /**
4364
+ * Retrieves the files matching the specified pattern.
4365
+ */
4366
+ export function globSync<Options extends GlobOptions>(
4367
+ pattern: string | string[],
4368
+ options: Options,
4369
+ ): Options extends GlobOptionsWithFileTypes ? Dirent[]
4370
+ : Options extends GlobOptionsWithoutFileTypes ? string[]
4371
+ : Dirent[] | string[];
4314
4372
  }
4315
4373
  declare module "node:fs" {
4316
4374
  export * from "fs";
node/http.d.ts CHANGED
@@ -37,7 +37,7 @@
37
37
  * 'Host', 'example.com',
38
38
  * 'accepT', '*' ]
39
39
  * ```
40
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http.js)
40
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/http.js)
41
41
  */
42
42
  declare module "http" {
43
43
  import * as stream from "node:stream";
@@ -1442,7 +1442,7 @@ declare module "http" {
1442
1442
  * });
1443
1443
  * ```
1444
1444
  *
1445
- * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v20.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
1445
+ * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v22.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
1446
1446
  *
1447
1447
  * To configure any of them, a custom {@link Agent} instance must be created.
1448
1448
  *
node/http2.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * const http2 = require('node:http2');
7
7
  * ```
8
8
  * @since v8.4.0
9
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/http2.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/http2.js)
10
10
  */
11
11
  declare module "http2" {
12
12
  import EventEmitter = require("node:events");
@@ -1668,7 +1668,7 @@ declare module "http2" {
1668
1668
  * If there were no previous values for the header, this is equivalent to calling {@link setHeader}.
1669
1669
  *
1670
1670
  * Attempting to set a header field name or value that contains invalid characters will result in a
1671
- * [TypeError](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-typeerror) being thrown.
1671
+ * [TypeError](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-typeerror) being thrown.
1672
1672
  *
1673
1673
  * ```js
1674
1674
  * // Returns headers including "set-cookie: a" and "set-cookie: b"
node/https.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js)
5
5
  */
6
6
  declare module "https" {
7
7
  import { Duplex } from "node:stream";
node/inspector.d.ts CHANGED
@@ -20,7 +20,7 @@
20
20
  * ```js
21
21
  * import * as inspector from 'node:inspector';
22
22
  * ```
23
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/inspector.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/inspector.js)
24
24
  */
25
25
  declare module 'inspector' {
26
26
  import EventEmitter = require('node:events');
node/module.d.ts CHANGED
@@ -122,8 +122,6 @@ declare module "module" {
122
122
  */
123
123
  findOrigin(lineNumber: number, columnNumber: number): SourceOrigin | {};
124
124
  }
125
- /** @deprecated Use `ImportAttributes` instead */
126
- interface ImportAssertions extends ImportAttributes {}
127
125
  interface ImportAttributes extends NodeJS.Dict<string> {
128
126
  type?: string | undefined;
129
127
  }
@@ -156,10 +154,6 @@ declare module "module" {
156
154
  * Export conditions of the relevant `package.json`
157
155
  */
158
156
  conditions: string[];
159
- /**
160
- * @deprecated Use `importAttributes` instead
161
- */
162
- importAssertions: ImportAttributes;
163
157
  /**
164
158
  * An object whose key-value pairs represent the assertions for the module to import
165
159
  */
@@ -174,10 +168,6 @@ declare module "module" {
174
168
  * A hint to the load hook (it might be ignored)
175
169
  */
176
170
  format?: ModuleFormat | null | undefined;
177
- /**
178
- * @deprecated Use `importAttributes` instead
179
- */
180
- importAssertions?: ImportAttributes | undefined;
181
171
  /**
182
172
  * The import attributes to use when caching the module (optional; if excluded the input will be used)
183
173
  */
@@ -218,10 +208,6 @@ declare module "module" {
218
208
  * The format optionally supplied by the `resolve` hook chain
219
209
  */
220
210
  format: ModuleFormat;
221
- /**
222
- * @deprecated Use `importAttributes` instead
223
- */
224
- importAssertions: ImportAttributes;
225
211
  /**
226
212
  * An object whose key-value pairs represent the assertions for the module to import
227
213
  */
node/net.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * ```js
11
11
  * const net = require('node:net');
12
12
  * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/net.js)
13
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js)
14
14
  */
15
15
  declare module "net" {
16
16
  import * as stream from "node:stream";
node/os.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * const os = require('node:os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/os.js)
9
9
  */
10
10
  declare module "os" {
11
11
  interface CpuInfo {
@@ -241,7 +241,7 @@ declare module "os" {
241
241
  * environment variables for the home directory before falling back to the
242
242
  * operating system response.
243
243
  *
244
- * Throws a [`SystemError`](https://nodejs.org/docs/latest-v20.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
244
+ * Throws a [`SystemError`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
245
245
  * @since v6.0.0
246
246
  */
247
247
  function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
@@ -420,7 +420,7 @@ declare module "os" {
420
420
  * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
421
421
  * and `'x64'`.
422
422
  *
423
- * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v20.x/api/process.html#processarch).
423
+ * The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch).
424
424
  * @since v0.5.0
425
425
  */
426
426
  function arch(): string;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.14.11",
3
+ "version": "22.0.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -210,8 +210,8 @@
210
210
  },
211
211
  "scripts": {},
212
212
  "dependencies": {
213
- "undici-types": "~5.26.4"
213
+ "undici-types": "~6.11.1"
214
214
  },
215
- "typesPublisherContentHash": "e16ff5cc6bae8ed88d0ff399d3af0b1017ab1349e316830d51bf3a03a5e1a236",
215
+ "typesPublisherContentHash": "14d7e2fcf1f884d0f55bb00df1951b1b7f2ad5995765756491fdd7dca5fd256f",
216
216
  "typeScriptVersion": "4.8"
217
217
  }
node/path.d.ts CHANGED
@@ -13,7 +13,7 @@ declare module "path/win32" {
13
13
  * ```js
14
14
  * const path = require('node:path');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/path.js)
17
17
  */
18
18
  declare module "path" {
19
19
  namespace path {
node/perf_hooks.d.ts CHANGED
@@ -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/v20.13.1/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/perf_hooks.js)
31
31
  */
32
32
  declare module "perf_hooks" {
33
33
  import { AsyncResource } from "node:async_hooks";
@@ -830,7 +830,7 @@ declare module "perf_hooks" {
830
830
  global {
831
831
  /**
832
832
  * `PerformanceEntry` is a global reference for `require('node:perf_hooks').PerformanceEntry`
833
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceentry
833
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceentry
834
834
  * @since v19.0.0
835
835
  */
836
836
  var PerformanceEntry: typeof globalThis extends {
@@ -840,7 +840,7 @@ declare module "perf_hooks" {
840
840
  : typeof _PerformanceEntry;
841
841
  /**
842
842
  * `PerformanceMark` is a global reference for `require('node:perf_hooks').PerformanceMark`
843
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemark
843
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemark
844
844
  * @since v19.0.0
845
845
  */
846
846
  var PerformanceMark: typeof globalThis extends {
@@ -850,7 +850,7 @@ declare module "perf_hooks" {
850
850
  : typeof _PerformanceMark;
851
851
  /**
852
852
  * `PerformanceMeasure` is a global reference for `require('node:perf_hooks').PerformanceMeasure`
853
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performancemeasure
853
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemeasure
854
854
  * @since v19.0.0
855
855
  */
856
856
  var PerformanceMeasure: typeof globalThis extends {
@@ -860,7 +860,7 @@ declare module "perf_hooks" {
860
860
  : typeof _PerformanceMeasure;
861
861
  /**
862
862
  * `PerformanceObserver` is a global reference for `require('node:perf_hooks').PerformanceObserver`
863
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserver
863
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserver
864
864
  * @since v19.0.0
865
865
  */
866
866
  var PerformanceObserver: typeof globalThis extends {
@@ -870,7 +870,7 @@ declare module "perf_hooks" {
870
870
  : typeof _PerformanceObserver;
871
871
  /**
872
872
  * `PerformanceObserverEntryList` is a global reference for `require('node:perf_hooks').PerformanceObserverEntryList`
873
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceobserverentrylist
873
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserverentrylist
874
874
  * @since v19.0.0
875
875
  */
876
876
  var PerformanceObserverEntryList: typeof globalThis extends {
@@ -880,7 +880,7 @@ declare module "perf_hooks" {
880
880
  : typeof _PerformanceObserverEntryList;
881
881
  /**
882
882
  * `PerformanceResourceTiming` is a global reference for `require('node:perf_hooks').PerformanceResourceTiming`
883
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performanceresourcetiming
883
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceresourcetiming
884
884
  * @since v19.0.0
885
885
  */
886
886
  var PerformanceResourceTiming: typeof globalThis extends {
@@ -890,7 +890,7 @@ declare module "perf_hooks" {
890
890
  : typeof _PerformanceResourceTiming;
891
891
  /**
892
892
  * `performance` is a global reference for `require('node:perf_hooks').performance`
893
- * @see https://nodejs.org/docs/latest-v20.x/api/globals.html#performance
893
+ * @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performance
894
894
  * @since v16.0.0
895
895
  */
896
896
  var performance: typeof globalThis extends {
node/process.d.ts CHANGED
@@ -520,7 +520,7 @@ declare module "process" {
520
520
  * should not be used directly, except in special cases. In other words, `require()` should be preferred over `process.dlopen()`
521
521
  * unless there are specific reasons such as custom dlopen flags or loading from ES modules.
522
522
  *
523
- * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v20.x/api/os.html#dlopen-constants)`
523
+ * The `flags` argument is an integer that allows to specify dlopen behavior. See the `[os.constants.dlopen](https://nodejs.org/docs/latest-v22.x/api/os.html#dlopen-constants)`
524
524
  * documentation for details.
525
525
  *
526
526
  * An important requirement when calling `process.dlopen()` is that the `module` instance must be passed. Functions exported by the C++ Addon
@@ -1303,7 +1303,7 @@ declare module "process" {
1303
1303
  constrainedMemory(): number;
1304
1304
  /**
1305
1305
  * Gets the amount of free memory that is still available to the process (in bytes).
1306
- * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v20.x/api/process.html#processavailablememory) for more information.
1306
+ * See [`uv_get_available_memory`](https://nodejs.org/docs/latest-v22.x/api/process.html#processavailablememory) for more information.
1307
1307
  * @experimental
1308
1308
  * @since v20.13.0
1309
1309
  */
node/punycode.d.ts CHANGED
@@ -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/v20.13.1/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/punycode.js)
28
28
  */
29
29
  declare module "punycode" {
30
30
  /**
node/querystring.d.ts CHANGED
@@ -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/v20.13.1/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/querystring.js)
13
13
  */
14
14
  declare module "querystring" {
15
15
  interface StringifyOptions {
node/readline.d.ts CHANGED
@@ -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-v20.x/api/stream.html#readable-streams) stream
3
- * (such as [`process.stdin`](https://nodejs.org/docs/latest-v20.x/api/process.html#processstdin)) one line at a time.
2
+ * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream
3
+ * (such as [`process.stdin`](https://nodejs.org/docs/latest-v22.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/v20.13.1/lib/readline.js)
34
+ * @see [source](https://github.com/nodejs/node/blob/v22.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-v20.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v20.x/api/stream.html#writable-streams) stream.
49
+ * single `input` [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v22.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-v20.x/docs/api/readline.html#class-interfaceconstructor
103
+ * @see https://nodejs.org/dist/latest-v22.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-v20.x/docs/api/readline.html#class-interfaceconstructor
117
+ * @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
118
118
  */
119
119
  protected constructor(options: ReadLineOptions);
120
120
  /**
@@ -503,7 +503,7 @@ declare module "readline" {
503
503
  cols: number;
504
504
  }
505
505
  /**
506
- * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream
506
+ * The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream
507
507
  * in a specified direction identified by `dir`.
508
508
  * @since v0.7.7
509
509
  * @param callback Invoked once the operation completes.
@@ -511,7 +511,7 @@ declare module "readline" {
511
511
  */
512
512
  export function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
513
513
  /**
514
- * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) stream from
514
+ * The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream from
515
515
  * the current position of the cursor down.
516
516
  * @since v0.7.7
517
517
  * @param callback Invoked once the operation completes.
@@ -520,7 +520,7 @@ declare module "readline" {
520
520
  export function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
521
521
  /**
522
522
  * The `readline.cursorTo()` method moves cursor to the specified position in a
523
- * given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
523
+ * given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
524
524
  * @since v0.7.7
525
525
  * @param callback Invoked once the operation completes.
526
526
  * @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`.
@@ -528,7 +528,7 @@ declare module "readline" {
528
528
  export function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
529
529
  /**
530
530
  * The `readline.moveCursor()` method moves the cursor _relative_ to its current
531
- * position in a given [TTY](https://nodejs.org/docs/latest-v20.x/api/tty.html) `stream`.
531
+ * position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
532
532
  * @since v0.7.7
533
533
  * @param callback Invoked once the operation completes.
534
534
  * @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`.