@types/node 24.0.15 → 24.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/crypto.d.ts +17 -1
- node/fs/promises.d.ts +7 -3
- node/fs.d.ts +11 -1
- node/http2.d.ts +13 -11
- node/inspector.d.ts +163 -6
- node/module.d.ts +24 -0
- node/package.json +4 -4
- node/perf_hooks.d.ts +14 -0
- node/repl.d.ts +11 -1
- node/sqlite.d.ts +0 -1
- node/stream.d.ts +17 -6
- node/test.d.ts +16 -1
- node/timers.d.ts +0 -2
- node/url.d.ts +1 -1
- node/util.d.ts +6 -2
- node/worker_threads.d.ts +12 -0
- node/zlib.d.ts +8 -2
node/README.md
CHANGED
@@ -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.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Mon, 04 Aug 2025 10:03:40 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/crypto.d.ts
CHANGED
@@ -3771,7 +3771,23 @@ declare module "crypto" {
|
|
3771
3771
|
*/
|
3772
3772
|
checkIP(ip: string): string | undefined;
|
3773
3773
|
/**
|
3774
|
-
* Checks whether this certificate was issued by the given `otherCert
|
3774
|
+
* Checks whether this certificate was potentially issued by the given `otherCert`
|
3775
|
+
* by comparing the certificate metadata.
|
3776
|
+
*
|
3777
|
+
* This is useful for pruning a list of possible issuer certificates which have been
|
3778
|
+
* selected using a more rudimentary filtering routine, i.e. just based on subject
|
3779
|
+
* and issuer names.
|
3780
|
+
*
|
3781
|
+
* Finally, to verify that this certificate's signature was produced by a private key
|
3782
|
+
* corresponding to `otherCert`'s public key use `x509.verify(publicKey)`
|
3783
|
+
* with `otherCert`'s public key represented as a `KeyObject`
|
3784
|
+
* like so
|
3785
|
+
*
|
3786
|
+
* ```js
|
3787
|
+
* if (!x509.verify(otherCert.publicKey)) {
|
3788
|
+
* throw new Error('otherCert did not issue x509');
|
3789
|
+
* }
|
3790
|
+
* ```
|
3775
3791
|
* @since v15.6.0
|
3776
3792
|
*/
|
3777
3793
|
checkIssued(otherCert: X509Certificate): boolean;
|
node/fs/promises.d.ts
CHANGED
@@ -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
|
/**
|
@@ -261,7 +264,7 @@ declare module "fs/promises" {
|
|
261
264
|
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
|
262
265
|
* @since v17.0.0
|
263
266
|
*/
|
264
|
-
readableWebStream(): ReadableStream;
|
267
|
+
readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
|
265
268
|
/**
|
266
269
|
* Asynchronously reads the entire contents of a file.
|
267
270
|
*
|
@@ -474,8 +477,9 @@ declare module "fs/promises" {
|
|
474
477
|
*/
|
475
478
|
close(): Promise<void>;
|
476
479
|
/**
|
477
|
-
*
|
478
|
-
*
|
480
|
+
* Calls `filehandle.close()` and returns a promise that fulfills when the
|
481
|
+
* filehandle is closed.
|
482
|
+
* @since v20.4.0, v18.8.0
|
479
483
|
*/
|
480
484
|
[Symbol.asyncDispose](): Promise<void>;
|
481
485
|
}
|
node/fs.d.ts
CHANGED
@@ -322,6 +322,16 @@ declare module "fs" {
|
|
322
322
|
* @since v12.12.0
|
323
323
|
*/
|
324
324
|
readSync(): Dirent | null;
|
325
|
+
/**
|
326
|
+
* An alias for `dir.close()`.
|
327
|
+
* @since v24.1.0
|
328
|
+
*/
|
329
|
+
[Symbol.dispose](): void;
|
330
|
+
/**
|
331
|
+
* An alias for `dir.closeSync()`.
|
332
|
+
* @since v24.1.0
|
333
|
+
*/
|
334
|
+
[Symbol.asyncDispose](): void;
|
325
335
|
}
|
326
336
|
/**
|
327
337
|
* Class: fs.StatWatcher
|
@@ -4354,7 +4364,7 @@ declare module "fs" {
|
|
4354
4364
|
* Current working directory.
|
4355
4365
|
* @default process.cwd()
|
4356
4366
|
*/
|
4357
|
-
cwd?: string | undefined;
|
4367
|
+
cwd?: string | URL | undefined;
|
4358
4368
|
/**
|
4359
4369
|
* `true` if the glob should return paths as `Dirent`s, `false` otherwise.
|
4360
4370
|
* @default false
|
node/http2.d.ts
CHANGED
@@ -32,18 +32,14 @@ declare module "http2" {
|
|
32
32
|
":scheme"?: string | undefined;
|
33
33
|
}
|
34
34
|
// Http2Stream
|
35
|
-
export interface StreamPriorityOptions {
|
36
|
-
exclusive?: boolean | undefined;
|
37
|
-
parent?: number | undefined;
|
38
|
-
weight?: number | undefined;
|
39
|
-
silent?: boolean | undefined;
|
40
|
-
}
|
41
35
|
export interface StreamState {
|
42
36
|
localWindowSize?: number | undefined;
|
43
37
|
state?: number | undefined;
|
44
38
|
localClose?: number | undefined;
|
45
39
|
remoteClose?: number | undefined;
|
40
|
+
/** @deprecated */
|
46
41
|
sumDependencyWeight?: number | undefined;
|
42
|
+
/** @deprecated */
|
47
43
|
weight?: number | undefined;
|
48
44
|
}
|
49
45
|
export interface ServerStreamResponseOptions {
|
@@ -151,10 +147,9 @@ declare module "http2" {
|
|
151
147
|
*/
|
152
148
|
close(code?: number, callback?: () => void): void;
|
153
149
|
/**
|
154
|
-
*
|
155
|
-
* @since v8.4.0
|
150
|
+
* @deprecated Priority signaling is no longer supported in Node.js.
|
156
151
|
*/
|
157
|
-
priority(options:
|
152
|
+
priority(options: unknown): void;
|
158
153
|
/**
|
159
154
|
* ```js
|
160
155
|
* import http2 from 'node:http2';
|
@@ -395,7 +390,7 @@ declare module "http2" {
|
|
395
390
|
): void;
|
396
391
|
pushStream(
|
397
392
|
headers: OutgoingHttpHeaders,
|
398
|
-
options?:
|
393
|
+
options?: Pick<ClientSessionRequestOptions, "exclusive" | "parent">,
|
399
394
|
callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
|
400
395
|
): void;
|
401
396
|
/**
|
@@ -629,7 +624,6 @@ declare module "http2" {
|
|
629
624
|
endStream?: boolean | undefined;
|
630
625
|
exclusive?: boolean | undefined;
|
631
626
|
parent?: number | undefined;
|
632
|
-
weight?: number | undefined;
|
633
627
|
waitForTrailers?: boolean | undefined;
|
634
628
|
signal?: AbortSignal | undefined;
|
635
629
|
}
|
@@ -1294,6 +1288,14 @@ declare module "http2" {
|
|
1294
1288
|
* @default 100000
|
1295
1289
|
*/
|
1296
1290
|
unknownProtocolTimeout?: number | undefined;
|
1291
|
+
/**
|
1292
|
+
* If `true`, it turns on strict leading
|
1293
|
+
* and trailing whitespace validation for HTTP/2 header field names and values
|
1294
|
+
* as per [RFC-9113](https://www.rfc-editor.org/rfc/rfc9113.html#section-8.2.1).
|
1295
|
+
* @since v24.2.0
|
1296
|
+
* @default true
|
1297
|
+
*/
|
1298
|
+
strictFieldWhitespaceValidation?: boolean | undefined;
|
1297
1299
|
}
|
1298
1300
|
export interface ClientSessionOptions extends SessionOptions {
|
1299
1301
|
/**
|
node/inspector.d.ts
CHANGED
@@ -268,7 +268,7 @@ declare module 'inspector' {
|
|
268
268
|
/**
|
269
269
|
* Embedder-specific auxiliary data.
|
270
270
|
*/
|
271
|
-
auxData?:
|
271
|
+
auxData?: object | undefined;
|
272
272
|
}
|
273
273
|
/**
|
274
274
|
* Detailed information about exception (or error) that was thrown during script compilation or execution.
|
@@ -701,7 +701,7 @@ declare module 'inspector' {
|
|
701
701
|
}
|
702
702
|
interface InspectRequestedEventDataType {
|
703
703
|
object: RemoteObject;
|
704
|
-
hints:
|
704
|
+
hints: object;
|
705
705
|
}
|
706
706
|
}
|
707
707
|
namespace Debugger {
|
@@ -1173,7 +1173,7 @@ declare module 'inspector' {
|
|
1173
1173
|
/**
|
1174
1174
|
* Embedder-specific auxiliary data.
|
1175
1175
|
*/
|
1176
|
-
executionContextAuxData?:
|
1176
|
+
executionContextAuxData?: object | undefined;
|
1177
1177
|
/**
|
1178
1178
|
* True, if this script is generated as a result of the live edit operation.
|
1179
1179
|
* @experimental
|
@@ -1237,7 +1237,7 @@ declare module 'inspector' {
|
|
1237
1237
|
/**
|
1238
1238
|
* Embedder-specific auxiliary data.
|
1239
1239
|
*/
|
1240
|
-
executionContextAuxData?:
|
1240
|
+
executionContextAuxData?: object | undefined;
|
1241
1241
|
/**
|
1242
1242
|
* URL of source map associated with script (if any).
|
1243
1243
|
*/
|
@@ -1282,7 +1282,7 @@ declare module 'inspector' {
|
|
1282
1282
|
/**
|
1283
1283
|
* Object containing break-specific auxiliary properties.
|
1284
1284
|
*/
|
1285
|
-
data?:
|
1285
|
+
data?: object | undefined;
|
1286
1286
|
/**
|
1287
1287
|
* Hit breakpoints IDs
|
1288
1288
|
*/
|
@@ -1649,7 +1649,7 @@ declare module 'inspector' {
|
|
1649
1649
|
categories: string[];
|
1650
1650
|
}
|
1651
1651
|
interface DataCollectedEventDataType {
|
1652
|
-
value:
|
1652
|
+
value: object[];
|
1653
1653
|
}
|
1654
1654
|
}
|
1655
1655
|
namespace NodeWorker {
|
@@ -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: string;
|
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?: string | 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
|
/**
|
@@ -2950,6 +3057,14 @@ declare module 'inspector' {
|
|
2950
3057
|
* @since v22.6.0
|
2951
3058
|
*/
|
2952
3059
|
function requestWillBeSent(params: RequestWillBeSentEventDataType): void;
|
3060
|
+
/**
|
3061
|
+
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
3062
|
+
*
|
3063
|
+
* Broadcasts the `Network.dataReceived` event to connected frontends, or buffers the data if
|
3064
|
+
* `Network.streamResourceContent` command was not invoked for the given request yet.
|
3065
|
+
* @since v24.2.0
|
3066
|
+
*/
|
3067
|
+
function dataReceived(params: DataReceivedEventDataType): void;
|
2953
3068
|
/**
|
2954
3069
|
* This feature is only available with the `--experimental-network-inspection` flag enabled.
|
2955
3070
|
*
|
@@ -3010,6 +3125,7 @@ declare module 'inspector/promises' {
|
|
3010
3125
|
NodeWorker,
|
3011
3126
|
Network,
|
3012
3127
|
NodeRuntime,
|
3128
|
+
Target,
|
3013
3129
|
} from 'inspector';
|
3014
3130
|
|
3015
3131
|
/**
|
@@ -3334,6 +3450,12 @@ declare module 'inspector/promises' {
|
|
3334
3450
|
* Enables network tracking, network events will now be delivered to the client.
|
3335
3451
|
*/
|
3336
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>;
|
3337
3459
|
/**
|
3338
3460
|
* Enable the NodeRuntime events except by `NodeRuntime.waitingForDisconnect`.
|
3339
3461
|
*/
|
@@ -3346,6 +3468,7 @@ declare module 'inspector/promises' {
|
|
3346
3468
|
* Enable the `NodeRuntime.waitingForDisconnect`.
|
3347
3469
|
*/
|
3348
3470
|
post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
|
3471
|
+
post(method: 'Target.setAutoAttach', params?: Target.SetAutoAttachParameterType): Promise<void>;
|
3349
3472
|
|
3350
3473
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
3351
3474
|
/**
|
@@ -3452,6 +3575,10 @@ declare module 'inspector/promises' {
|
|
3452
3575
|
addListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3453
3576
|
addListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3454
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;
|
3455
3582
|
/**
|
3456
3583
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3457
3584
|
* enabled.
|
@@ -3464,6 +3591,8 @@ declare module 'inspector/promises' {
|
|
3464
3591
|
* example, when inspector.waitingForDebugger is called
|
3465
3592
|
*/
|
3466
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;
|
3467
3596
|
emit(event: string | symbol, ...args: any[]): boolean;
|
3468
3597
|
emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
|
3469
3598
|
emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
|
@@ -3495,8 +3624,11 @@ declare module 'inspector/promises' {
|
|
3495
3624
|
emit(event: 'Network.responseReceived', message: InspectorNotification<Network.ResponseReceivedEventDataType>): boolean;
|
3496
3625
|
emit(event: 'Network.loadingFailed', message: InspectorNotification<Network.LoadingFailedEventDataType>): boolean;
|
3497
3626
|
emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
|
3627
|
+
emit(event: 'Network.dataReceived', message: InspectorNotification<Network.DataReceivedEventDataType>): boolean;
|
3498
3628
|
emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
|
3499
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;
|
3500
3632
|
on(event: string, listener: (...args: any[]) => void): this;
|
3501
3633
|
/**
|
3502
3634
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3602,6 +3734,10 @@ declare module 'inspector/promises' {
|
|
3602
3734
|
on(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3603
3735
|
on(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3604
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;
|
3605
3741
|
/**
|
3606
3742
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3607
3743
|
* enabled.
|
@@ -3614,6 +3750,8 @@ declare module 'inspector/promises' {
|
|
3614
3750
|
* example, when inspector.waitingForDebugger is called
|
3615
3751
|
*/
|
3616
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;
|
3617
3755
|
once(event: string, listener: (...args: any[]) => void): this;
|
3618
3756
|
/**
|
3619
3757
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3719,6 +3857,10 @@ declare module 'inspector/promises' {
|
|
3719
3857
|
once(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3720
3858
|
once(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3721
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;
|
3722
3864
|
/**
|
3723
3865
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3724
3866
|
* enabled.
|
@@ -3731,6 +3873,8 @@ declare module 'inspector/promises' {
|
|
3731
3873
|
* example, when inspector.waitingForDebugger is called
|
3732
3874
|
*/
|
3733
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;
|
3734
3878
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
3735
3879
|
/**
|
3736
3880
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3836,6 +3980,10 @@ declare module 'inspector/promises' {
|
|
3836
3980
|
prependListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3837
3981
|
prependListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3838
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;
|
3839
3987
|
/**
|
3840
3988
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3841
3989
|
* enabled.
|
@@ -3848,6 +3996,8 @@ declare module 'inspector/promises' {
|
|
3848
3996
|
* example, when inspector.waitingForDebugger is called
|
3849
3997
|
*/
|
3850
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;
|
3851
4001
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
3852
4002
|
/**
|
3853
4003
|
* Emitted when any notification from the V8 Inspector is received.
|
@@ -3953,6 +4103,10 @@ declare module 'inspector/promises' {
|
|
3953
4103
|
prependOnceListener(event: 'Network.responseReceived', listener: (message: InspectorNotification<Network.ResponseReceivedEventDataType>) => void): this;
|
3954
4104
|
prependOnceListener(event: 'Network.loadingFailed', listener: (message: InspectorNotification<Network.LoadingFailedEventDataType>) => void): this;
|
3955
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;
|
3956
4110
|
/**
|
3957
4111
|
* This event is fired instead of `Runtime.executionContextDestroyed` when
|
3958
4112
|
* enabled.
|
@@ -3965,6 +4119,8 @@ declare module 'inspector/promises' {
|
|
3965
4119
|
* example, when inspector.waitingForDebugger is called
|
3966
4120
|
*/
|
3967
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;
|
3968
4124
|
}
|
3969
4125
|
|
3970
4126
|
export {
|
@@ -3985,6 +4141,7 @@ declare module 'inspector/promises' {
|
|
3985
4141
|
NodeWorker,
|
3986
4142
|
Network,
|
3987
4143
|
NodeRuntime,
|
4144
|
+
Target,
|
3988
4145
|
};
|
3989
4146
|
}
|
3990
4147
|
|
node/module.d.ts
CHANGED
@@ -685,6 +685,30 @@ declare module "module" {
|
|
685
685
|
* @returns The absolute URL string that the specifier would resolve to.
|
686
686
|
*/
|
687
687
|
resolve(specifier: string, parent?: string | URL): string;
|
688
|
+
/**
|
689
|
+
* `true` when the current module is the entry point of the current process; `false` otherwise.
|
690
|
+
*
|
691
|
+
* Equivalent to `require.main === module` in CommonJS.
|
692
|
+
*
|
693
|
+
* Analogous to Python's `__name__ == "__main__"`.
|
694
|
+
*
|
695
|
+
* ```js
|
696
|
+
* export function foo() {
|
697
|
+
* return 'Hello, world';
|
698
|
+
* }
|
699
|
+
*
|
700
|
+
* function main() {
|
701
|
+
* const message = foo();
|
702
|
+
* console.log(message);
|
703
|
+
* }
|
704
|
+
*
|
705
|
+
* if (import.meta.main) main();
|
706
|
+
* // `foo` can be imported from another module without possible side-effects from `main`
|
707
|
+
* ```
|
708
|
+
* @since v24.2.0
|
709
|
+
* @experimental
|
710
|
+
*/
|
711
|
+
main: boolean;
|
688
712
|
}
|
689
713
|
namespace NodeJS {
|
690
714
|
interface Module {
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "24.0
|
3
|
+
"version": "24.2.0",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -152,9 +152,9 @@
|
|
152
152
|
},
|
153
153
|
"scripts": {},
|
154
154
|
"dependencies": {
|
155
|
-
"undici-types": "~7.
|
155
|
+
"undici-types": "~7.10.0"
|
156
156
|
},
|
157
157
|
"peerDependencies": {},
|
158
|
-
"typesPublisherContentHash": "
|
159
|
-
"typeScriptVersion": "5.
|
158
|
+
"typesPublisherContentHash": "592a3f00c1a1fd43b2d3e4b61e9a9840a9d22deac79f88625b217e5a14958a3d",
|
159
|
+
"typeScriptVersion": "5.2"
|
160
160
|
}
|
node/perf_hooks.d.ts
CHANGED
@@ -813,6 +813,20 @@ declare module "perf_hooks" {
|
|
813
813
|
* @since v11.10.0
|
814
814
|
*/
|
815
815
|
disable(): boolean;
|
816
|
+
/**
|
817
|
+
* Disables the update interval timer when the histogram is disposed.
|
818
|
+
*
|
819
|
+
* ```js
|
820
|
+
* const { monitorEventLoopDelay } = require('node:perf_hooks');
|
821
|
+
* {
|
822
|
+
* using hist = monitorEventLoopDelay({ resolution: 20 });
|
823
|
+
* hist.enable();
|
824
|
+
* // The histogram will be disabled when the block is exited.
|
825
|
+
* }
|
826
|
+
* ```
|
827
|
+
* @since v24.2.0
|
828
|
+
*/
|
829
|
+
[Symbol.dispose](): void;
|
816
830
|
}
|
817
831
|
interface RecordableHistogram extends Histogram {
|
818
832
|
/**
|
node/repl.d.ts
CHANGED
@@ -123,6 +123,12 @@ declare module "repl" {
|
|
123
123
|
*/
|
124
124
|
action: REPLCommandAction;
|
125
125
|
}
|
126
|
+
interface REPLServerSetupHistoryOptions {
|
127
|
+
filePath?: string | undefined;
|
128
|
+
size?: number | undefined;
|
129
|
+
removeHistoryDuplicates?: boolean | undefined;
|
130
|
+
onHistoryFileLoaded?: ((err: Error | null, repl: REPLServer) => void) | undefined;
|
131
|
+
}
|
126
132
|
/**
|
127
133
|
* Instances of `repl.REPLServer` are created using the {@link start} method
|
128
134
|
* or directly using the JavaScript `new` keyword.
|
@@ -316,7 +322,11 @@ declare module "repl" {
|
|
316
322
|
* @param historyPath the path to the history file
|
317
323
|
* @param callback called when history writes are ready or upon error
|
318
324
|
*/
|
319
|
-
setupHistory(
|
325
|
+
setupHistory(historyPath: string, callback: (err: Error | null, repl: this) => void): void;
|
326
|
+
setupHistory(
|
327
|
+
historyConfig?: REPLServerSetupHistoryOptions,
|
328
|
+
callback?: (err: Error | null, repl: this) => void,
|
329
|
+
): void;
|
320
330
|
/**
|
321
331
|
* events.EventEmitter
|
322
332
|
* 1. close - inherited from `readline.Interface`
|
node/sqlite.d.ts
CHANGED
node/stream.d.ts
CHANGED
@@ -615,6 +615,17 @@ declare module "stream" {
|
|
615
615
|
* @param error Error which will be passed as payload in `'error'` event
|
616
616
|
*/
|
617
617
|
destroy(error?: Error): this;
|
618
|
+
/**
|
619
|
+
* @returns `AsyncIterator` to fully consume the stream.
|
620
|
+
* @since v10.0.0
|
621
|
+
*/
|
622
|
+
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
623
|
+
/**
|
624
|
+
* Calls `readable.destroy()` with an `AbortError` and returns
|
625
|
+
* a promise that fulfills when the stream is finished.
|
626
|
+
* @since v20.4.0
|
627
|
+
*/
|
628
|
+
[Symbol.asyncDispose](): Promise<void>;
|
618
629
|
/**
|
619
630
|
* Event emitter
|
620
631
|
* The defined events on documents including:
|
@@ -682,12 +693,6 @@ declare module "stream" {
|
|
682
693
|
removeListener(event: "readable", listener: () => void): this;
|
683
694
|
removeListener(event: "resume", listener: () => void): this;
|
684
695
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
685
|
-
[Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
|
686
|
-
/**
|
687
|
-
* Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
|
688
|
-
* @since v20.4.0
|
689
|
-
*/
|
690
|
-
[Symbol.asyncDispose](): Promise<void>;
|
691
696
|
}
|
692
697
|
interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
|
693
698
|
decodeStrings?: boolean | undefined;
|
@@ -957,6 +962,12 @@ declare module "stream" {
|
|
957
962
|
* @param error Optional, an error to emit with `'error'` event.
|
958
963
|
*/
|
959
964
|
destroy(error?: Error): this;
|
965
|
+
/**
|
966
|
+
* Calls `writable.destroy()` with an `AbortError` and returns
|
967
|
+
* a promise that fulfills when the stream is finished.
|
968
|
+
* @since v22.4.0, v20.16.0
|
969
|
+
*/
|
970
|
+
[Symbol.asyncDispose](): Promise<void>;
|
960
971
|
/**
|
961
972
|
* Event emitter
|
962
973
|
* The defined events on documents including:
|
node/test.d.ts
CHANGED
@@ -410,6 +410,7 @@ declare module "node:test" {
|
|
410
410
|
addListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
411
411
|
addListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
412
412
|
addListener(event: "test:watch:drained", listener: () => void): this;
|
413
|
+
addListener(event: "test:watch:restarted", listener: () => void): this;
|
413
414
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
414
415
|
emit(event: "test:coverage", data: EventData.TestCoverage): boolean;
|
415
416
|
emit(event: "test:complete", data: EventData.TestComplete): boolean;
|
@@ -424,6 +425,7 @@ declare module "node:test" {
|
|
424
425
|
emit(event: "test:stdout", data: EventData.TestStdout): boolean;
|
425
426
|
emit(event: "test:summary", data: EventData.TestSummary): boolean;
|
426
427
|
emit(event: "test:watch:drained"): boolean;
|
428
|
+
emit(event: "test:watch:restarted"): boolean;
|
427
429
|
emit(event: string | symbol, ...args: any[]): boolean;
|
428
430
|
on(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
429
431
|
on(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
@@ -438,6 +440,7 @@ declare module "node:test" {
|
|
438
440
|
on(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
439
441
|
on(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
440
442
|
on(event: "test:watch:drained", listener: () => void): this;
|
443
|
+
on(event: "test:watch:restarted", listener: () => void): this;
|
441
444
|
on(event: string, listener: (...args: any[]) => void): this;
|
442
445
|
once(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
443
446
|
once(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
@@ -452,6 +455,7 @@ declare module "node:test" {
|
|
452
455
|
once(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
453
456
|
once(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
454
457
|
once(event: "test:watch:drained", listener: () => void): this;
|
458
|
+
once(event: "test:watch:restarted", listener: () => void): this;
|
455
459
|
once(event: string, listener: (...args: any[]) => void): this;
|
456
460
|
prependListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
457
461
|
prependListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
@@ -466,6 +470,7 @@ declare module "node:test" {
|
|
466
470
|
prependListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
467
471
|
prependListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
468
472
|
prependListener(event: "test:watch:drained", listener: () => void): this;
|
473
|
+
prependListener(event: "test:watch:restarted", listener: () => void): this;
|
469
474
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
470
475
|
prependOnceListener(event: "test:coverage", listener: (data: EventData.TestCoverage) => void): this;
|
471
476
|
prependOnceListener(event: "test:complete", listener: (data: EventData.TestComplete) => void): this;
|
@@ -480,6 +485,7 @@ declare module "node:test" {
|
|
480
485
|
prependOnceListener(event: "test:stdout", listener: (data: EventData.TestStdout) => void): this;
|
481
486
|
prependOnceListener(event: "test:summary", listener: (data: EventData.TestSummary) => void): this;
|
482
487
|
prependOnceListener(event: "test:watch:drained", listener: () => void): this;
|
488
|
+
prependOnceListener(event: "test:watch:restarted", listener: () => void): this;
|
483
489
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
484
490
|
}
|
485
491
|
namespace EventData {
|
@@ -510,6 +516,14 @@ declare module "node:test" {
|
|
510
516
|
* The nesting level of the test.
|
511
517
|
*/
|
512
518
|
nesting: number;
|
519
|
+
/**
|
520
|
+
* The severity level of the diagnostic message.
|
521
|
+
* Possible values are:
|
522
|
+
* * `'info'`: Informational messages.
|
523
|
+
* * `'warn'`: Warnings.
|
524
|
+
* * `'error'`: Errors.
|
525
|
+
*/
|
526
|
+
level: "info" | "warn" | "error";
|
513
527
|
}
|
514
528
|
interface TestCoverage {
|
515
529
|
/**
|
@@ -2168,7 +2182,8 @@ declare module "node:test/reporters" {
|
|
2168
2182
|
| { type: "test:stderr"; data: EventData.TestStderr }
|
2169
2183
|
| { type: "test:stdout"; data: EventData.TestStdout }
|
2170
2184
|
| { type: "test:summary"; data: EventData.TestSummary }
|
2171
|
-
| { type: "test:watch:drained"; data: undefined }
|
2185
|
+
| { type: "test:watch:drained"; data: undefined }
|
2186
|
+
| { type: "test:watch:restarted"; data: undefined };
|
2172
2187
|
type TestEventGenerator = AsyncGenerator<TestEvent, void>;
|
2173
2188
|
|
2174
2189
|
interface ReporterConstructorWrapper<T extends new(...args: any[]) => Transform> {
|
node/timers.d.ts
CHANGED
@@ -60,7 +60,6 @@ declare module "timers" {
|
|
60
60
|
/**
|
61
61
|
* Cancels the immediate. This is similar to calling `clearImmediate()`.
|
62
62
|
* @since v20.5.0, v18.18.0
|
63
|
-
* @experimental
|
64
63
|
*/
|
65
64
|
[Symbol.dispose](): void;
|
66
65
|
_onImmediate(...args: any[]): void;
|
@@ -141,7 +140,6 @@ declare module "timers" {
|
|
141
140
|
/**
|
142
141
|
* Cancels the timeout.
|
143
142
|
* @since v20.5.0, v18.18.0
|
144
|
-
* @experimental
|
145
143
|
*/
|
146
144
|
[Symbol.dispose](): void;
|
147
145
|
_onTimeout(...args: any[]): void;
|
node/url.d.ts
CHANGED
@@ -874,7 +874,7 @@ declare module "url" {
|
|
874
874
|
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
875
875
|
* 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`.
|
876
876
|
*
|
877
|
-
* Alias for `urlSearchParams[
|
877
|
+
* Alias for `urlSearchParams[Symbol.iterator]()`.
|
878
878
|
*/
|
879
879
|
entries(): URLSearchParamsIterator<[string, string]>;
|
880
880
|
/**
|
node/util.d.ts
CHANGED
@@ -431,8 +431,8 @@ declare module "util" {
|
|
431
431
|
* intended for debugging. The output of `util.inspect` may change at any time
|
432
432
|
* and should not be depended upon programmatically. Additional `options` may be
|
433
433
|
* passed that alter the result.
|
434
|
-
* `util.inspect()` will use the constructor's name and/or
|
435
|
-
* an identifiable tag for an inspected value.
|
434
|
+
* `util.inspect()` will use the constructor's name and/or `Symbol.toStringTag`
|
435
|
+
* property to make an identifiable tag for an inspected value.
|
436
436
|
*
|
437
437
|
* ```js
|
438
438
|
* class Foo {
|
@@ -1172,6 +1172,7 @@ declare module "util" {
|
|
1172
1172
|
| "hidden"
|
1173
1173
|
| "inverse"
|
1174
1174
|
| "italic"
|
1175
|
+
| "none"
|
1175
1176
|
| "overlined"
|
1176
1177
|
| "reset"
|
1177
1178
|
| "strikethrough"
|
@@ -1228,6 +1229,8 @@ declare module "util" {
|
|
1228
1229
|
* );
|
1229
1230
|
* ```
|
1230
1231
|
*
|
1232
|
+
* The special format value `none` applies no additional styling to the text.
|
1233
|
+
*
|
1231
1234
|
* The full list of formats can be found in [modifiers](https://nodejs.org/docs/latest-v24.x/api/util.html#modifiers).
|
1232
1235
|
* @param format A text format or an Array of text formats defined in `util.inspect.colors`.
|
1233
1236
|
* @param text The text to to be formatted.
|
@@ -2108,6 +2111,7 @@ declare module "util/types" {
|
|
2108
2111
|
* console.log(myError instanceof Error); // true
|
2109
2112
|
* ```
|
2110
2113
|
* @since v10.0.0
|
2114
|
+
* @deprecated The `util.types.isNativeError` API is deprecated. Please use `Error.isError` instead.
|
2111
2115
|
*/
|
2112
2116
|
function isNativeError(object: unknown): object is Error;
|
2113
2117
|
/**
|
node/worker_threads.d.ts
CHANGED
@@ -482,6 +482,18 @@ declare module "worker_threads" {
|
|
482
482
|
* @since v24.0.0
|
483
483
|
*/
|
484
484
|
getHeapStatistics(): Promise<HeapInfo>;
|
485
|
+
/**
|
486
|
+
* Calls `worker.terminate()` when the dispose scope is exited.
|
487
|
+
*
|
488
|
+
* ```js
|
489
|
+
* async function example() {
|
490
|
+
* await using worker = new Worker('for (;;) {}', { eval: true });
|
491
|
+
* // Worker is automatically terminate when the scope is exited.
|
492
|
+
* }
|
493
|
+
* ```
|
494
|
+
* @since v24.2.0
|
495
|
+
*/
|
496
|
+
[Symbol.asyncDispose](): Promise<void>;
|
485
497
|
addListener(event: "error", listener: (err: Error) => void): this;
|
486
498
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
487
499
|
addListener(event: "message", listener: (value: any) => void): this;
|
node/zlib.d.ts
CHANGED
@@ -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
|
readonly bytesWritten: number;
|
@@ -610,8 +618,6 @@ declare module "zlib" {
|
|
610
618
|
const Z_FINISH: number;
|
611
619
|
/** @deprecated Use `constants.Z_BLOCK` */
|
612
620
|
const Z_BLOCK: number;
|
613
|
-
/** @deprecated Use `constants.Z_TREES` */
|
614
|
-
const Z_TREES: number;
|
615
621
|
// Return codes for the compression/decompression functions.
|
616
622
|
// Negative values are errors, positive values are used for special but normal events.
|
617
623
|
/** @deprecated Use `constants.Z_OK` */
|