@types/node 22.16.4 → 22.17.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 v22.16 → node v22.17}/README.md +1 -1
- {node v22.16 → node v22.17}/buffer.d.ts +0 -1
- {node v22.16 → node v22.17}/crypto.d.ts +17 -1
- {node v22.16 → node v22.17}/fs/promises.d.ts +22 -11
- {node v22.16 → node v22.17}/fs.d.ts +41 -13
- {node v22.16 → node v22.17}/http.d.ts +1 -1
- {node v22.16 → node v22.17}/http2.d.ts +12 -1
- {node v22.16 → node v22.17}/inspector.d.ts +157 -4
- {node v22.16 → node v22.17}/package.json +2 -2
- {node v22.16 → node v22.17}/readline/promises.d.ts +0 -1
- {node v22.16 → node v22.17}/stream.d.ts +0 -11
- {node v22.16 → node v22.17}/test.d.ts +8 -0
- {node v22.16 → node v22.17}/url.d.ts +1 -3
- {node v22.16 → node v22.17}/util.d.ts +5 -2
- {node v22.16 → node v22.17}/v8.d.ts +27 -30
- {node v22.16 → node v22.17}/worker_threads.d.ts +5 -0
- {node v22.16 → node v22.17}/zlib.d.ts +8 -2
- {node v22.16 → node v22.17}/LICENSE +0 -0
- {node v22.16 → node v22.17}/assert/strict.d.ts +0 -0
- {node v22.16 → node v22.17}/assert.d.ts +0 -0
- {node v22.16 → node v22.17}/async_hooks.d.ts +0 -0
- {node v22.16 → node v22.17}/buffer.buffer.d.ts +0 -0
- {node v22.16 → node v22.17}/child_process.d.ts +0 -0
- {node v22.16 → node v22.17}/cluster.d.ts +0 -0
- {node v22.16 → node v22.17}/compatibility/disposable.d.ts +0 -0
- {node v22.16 → node v22.17}/compatibility/index.d.ts +0 -0
- {node v22.16 → node v22.17}/compatibility/indexable.d.ts +0 -0
- {node v22.16 → node v22.17}/compatibility/iterators.d.ts +0 -0
- {node v22.16 → node v22.17}/console.d.ts +0 -0
- {node v22.16 → node v22.17}/constants.d.ts +0 -0
- {node v22.16 → node v22.17}/dgram.d.ts +0 -0
- {node v22.16 → node v22.17}/diagnostics_channel.d.ts +0 -0
- {node v22.16 → node v22.17}/dns/promises.d.ts +0 -0
- {node v22.16 → node v22.17}/dns.d.ts +0 -0
- {node v22.16 → node v22.17}/dom-events.d.ts +0 -0
- {node v22.16 → node v22.17}/domain.d.ts +0 -0
- {node v22.16 → node v22.17}/events.d.ts +0 -0
- {node v22.16 → node v22.17}/globals.d.ts +0 -0
- {node v22.16 → node v22.17}/globals.typedarray.d.ts +0 -0
- {node v22.16 → node v22.17}/https.d.ts +0 -0
- {node v22.16 → node v22.17}/index.d.ts +0 -0
- {node v22.16 → node v22.17}/module.d.ts +0 -0
- {node v22.16 → node v22.17}/net.d.ts +0 -0
- {node v22.16 → node v22.17}/os.d.ts +0 -0
- {node v22.16 → node v22.17}/path.d.ts +0 -0
- {node v22.16 → node v22.17}/perf_hooks.d.ts +0 -0
- {node v22.16 → node v22.17}/process.d.ts +0 -0
- {node v22.16 → node v22.17}/punycode.d.ts +0 -0
- {node v22.16 → node v22.17}/querystring.d.ts +0 -0
- {node v22.16 → node v22.17}/readline.d.ts +0 -0
- {node v22.16 → node v22.17}/repl.d.ts +0 -0
- {node v22.16 → node v22.17}/sea.d.ts +0 -0
- {node v22.16 → node v22.17}/sqlite.d.ts +0 -0
- {node v22.16 → node v22.17}/stream/consumers.d.ts +0 -0
- {node v22.16 → node v22.17}/stream/promises.d.ts +0 -0
- {node v22.16 → node v22.17}/stream/web.d.ts +0 -0
- {node v22.16 → node v22.17}/string_decoder.d.ts +0 -0
- {node v22.16 → node v22.17}/timers/promises.d.ts +0 -0
- {node v22.16 → node v22.17}/timers.d.ts +0 -0
- {node v22.16 → node v22.17}/tls.d.ts +0 -0
- {node v22.16 → node v22.17}/trace_events.d.ts +0 -0
- {node v22.16 → node v22.17}/ts5.6/buffer.buffer.d.ts +0 -0
- {node v22.16 → node v22.17}/ts5.6/globals.typedarray.d.ts +0 -0
- {node v22.16 → node v22.17}/ts5.6/index.d.ts +0 -0
- {node v22.16 → node v22.17}/tty.d.ts +0 -0
- {node v22.16 → node v22.17}/vm.d.ts +0 -0
- {node v22.16 → node v22.17}/wasi.d.ts +0 -0
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v22.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated: Tue,
|
11
|
+
* Last updated: Tue, 29 Jul 2025 15:04:17 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
@@ -118,7 +118,6 @@ declare module "buffer" {
|
|
118
118
|
* Resolves a `'blob:nodedata:...'` an associated `Blob` object registered using
|
119
119
|
* a prior call to `URL.createObjectURL()`.
|
120
120
|
* @since v16.7.0
|
121
|
-
* @experimental
|
122
121
|
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
123
122
|
*/
|
124
123
|
export function resolveObjectURL(id: string): Blob | undefined;
|
@@ -3764,7 +3764,23 @@ declare module "crypto" {
|
|
3764
3764
|
*/
|
3765
3765
|
checkIP(ip: string): string | undefined;
|
3766
3766
|
/**
|
3767
|
-
* Checks whether this certificate was issued by the given `otherCert
|
3767
|
+
* Checks whether this certificate was potentially issued by the given `otherCert`
|
3768
|
+
* by comparing the certificate metadata.
|
3769
|
+
*
|
3770
|
+
* This is useful for pruning a list of possible issuer certificates which have been
|
3771
|
+
* selected using a more rudimentary filtering routine, i.e. just based on subject
|
3772
|
+
* and issuer names.
|
3773
|
+
*
|
3774
|
+
* Finally, to verify that this certificate's signature was produced by a private key
|
3775
|
+
* corresponding to `otherCert`'s public key use `x509.verify(publicKey)`
|
3776
|
+
* with `otherCert`'s public key represented as a `KeyObject`
|
3777
|
+
* like so
|
3778
|
+
*
|
3779
|
+
* ```js
|
3780
|
+
* if (!x509.verify(otherCert.publicKey)) {
|
3781
|
+
* throw new Error('otherCert did not issue x509');
|
3782
|
+
* }
|
3783
|
+
* ```
|
3768
3784
|
* @since v15.6.0
|
3769
3785
|
*/
|
3770
3786
|
checkIssued(otherCert: X509Certificate): boolean;
|
@@ -88,6 +88,9 @@ declare module "fs/promises" {
|
|
88
88
|
highWaterMark?: number | undefined;
|
89
89
|
flush?: boolean | undefined;
|
90
90
|
}
|
91
|
+
interface ReadableWebStreamOptions {
|
92
|
+
autoClose?: boolean | undefined;
|
93
|
+
}
|
91
94
|
// TODO: Add `EventEmitter` close
|
92
95
|
interface FileHandle {
|
93
96
|
/**
|
@@ -260,9 +263,8 @@ declare module "fs/promises" {
|
|
260
263
|
* While the `ReadableStream` will read the file to completion, it will not
|
261
264
|
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
|
262
265
|
* @since v17.0.0
|
263
|
-
* @experimental
|
264
266
|
*/
|
265
|
-
readableWebStream(): ReadableStream;
|
267
|
+
readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
|
266
268
|
/**
|
267
269
|
* Asynchronously reads the entire contents of a file.
|
268
270
|
*
|
@@ -475,7 +477,8 @@ declare module "fs/promises" {
|
|
475
477
|
*/
|
476
478
|
close(): Promise<void>;
|
477
479
|
/**
|
478
|
-
*
|
480
|
+
* Calls `filehandle.close()` and returns a promise that fulfills when the
|
481
|
+
* filehandle is closed.
|
479
482
|
* @since v20.4.0
|
480
483
|
*/
|
481
484
|
[Symbol.asyncDispose](): Promise<void>;
|
@@ -1252,20 +1255,28 @@ declare module "fs/promises" {
|
|
1252
1255
|
*/
|
1253
1256
|
function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
|
1254
1257
|
/**
|
1255
|
-
*
|
1258
|
+
* ```js
|
1259
|
+
* import { glob } from 'node:fs/promises';
|
1260
|
+
*
|
1261
|
+
* for await (const entry of glob('*.js'))
|
1262
|
+
* console.log(entry);
|
1263
|
+
* ```
|
1264
|
+
* @since v22.0.0
|
1265
|
+
* @returns An AsyncIterator that yields the paths of files
|
1266
|
+
* that match the pattern.
|
1256
1267
|
*/
|
1257
|
-
function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
|
1268
|
+
function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
|
1258
1269
|
function glob(
|
1259
|
-
pattern: string | string[],
|
1260
|
-
|
1270
|
+
pattern: string | readonly string[],
|
1271
|
+
options: GlobOptionsWithFileTypes,
|
1261
1272
|
): NodeJS.AsyncIterator<Dirent>;
|
1262
1273
|
function glob(
|
1263
|
-
pattern: string | string[],
|
1264
|
-
|
1274
|
+
pattern: string | readonly string[],
|
1275
|
+
options: GlobOptionsWithoutFileTypes,
|
1265
1276
|
): NodeJS.AsyncIterator<string>;
|
1266
1277
|
function glob(
|
1267
|
-
pattern: string | string[],
|
1268
|
-
|
1278
|
+
pattern: string | readonly string[],
|
1279
|
+
options: GlobOptions,
|
1269
1280
|
): NodeJS.AsyncIterator<Dirent | string>;
|
1270
1281
|
}
|
1271
1282
|
declare module "node:fs/promises" {
|
@@ -243,8 +243,8 @@ declare module "fs" {
|
|
243
243
|
*/
|
244
244
|
name: Name;
|
245
245
|
/**
|
246
|
-
* The
|
247
|
-
* @since v20.12.0
|
246
|
+
* The path to the parent directory of the file this `fs.Dirent` object refers to.
|
247
|
+
* @since v20.12.0, v18.20.0
|
248
248
|
*/
|
249
249
|
parentPath: string;
|
250
250
|
/**
|
@@ -328,6 +328,19 @@ declare module "fs" {
|
|
328
328
|
* @since v12.12.0
|
329
329
|
*/
|
330
330
|
readSync(): Dirent | null;
|
331
|
+
/**
|
332
|
+
* Calls `dir.close()` and returns a promise that fulfills when the
|
333
|
+
* dir is closed.
|
334
|
+
* @since v22.17.0
|
335
|
+
* @experimental
|
336
|
+
*/
|
337
|
+
[Symbol.asyncDispose](): Promise<void>;
|
338
|
+
/**
|
339
|
+
* Calls `dir.closeSync()` and returns `undefined`.
|
340
|
+
* @since v22.17.0
|
341
|
+
* @experimental
|
342
|
+
*/
|
343
|
+
[Symbol.dispose](): void;
|
331
344
|
}
|
332
345
|
/**
|
333
346
|
* Class: fs.StatWatcher
|
@@ -4200,7 +4213,6 @@ declare module "fs" {
|
|
4200
4213
|
* blob.stream();
|
4201
4214
|
* ```
|
4202
4215
|
* @since v19.8.0
|
4203
|
-
* @experimental
|
4204
4216
|
*/
|
4205
4217
|
export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
|
4206
4218
|
|
@@ -4361,7 +4373,7 @@ declare module "fs" {
|
|
4361
4373
|
* Current working directory.
|
4362
4374
|
* @default process.cwd()
|
4363
4375
|
*/
|
4364
|
-
cwd?: string | undefined;
|
4376
|
+
cwd?: string | URL | undefined;
|
4365
4377
|
/**
|
4366
4378
|
* `true` if the glob should return paths as `Dirent`s, `false` otherwise.
|
4367
4379
|
* @default false
|
@@ -4386,13 +4398,23 @@ declare module "fs" {
|
|
4386
4398
|
|
4387
4399
|
/**
|
4388
4400
|
* Retrieves the files matching the specified pattern.
|
4401
|
+
*
|
4402
|
+
* ```js
|
4403
|
+
* import { glob } from 'node:fs';
|
4404
|
+
*
|
4405
|
+
* glob('*.js', (err, matches) => {
|
4406
|
+
* if (err) throw err;
|
4407
|
+
* console.log(matches);
|
4408
|
+
* });
|
4409
|
+
* ```
|
4410
|
+
* @since v22.0.0
|
4389
4411
|
*/
|
4390
4412
|
export function glob(
|
4391
|
-
pattern: string | string[],
|
4413
|
+
pattern: string | readonly string[],
|
4392
4414
|
callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
|
4393
4415
|
): void;
|
4394
4416
|
export function glob(
|
4395
|
-
pattern: string | string[],
|
4417
|
+
pattern: string | readonly string[],
|
4396
4418
|
options: GlobOptionsWithFileTypes,
|
4397
4419
|
callback: (
|
4398
4420
|
err: NodeJS.ErrnoException | null,
|
@@ -4400,7 +4422,7 @@ declare module "fs" {
|
|
4400
4422
|
) => void,
|
4401
4423
|
): void;
|
4402
4424
|
export function glob(
|
4403
|
-
pattern: string | string[],
|
4425
|
+
pattern: string | readonly string[],
|
4404
4426
|
options: GlobOptionsWithoutFileTypes,
|
4405
4427
|
callback: (
|
4406
4428
|
err: NodeJS.ErrnoException | null,
|
@@ -4408,7 +4430,7 @@ declare module "fs" {
|
|
4408
4430
|
) => void,
|
4409
4431
|
): void;
|
4410
4432
|
export function glob(
|
4411
|
-
pattern: string | string[],
|
4433
|
+
pattern: string | readonly string[],
|
4412
4434
|
options: GlobOptions,
|
4413
4435
|
callback: (
|
4414
4436
|
err: NodeJS.ErrnoException | null,
|
@@ -4416,19 +4438,25 @@ declare module "fs" {
|
|
4416
4438
|
) => void,
|
4417
4439
|
): void;
|
4418
4440
|
/**
|
4419
|
-
*
|
4441
|
+
* ```js
|
4442
|
+
* import { globSync } from 'node:fs';
|
4443
|
+
*
|
4444
|
+
* console.log(globSync('*.js'));
|
4445
|
+
* ```
|
4446
|
+
* @since v22.0.0
|
4447
|
+
* @returns paths of files that match the pattern.
|
4420
4448
|
*/
|
4421
|
-
export function globSync(pattern: string | string[]): string[];
|
4449
|
+
export function globSync(pattern: string | readonly string[]): string[];
|
4422
4450
|
export function globSync(
|
4423
|
-
pattern: string | string[],
|
4451
|
+
pattern: string | readonly string[],
|
4424
4452
|
options: GlobOptionsWithFileTypes,
|
4425
4453
|
): Dirent[];
|
4426
4454
|
export function globSync(
|
4427
|
-
pattern: string | string[],
|
4455
|
+
pattern: string | readonly string[],
|
4428
4456
|
options: GlobOptionsWithoutFileTypes,
|
4429
4457
|
): string[];
|
4430
4458
|
export function globSync(
|
4431
|
-
pattern: string | string[],
|
4459
|
+
pattern: string | readonly string[],
|
4432
4460
|
options: GlobOptions,
|
4433
4461
|
): Dirent[] | string[];
|
4434
4462
|
}
|
@@ -965,7 +965,10 @@ declare module "http2" {
|
|
965
965
|
* * `:path` \= `/`
|
966
966
|
* @since v8.4.0
|
967
967
|
*/
|
968
|
-
request(
|
968
|
+
request(
|
969
|
+
headers?: OutgoingHttpHeaders | readonly string[],
|
970
|
+
options?: ClientSessionRequestOptions,
|
971
|
+
): ClientHttp2Stream;
|
969
972
|
addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
|
970
973
|
addListener(event: "origin", listener: (origins: string[]) => void): this;
|
971
974
|
addListener(
|
@@ -1291,6 +1294,14 @@ declare module "http2" {
|
|
1291
1294
|
* @default 100000
|
1292
1295
|
*/
|
1293
1296
|
unknownProtocolTimeout?: number | undefined;
|
1297
|
+
/**
|
1298
|
+
* If `true`, it turns on strict leading
|
1299
|
+
* and trailing whitespace validation for HTTP/2 header field names and values
|
1300
|
+
* as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1).
|
1301
|
+
* @since v24.2.0
|
1302
|
+
* @default true
|
1303
|
+
*/
|
1304
|
+
strictFieldWhitespaceValidation?: boolean | undefined;
|
1294
1305
|
}
|
1295
1306
|
export interface ClientSessionOptions extends SessionOptions {
|
1296
1307
|
/**
|
@@ -1768,12 +1768,26 @@ declare module 'inspector' {
|
|
1768
1768
|
status: number;
|
1769
1769
|
statusText: string;
|
1770
1770
|
headers: Headers;
|
1771
|
+
mimeType: string;
|
1772
|
+
charset: string;
|
1771
1773
|
}
|
1772
1774
|
/**
|
1773
1775
|
* Request / response headers as keys / values of JSON object.
|
1774
1776
|
*/
|
1775
1777
|
interface Headers {
|
1776
1778
|
}
|
1779
|
+
interface StreamResourceContentParameterType {
|
1780
|
+
/**
|
1781
|
+
* Identifier of the request to stream.
|
1782
|
+
*/
|
1783
|
+
requestId: RequestId;
|
1784
|
+
}
|
1785
|
+
interface StreamResourceContentReturnType {
|
1786
|
+
/**
|
1787
|
+
* Data that has been buffered until streaming is enabled.
|
1788
|
+
*/
|
1789
|
+
bufferedData: never;
|
1790
|
+
}
|
1777
1791
|
interface RequestWillBeSentEventDataType {
|
1778
1792
|
/**
|
1779
1793
|
* Request identifier.
|
@@ -1842,12 +1856,59 @@ declare module 'inspector' {
|
|
1842
1856
|
*/
|
1843
1857
|
timestamp: MonotonicTime;
|
1844
1858
|
}
|
1859
|
+
interface DataReceivedEventDataType {
|
1860
|
+
/**
|
1861
|
+
* Request identifier.
|
1862
|
+
*/
|
1863
|
+
requestId: RequestId;
|
1864
|
+
/**
|
1865
|
+
* Timestamp.
|
1866
|
+
*/
|
1867
|
+
timestamp: MonotonicTime;
|
1868
|
+
/**
|
1869
|
+
* Data chunk length.
|
1870
|
+
*/
|
1871
|
+
dataLength: number;
|
1872
|
+
/**
|
1873
|
+
* Actual bytes received (might be less than dataLength for compressed encodings).
|
1874
|
+
*/
|
1875
|
+
encodedDataLength: number;
|
1876
|
+
/**
|
1877
|
+
* Data that was received.
|
1878
|
+
* @experimental
|
1879
|
+
*/
|
1880
|
+
data?: never | undefined;
|
1881
|
+
}
|
1845
1882
|
}
|
1846
1883
|
namespace NodeRuntime {
|
1847
1884
|
interface NotifyWhenWaitingForDisconnectParameterType {
|
1848
1885
|
enabled: boolean;
|
1849
1886
|
}
|
1850
1887
|
}
|
1888
|
+
namespace Target {
|
1889
|
+
type SessionID = string;
|
1890
|
+
type TargetID = string;
|
1891
|
+
interface TargetInfo {
|
1892
|
+
targetId: TargetID;
|
1893
|
+
type: string;
|
1894
|
+
title: string;
|
1895
|
+
url: string;
|
1896
|
+
attached: boolean;
|
1897
|
+
canAccessOpener: boolean;
|
1898
|
+
}
|
1899
|
+
interface SetAutoAttachParameterType {
|
1900
|
+
autoAttach: boolean;
|
1901
|
+
waitForDebuggerOnStart: boolean;
|
1902
|
+
}
|
1903
|
+
interface TargetCreatedEventDataType {
|
1904
|
+
targetInfo: TargetInfo;
|
1905
|
+
}
|
1906
|
+
interface AttachedToTargetEventDataType {
|
1907
|
+
sessionId: SessionID;
|
1908
|
+
targetInfo: TargetInfo;
|
1909
|
+
waitingForDebugger: boolean;
|
1910
|
+
}
|
1911
|
+
}
|
1851
1912
|
|
1852
1913
|
/**
|
1853
1914
|
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
@@ -2224,6 +2285,17 @@ declare module 'inspector' {
|
|
2224
2285
|
* Enables network tracking, network events will now be delivered to the client.
|
2225
2286
|
*/
|
2226
2287
|
post(method: 'Network.enable', callback?: (err: Error | null) => void): void;
|
2288
|
+
/**
|
2289
|
+
* Enables streaming of the response for the given requestId.
|
2290
|
+
* If enabled, the dataReceived event contains the data that was received during streaming.
|
2291
|
+
* @experimental
|
2292
|
+
*/
|
2293
|
+
post(
|
2294
|
+
method: 'Network.streamResourceContent',
|
2295
|
+
params?: Network.StreamResourceContentParameterType,
|
2296
|
+
callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void
|
2297
|
+
): void;
|
2298
|
+
post(method: 'Network.streamResourceContent', callback?: (err: Error | null, params: Network.StreamResourceContentReturnType) => void): void;
|
2227
2299
|
/**
|
2228
2300
|
* Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
|
2229
2301
|
*/
|
@@ -2237,6 +2309,8 @@ declare module 'inspector' {
|
|
2237
2309
|
*/
|
2238
2310
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
|
2239
2311
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
|
2312
|
+
post(method: 'Target.setAutoAttach', params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void;
|
2313
|
+
post(method: 'Target.setAutoAttach', callback?: (err: Error | null) => void): void;
|
2240
2314
|
|
2241
2315
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
2242
2316
|
/**
|
@@ -2343,6 +2417,10 @@ declare module 'inspector' {
|
|
2343
2417
|
addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
2344
2418
|
addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
2345
2419
|
addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
2420
|
+
/**
|
2421
|
+
* Fired when data chunk was received over the network.
|
2422
|
+
*/
|
2423
|
+
addListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
2346
2424
|
/**
|
2347
2425
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
2348
2426
|
* enabled.
|
@@ -2355,6 +2433,8 @@ declare module 'inspector' {
|
|
2355
2433
|
* example, when inspector.waitingForDebugger is called
|
2356
2434
|
*/
|
2357
2435
|
addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2436
|
+
addListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
2437
|
+
addListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
2358
2438
|
emit(event: string | symbol, ...args: any[]): boolean;
|
2359
2439
|
emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
|
2360
2440
|
emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
@@ -2386,8 +2466,11 @@ declare module 'inspector' {
|
|
2386
2466
|
emit(event: 'Network.responseReceived', message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
|
2387
2467
|
emit(event: 'Network.loadingFailed', message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
|
2388
2468
|
emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
|
2469
|
+
emit(event: 'Network.dataReceived', message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
|
2389
2470
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
2390
2471
|
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
2472
|
+
emit(event: 'Target.targetCreated', message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
|
2473
|
+
emit(event: 'Target.attachedToTarget', message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
|
2391
2474
|
on(event: string, listener: (...args: any[]) => void): this;
|
2392
2475
|
/**
|
2393
2476
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -2493,6 +2576,10 @@ declare module 'inspector' {
|
|
2493
2576
|
on(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
2494
2577
|
on(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
2495
2578
|
on(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
2579
|
+
/**
|
2580
|
+
* Fired when data chunk was received over the network.
|
2581
|
+
*/
|
2582
|
+
on(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
2496
2583
|
/**
|
2497
2584
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
2498
2585
|
* enabled.
|
@@ -2505,6 +2592,8 @@ declare module 'inspector' {
|
|
2505
2592
|
* example, when inspector.waitingForDebugger is called
|
2506
2593
|
*/
|
2507
2594
|
on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2595
|
+
on(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
2596
|
+
on(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
2508
2597
|
once(event: string, listener: (...args: any[]) => void): this;
|
2509
2598
|
/**
|
2510
2599
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -2610,6 +2699,10 @@ declare module 'inspector' {
|
|
2610
2699
|
once(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
2611
2700
|
once(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
2612
2701
|
once(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
2702
|
+
/**
|
2703
|
+
* Fired when data chunk was received over the network.
|
2704
|
+
*/
|
2705
|
+
once(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
2613
2706
|
/**
|
2614
2707
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
2615
2708
|
* enabled.
|
@@ -2622,6 +2715,8 @@ declare module 'inspector' {
|
|
2622
2715
|
* example, when inspector.waitingForDebugger is called
|
2623
2716
|
*/
|
2624
2717
|
once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2718
|
+
once(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
2719
|
+
once(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
2625
2720
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
2626
2721
|
/**
|
2627
2722
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -2727,6 +2822,10 @@ declare module 'inspector' {
|
|
2727
2822
|
prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
2728
2823
|
prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
2729
2824
|
prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
2825
|
+
/**
|
2826
|
+
* Fired when data chunk was received over the network.
|
2827
|
+
*/
|
2828
|
+
prependListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
2730
2829
|
/**
|
2731
2830
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
2732
2831
|
* enabled.
|
@@ -2739,6 +2838,8 @@ declare module 'inspector' {
|
|
2739
2838
|
* example, when inspector.waitingForDebugger is called
|
2740
2839
|
*/
|
2741
2840
|
prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2841
|
+
prependListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
2842
|
+
prependListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
2742
2843
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
2743
2844
|
/**
|
2744
2845
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -2844,6 +2945,10 @@ declare module 'inspector' {
|
|
2844
2945
|
prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
2845
2946
|
prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
2846
2947
|
prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
2948
|
+
/**
|
2949
|
+
* Fired when data chunk was received over the network.
|
2950
|
+
*/
|
2951
|
+
prependOnceListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
2847
2952
|
/**
|
2848
2953
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
2849
2954
|
* enabled.
|
@@ -2856,6 +2961,8 @@ declare module 'inspector' {
|
|
2856
2961
|
* example, when inspector.waitingForDebugger is called
|
2857
2962
|
*/
|
2858
2963
|
prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
2964
|
+
prependOnceListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
2965
|
+
prependOnceListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
2859
2966
|
}
|
2860
2967
|
|
2861
2968
|
/**
|
@@ -2942,13 +3049,20 @@ declare module 'inspector' {
|
|
2942
3049
|
|
2943
3050
|
// DevTools protocol event broadcast methods
|
2944
3051
|
namespace Network {
|
3052
|
+
/**
|
3053
|
+
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
3054
|
+
*
|
3055
|
+
* Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
|
3056
|
+
* `Network.streamResourceContent` command was not invoked for the given request yet.
|
3057
|
+
* @since v22.17.0
|
3058
|
+
*/
|
3059
|
+
function dataReceived(params: DataReceivedEventDataType): void;
|
2945
3060
|
/**
|
2946
3061
|
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
2947
3062
|
*
|
2948
3063
|
* Broadcasts the `Network.requestWillBeSent` event to connected frontends. This event indicates that
|
2949
3064
|
* the application is about to send an HTTP request.
|
2950
3065
|
* @since v22.6.0
|
2951
|
-
* @experimental
|
2952
3066
|
*/
|
2953
3067
|
function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
|
2954
3068
|
/**
|
@@ -2957,7 +3071,6 @@ declare module 'inspector' {
|
|
2957
3071
|
* Broadcasts the `Network.responseReceived` event to connected frontends. This event indicates that
|
2958
3072
|
* HTTP response is available.
|
2959
3073
|
* @since v22.6.0
|
2960
|
-
* @experimental
|
2961
3074
|
*/
|
2962
3075
|
function responseReceived(params: ResponseReceivedEventDataType): void;
|
2963
3076
|
/**
|
@@ -2966,7 +3079,6 @@ declare module 'inspector' {
|
|
2966
3079
|
* Broadcasts the `Network.loadingFinished` event to connected frontends. This event indicates that
|
2967
3080
|
* HTTP request has finished loading.
|
2968
3081
|
* @since v22.6.0
|
2969
|
-
* @experimental
|
2970
3082
|
*/
|
2971
3083
|
function loadingFinished(params: LoadingFinishedEventDataType): void;
|
2972
3084
|
/**
|
@@ -2975,7 +3087,6 @@ declare module 'inspector' {
|
|
2975
3087
|
* Broadcasts the `Network.loadingFailed` event to connected frontends. This event indicates that
|
2976
3088
|
* HTTP request has failed to load.
|
2977
3089
|
* @since v22.7.0
|
2978
|
-
* @experimental
|
2979
3090
|
*/
|
2980
3091
|
function loadingFailed(params: LoadingFailedEventDataType): void;
|
2981
3092
|
}
|
@@ -3014,6 +3125,7 @@ declare module 'inspector/promises' {
|
|
3014
3125
|
NodeWorker,
|
3015
3126
|
Network,
|
3016
3127
|
NodeRuntime,
|
3128
|
+
Target,
|
3017
3129
|
} from 'inspector';
|
3018
3130
|
|
3019
3131
|
/**
|
@@ -3338,6 +3450,12 @@ declare module 'inspector/promises' {
|
|
3338
3450
|
* Enables network tracking, network events will now be delivered to the client.
|
3339
3451
|
*/
|
3340
3452
|
post(method: 'Network.enable'): Promise<void>;
|
3453
|
+
/**
|
3454
|
+
* Enables streaming of the response for the given requestId.
|
3455
|
+
* If enabled, the dataReceived event contains the data that was received during streaming.
|
3456
|
+
* @experimental
|
3457
|
+
*/
|
3458
|
+
post(method: 'Network.streamResourceContent', params?: Network.StreamResourceContentParameterType): Promise<Network.StreamResourceContentReturnType>;
|
3341
3459
|
/**
|
3342
3460
|
* Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
|
3343
3461
|
*/
|
@@ -3350,6 +3468,7 @@ declare module 'inspector/promises' {
|
|
3350
3468
|
* Enable the `NodeRuntime.waitingForDisconnect`.
|
3351
3469
|
*/
|
3352
3470
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
|
3471
|
+
post(method: 'Target.setAutoAttach', params?: Target.SetAutoAttachParameterType): Promise<void>;
|
3353
3472
|
|
3354
3473
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
3355
3474
|
/**
|
@@ -3456,6 +3575,10 @@ declare module 'inspector/promises' {
|
|
3456
3575
|
addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3457
3576
|
addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3458
3577
|
addListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
3578
|
+
/**
|
3579
|
+
* Fired when data chunk was received over the network.
|
3580
|
+
*/
|
3581
|
+
addListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
3459
3582
|
/**
|
3460
3583
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3461
3584
|
* enabled.
|
@@ -3468,6 +3591,8 @@ declare module 'inspector/promises' {
|
|
3468
3591
|
* example, when inspector.waitingForDebugger is called
|
3469
3592
|
*/
|
3470
3593
|
addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3594
|
+
addListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
3595
|
+
addListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
3471
3596
|
emit(event: string | symbol, ...args: any[]): boolean;
|
3472
3597
|
emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
|
3473
3598
|
emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
@@ -3499,8 +3624,11 @@ declare module 'inspector/promises' {
|
|
3499
3624
|
emit(event: 'Network.responseReceived', message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
|
3500
3625
|
emit(event: 'Network.loadingFailed', message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
|
3501
3626
|
emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
|
3627
|
+
emit(event: 'Network.dataReceived', message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
|
3502
3628
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
3503
3629
|
emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
|
3630
|
+
emit(event: 'Target.targetCreated', message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
|
3631
|
+
emit(event: 'Target.attachedToTarget', message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
|
3504
3632
|
on(event: string, listener: (...args: any[]) => void): this;
|
3505
3633
|
/**
|
3506
3634
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3606,6 +3734,10 @@ declare module 'inspector/promises' {
|
|
3606
3734
|
on(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3607
3735
|
on(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3608
3736
|
on(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
3737
|
+
/**
|
3738
|
+
* Fired when data chunk was received over the network.
|
3739
|
+
*/
|
3740
|
+
on(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
3609
3741
|
/**
|
3610
3742
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3611
3743
|
* enabled.
|
@@ -3618,6 +3750,8 @@ declare module 'inspector/promises' {
|
|
3618
3750
|
* example, when inspector.waitingForDebugger is called
|
3619
3751
|
*/
|
3620
3752
|
on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3753
|
+
on(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
3754
|
+
on(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
3621
3755
|
once(event: string, listener: (...args: any[]) => void): this;
|
3622
3756
|
/**
|
3623
3757
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3723,6 +3857,10 @@ declare module 'inspector/promises' {
|
|
3723
3857
|
once(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3724
3858
|
once(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3725
3859
|
once(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
3860
|
+
/**
|
3861
|
+
* Fired when data chunk was received over the network.
|
3862
|
+
*/
|
3863
|
+
once(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
3726
3864
|
/**
|
3727
3865
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3728
3866
|
* enabled.
|
@@ -3735,6 +3873,8 @@ declare module 'inspector/promises' {
|
|
3735
3873
|
* example, when inspector.waitingForDebugger is called
|
3736
3874
|
*/
|
3737
3875
|
once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3876
|
+
once(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
3877
|
+
once(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
3738
3878
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
3739
3879
|
/**
|
3740
3880
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3840,6 +3980,10 @@ declare module 'inspector/promises' {
|
|
3840
3980
|
prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3841
3981
|
prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3842
3982
|
prependListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
3983
|
+
/**
|
3984
|
+
* Fired when data chunk was received over the network.
|
3985
|
+
*/
|
3986
|
+
prependListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
3843
3987
|
/**
|
3844
3988
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3845
3989
|
* enabled.
|
@@ -3852,6 +3996,8 @@ declare module 'inspector/promises' {
|
|
3852
3996
|
* example, when inspector.waitingForDebugger is called
|
3853
3997
|
*/
|
3854
3998
|
prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
3999
|
+
prependListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
4000
|
+
prependListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
3855
4001
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
3856
4002
|
/**
|
3857
4003
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3957,6 +4103,10 @@ declare module 'inspector/promises' {
|
|
3957
4103
|
prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3958
4104
|
prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3959
4105
|
prependOnceListener(event: 'Network.loadingFinished', listener: (message: InspectorNotification<Network.LoadingFinishedEventDataType>) => void): this;
|
4106
|
+
/**
|
4107
|
+
* Fired when data chunk was received over the network.
|
4108
|
+
*/
|
4109
|
+
prependOnceListener(event: 'Network.dataReceived', listener: (message: InspectorNotification<Network.DataReceivedEventDataType>) => void): this;
|
3960
4110
|
/**
|
3961
4111
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3962
4112
|
* enabled.
|
@@ -3969,6 +4119,8 @@ declare module 'inspector/promises' {
|
|
3969
4119
|
* example, when inspector.waitingForDebugger is called
|
3970
4120
|
*/
|
3971
4121
|
prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
|
4122
|
+
prependOnceListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
|
4123
|
+
prependOnceListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
|
3972
4124
|
}
|
3973
4125
|
|
3974
4126
|
export {
|
@@ -3989,6 +4141,7 @@ declare module 'inspector/promises' {
|
|
3989
4141
|
NodeWorker,
|
3990
4142
|
Network,
|
3991
4143
|
NodeRuntime,
|
4144
|
+
Target,
|
3992
4145
|
};
|
3993
4146
|
}
|
3994
4147
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.
|
3
|
+
"version": "22.17.0",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -140,6 +140,6 @@
|
|
140
140
|
"undici-types": "~6.21.0"
|
141
141
|
},
|
142
142
|
"peerDependencies": {},
|
143
|
-
"typesPublisherContentHash": "
|
143
|
+
"typesPublisherContentHash": "00d5bad9b7d88013ca5b7f270921b6bb4fd9c32ccc73d840855525aafc6f1fe8",
|
144
144
|
"typeScriptVersion": "5.1"
|
145
145
|
}
|
@@ -76,7 +76,6 @@ declare module "stream" {
|
|
76
76
|
/**
|
77
77
|
* A utility method for creating a `Readable` from a web `ReadableStream`.
|
78
78
|
* @since v17.0.0
|
79
|
-
* @experimental
|
80
79
|
*/
|
81
80
|
static fromWeb(
|
82
81
|
readableStream: streamWeb.ReadableStream,
|
@@ -85,7 +84,6 @@ declare module "stream" {
|
|
85
84
|
/**
|
86
85
|
* A utility method for creating a web `ReadableStream` from a `Readable`.
|
87
86
|
* @since v17.0.0
|
88
|
-
* @experimental
|
89
87
|
*/
|
90
88
|
static toWeb(
|
91
89
|
streamReadable: Readable,
|
@@ -101,7 +99,6 @@ declare module "stream" {
|
|
101
99
|
/**
|
102
100
|
* Returns whether the stream was destroyed or errored before emitting `'end'`.
|
103
101
|
* @since v16.8.0
|
104
|
-
* @experimental
|
105
102
|
*/
|
106
103
|
readonly readableAborted: boolean;
|
107
104
|
/**
|
@@ -113,7 +110,6 @@ declare module "stream" {
|
|
113
110
|
/**
|
114
111
|
* Returns whether `'data'` has been emitted.
|
115
112
|
* @since v16.7.0, v14.18.0
|
116
|
-
* @experimental
|
117
113
|
*/
|
118
114
|
readonly readableDidRead: boolean;
|
119
115
|
/**
|
@@ -719,7 +715,6 @@ declare module "stream" {
|
|
719
715
|
/**
|
720
716
|
* A utility method for creating a `Writable` from a web `WritableStream`.
|
721
717
|
* @since v17.0.0
|
722
|
-
* @experimental
|
723
718
|
*/
|
724
719
|
static fromWeb(
|
725
720
|
writableStream: streamWeb.WritableStream,
|
@@ -728,7 +723,6 @@ declare module "stream" {
|
|
728
723
|
/**
|
729
724
|
* A utility method for creating a web `WritableStream` from a `Writable`.
|
730
725
|
* @since v17.0.0
|
731
|
-
* @experimental
|
732
726
|
*/
|
733
727
|
static toWeb(streamWritable: Writable): streamWeb.WritableStream;
|
734
728
|
/**
|
@@ -740,7 +734,6 @@ declare module "stream" {
|
|
740
734
|
/**
|
741
735
|
* Returns whether the stream was destroyed or errored before emitting `'finish'`.
|
742
736
|
* @since v18.0.0, v16.17.0
|
743
|
-
* @experimental
|
744
737
|
*/
|
745
738
|
readonly writableAborted: boolean;
|
746
739
|
/**
|
@@ -1090,7 +1083,6 @@ declare module "stream" {
|
|
1090
1083
|
/**
|
1091
1084
|
* A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
|
1092
1085
|
* @since v17.0.0
|
1093
|
-
* @experimental
|
1094
1086
|
*/
|
1095
1087
|
static toWeb(streamDuplex: Duplex): {
|
1096
1088
|
readable: streamWeb.ReadableStream;
|
@@ -1099,7 +1091,6 @@ declare module "stream" {
|
|
1099
1091
|
/**
|
1100
1092
|
* A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
|
1101
1093
|
* @since v17.0.0
|
1102
|
-
* @experimental
|
1103
1094
|
*/
|
1104
1095
|
static fromWeb(
|
1105
1096
|
duplexStream: {
|
@@ -1650,13 +1641,11 @@ declare module "stream" {
|
|
1650
1641
|
/**
|
1651
1642
|
* Returns whether the stream has encountered an error.
|
1652
1643
|
* @since v17.3.0, v16.14.0
|
1653
|
-
* @experimental
|
1654
1644
|
*/
|
1655
1645
|
function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
|
1656
1646
|
/**
|
1657
1647
|
* Returns whether the stream is readable.
|
1658
1648
|
* @since v17.4.0, v16.14.0
|
1659
|
-
* @experimental
|
1660
1649
|
*/
|
1661
1650
|
function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
|
1662
1651
|
}
|
@@ -502,6 +502,14 @@ declare module "node:test" {
|
|
502
502
|
* The nesting level of the test.
|
503
503
|
*/
|
504
504
|
nesting: number;
|
505
|
+
/**
|
506
|
+
* The severity level of the diagnostic message.
|
507
|
+
* Possible values are:
|
508
|
+
* * `'info'`: Informational messages.
|
509
|
+
* * `'warn'`: Warnings.
|
510
|
+
* * `'error'`: Errors.
|
511
|
+
*/
|
512
|
+
level: "info" | "warn" | "error";
|
505
513
|
}
|
506
514
|
interface TestCoverage {
|
507
515
|
/**
|
@@ -420,14 +420,12 @@ declare module "url" {
|
|
420
420
|
* Threads, `Blob` objects registered within one Worker will not be available
|
421
421
|
* to other workers or the main thread.
|
422
422
|
* @since v16.7.0
|
423
|
-
* @experimental
|
424
423
|
*/
|
425
424
|
static createObjectURL(blob: NodeBlob): string;
|
426
425
|
/**
|
427
426
|
* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
|
428
427
|
* ID that isn't registered will silently fail.
|
429
428
|
* @since v16.7.0
|
430
|
-
* @experimental
|
431
429
|
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
432
430
|
*/
|
433
431
|
static revokeObjectURL(id: string): void;
|
@@ -828,7 +826,7 @@ declare module "url" {
|
|
828
826
|
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
829
827
|
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array` is the `name`, the second item of the `Array` is the `value`.
|
830
828
|
*
|
831
|
-
* Alias for `urlSearchParams[
|
829
|
+
* Alias for `urlSearchParams[Symbol.iterator]()`.
|
832
830
|
*/
|
833
831
|
entries(): URLSearchParamsIterator<[string, string]>;
|
834
832
|
/**
|
@@ -444,8 +444,8 @@ declare module "util" {
|
|
444
444
|
* intended for debugging. The output of `util.inspect` may change at any time
|
445
445
|
* and should not be depended upon programmatically. Additional `options` may be
|
446
446
|
* passed that alter the result.
|
447
|
-
* `util.inspect()` will use the constructor's name and/or
|
448
|
-
* an identifiable tag for an inspected value.
|
447
|
+
* `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag`
|
448
|
+
* property to make an identifiable tag for an inspected value.
|
449
449
|
*
|
450
450
|
* ```js
|
451
451
|
* class Foo {
|
@@ -1461,6 +1461,7 @@ declare module "util" {
|
|
1461
1461
|
| "hidden"
|
1462
1462
|
| "inverse"
|
1463
1463
|
| "italic"
|
1464
|
+
| "none"
|
1464
1465
|
| "overlined"
|
1465
1466
|
| "reset"
|
1466
1467
|
| "strikethrough"
|
@@ -1517,6 +1518,8 @@ declare module "util" {
|
|
1517
1518
|
* );
|
1518
1519
|
* ```
|
1519
1520
|
*
|
1521
|
+
* The special format value `none` applies no additional styling to the text.
|
1522
|
+
*
|
1520
1523
|
* The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v22.x/api/util.html#modifiers).
|
1521
1524
|
* @param format A text format or an Array of text formats defined in `util.inspect.colors`.
|
1522
1525
|
* @param text The text to to be formatted.
|
@@ -581,7 +581,6 @@ declare module "v8" {
|
|
581
581
|
/**
|
582
582
|
* 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.
|
583
583
|
* `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.
|
584
|
-
* @experimental
|
585
584
|
* @since v18.10.0, v16.18.0
|
586
585
|
*/
|
587
586
|
function setHeapSnapshotNearHeapLimit(limit: number): void;
|
@@ -807,33 +806,6 @@ declare module "v8" {
|
|
807
806
|
*/
|
808
807
|
const promiseHooks: PromiseHooks;
|
809
808
|
type StartupSnapshotCallbackFn = (args: any) => any;
|
810
|
-
interface StartupSnapshot {
|
811
|
-
/**
|
812
|
-
* Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
|
813
|
-
* This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
|
814
|
-
* @since v18.6.0, v16.17.0
|
815
|
-
*/
|
816
|
-
addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
817
|
-
/**
|
818
|
-
* Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
|
819
|
-
* The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
|
820
|
-
* to re-acquire resources that the application needs when the application is restarted from the snapshot.
|
821
|
-
* @since v18.6.0, v16.17.0
|
822
|
-
*/
|
823
|
-
addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
824
|
-
/**
|
825
|
-
* This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
|
826
|
-
* If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
|
827
|
-
* data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
|
828
|
-
* @since v18.6.0, v16.17.0
|
829
|
-
*/
|
830
|
-
setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
|
831
|
-
/**
|
832
|
-
* Returns true if the Node.js instance is run to build a snapshot.
|
833
|
-
* @since v18.6.0, v16.17.0
|
834
|
-
*/
|
835
|
-
isBuildingSnapshot(): boolean;
|
836
|
-
}
|
837
809
|
/**
|
838
810
|
* The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots.
|
839
811
|
*
|
@@ -912,10 +884,35 @@ declare module "v8" {
|
|
912
884
|
*
|
913
885
|
* Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot.
|
914
886
|
*
|
915
|
-
* @experimental
|
916
887
|
* @since v18.6.0, v16.17.0
|
917
888
|
*/
|
918
|
-
|
889
|
+
namespace startupSnapshot {
|
890
|
+
/**
|
891
|
+
* Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
|
892
|
+
* This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
|
893
|
+
* @since v18.6.0, v16.17.0
|
894
|
+
*/
|
895
|
+
function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
896
|
+
/**
|
897
|
+
* Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
|
898
|
+
* The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
|
899
|
+
* to re-acquire resources that the application needs when the application is restarted from the snapshot.
|
900
|
+
* @since v18.6.0, v16.17.0
|
901
|
+
*/
|
902
|
+
function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
903
|
+
/**
|
904
|
+
* This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
|
905
|
+
* If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
|
906
|
+
* data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
|
907
|
+
* @since v18.6.0, v16.17.0
|
908
|
+
*/
|
909
|
+
function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
|
910
|
+
/**
|
911
|
+
* Returns true if the Node.js instance is run to build a snapshot.
|
912
|
+
* @since v18.6.0, v16.17.0
|
913
|
+
*/
|
914
|
+
function isBuildingSnapshot(): boolean;
|
915
|
+
}
|
919
916
|
}
|
920
917
|
declare module "node:v8" {
|
921
918
|
export * from "v8";
|
@@ -187,6 +187,11 @@ declare module "worker_threads" {
|
|
187
187
|
* @since v10.5.0
|
188
188
|
*/
|
189
189
|
postMessage(value: any, transferList?: readonly Transferable[]): void;
|
190
|
+
/**
|
191
|
+
* If true, the `MessagePort` object will keep the Node.js event loop active.
|
192
|
+
* @since v18.1.0, v16.17.0
|
193
|
+
*/
|
194
|
+
hasRef(): boolean;
|
190
195
|
/**
|
191
196
|
* Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
|
192
197
|
* behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
|
@@ -147,6 +147,10 @@ declare module "zlib" {
|
|
147
147
|
* @default buffer.kMaxLength
|
148
148
|
*/
|
149
149
|
maxOutputLength?: number | undefined;
|
150
|
+
/**
|
151
|
+
* If `true`, returns an object with `buffer` and `engine`.
|
152
|
+
*/
|
153
|
+
info?: boolean | undefined;
|
150
154
|
}
|
151
155
|
interface ZstdOptions {
|
152
156
|
/**
|
@@ -172,6 +176,10 @@ declare module "zlib" {
|
|
172
176
|
* @default buffer.kMaxLength
|
173
177
|
*/
|
174
178
|
maxOutputLength?: number | undefined;
|
179
|
+
/**
|
180
|
+
* If `true`, returns an object with `buffer` and `engine`.
|
181
|
+
*/
|
182
|
+
info?: boolean | undefined;
|
175
183
|
}
|
176
184
|
interface Zlib {
|
177
185
|
/** @deprecated Use bytesWritten instead. */
|
@@ -612,8 +620,6 @@ declare module "zlib" {
|
|
612
620
|
const Z_FINISH: number;
|
613
621
|
/** @deprecated Use `constants.Z_BLOCK` */
|
614
622
|
const Z_BLOCK: number;
|
615
|
-
/** @deprecated Use `constants.Z_TREES` */
|
616
|
-
const Z_TREES: number;
|
617
623
|
// Return codes for the compression/decompression functions.
|
618
624
|
// Negative values are errors, positive values are used for special but normal events.
|
619
625
|
/** @deprecated Use `constants.Z_OK` */
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|