@types/node 24.0.14 → 24.1.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.
Files changed (5) hide show
  1. node/README.md +1 -1
  2. node/fs.d.ts +13 -1
  3. node/http.d.ts +1 -1
  4. node/inspector.d.ts +53 -0
  5. node/package.json +2 -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: Tue, 15 Jul 2025 07:04:18 GMT
11
+ * Last updated: Tue, 22 Jul 2025 11:34:36 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node/fs.d.ts CHANGED
@@ -322,6 +322,18 @@ 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
+ * @experimental
329
+ */
330
+ [Symbol.dispose](): void;
331
+ /**
332
+ * An alias for `dir.closeSync()`.
333
+ * @since v24.1.0
334
+ * @experimental
335
+ */
336
+ [Symbol.asyncDispose](): void;
325
337
  }
326
338
  /**
327
339
  * Class: fs.StatWatcher
@@ -4354,7 +4366,7 @@ declare module "fs" {
4354
4366
  * Current working directory.
4355
4367
  * @default process.cwd()
4356
4368
  */
4357
- cwd?: string | undefined;
4369
+ cwd?: string | URL | undefined;
4358
4370
  /**
4359
4371
  * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
4360
4372
  * @default false
node/http.d.ts CHANGED
@@ -911,7 +911,7 @@ declare module "http" {
911
911
  * the request body should be sent.
912
912
  * @since v10.0.0
913
913
  */
914
- writeProcessing(): void;
914
+ writeProcessing(callback?: () => void): void;
915
915
  }
916
916
  interface InformationEvent {
917
917
  statusCode: number;
node/inspector.d.ts CHANGED
@@ -1848,6 +1848,30 @@ declare module 'inspector' {
1848
1848
  enabled: boolean;
1849
1849
  }
1850
1850
  }
1851
+ namespace Target {
1852
+ type SessionID = string;
1853
+ type TargetID = string;
1854
+ interface TargetInfo {
1855
+ targetId: TargetID;
1856
+ type: string;
1857
+ title: string;
1858
+ url: string;
1859
+ attached: boolean;
1860
+ canAccessOpener: boolean;
1861
+ }
1862
+ interface SetAutoAttachParameterType {
1863
+ autoAttach: boolean;
1864
+ waitForDebuggerOnStart: boolean;
1865
+ }
1866
+ interface TargetCreatedEventDataType {
1867
+ targetInfo: TargetInfo;
1868
+ }
1869
+ interface AttachedToTargetEventDataType {
1870
+ sessionId: SessionID;
1871
+ targetInfo: TargetInfo;
1872
+ waitingForDebugger: boolean;
1873
+ }
1874
+ }
1851
1875
 
1852
1876
  /**
1853
1877
  * The `inspector.Session` is used for dispatching messages to the V8 inspector
@@ -2237,6 +2261,8 @@ declare module 'inspector' {
2237
2261
  */
2238
2262
  post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
2239
2263
  post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', callback?: (err: Error | null) => void): void;
2264
+ post(method: 'Target.setAutoAttach', params?: Target.SetAutoAttachParameterType, callback?: (err: Error | null) => void): void;
2265
+ post(method: 'Target.setAutoAttach', callback?: (err: Error | null) => void): void;
2240
2266
 
2241
2267
  addListener(event: string, listener: (...args: any[]) => void): this;
2242
2268
  /**
@@ -2355,6 +2381,8 @@ declare module 'inspector' {
2355
2381
  * example, when inspector.waitingForDebugger is called
2356
2382
  */
2357
2383
  addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
2384
+ addListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
2385
+ addListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
2358
2386
  emit(event: string | symbol, ...args: any[]): boolean;
2359
2387
  emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
2360
2388
  emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
@@ -2388,6 +2416,8 @@ declare module 'inspector' {
2388
2416
  emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
2389
2417
  emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
2390
2418
  emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
2419
+ emit(event: 'Target.targetCreated', message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
2420
+ emit(event: 'Target.attachedToTarget', message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
2391
2421
  on(event: string, listener: (...args: any[]) => void): this;
2392
2422
  /**
2393
2423
  * Emitted when any notification from the V8 Inspector is received.
@@ -2505,6 +2535,8 @@ declare module 'inspector' {
2505
2535
  * example, when inspector.waitingForDebugger is called
2506
2536
  */
2507
2537
  on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
2538
+ on(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
2539
+ on(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
2508
2540
  once(event: string, listener: (...args: any[]) => void): this;
2509
2541
  /**
2510
2542
  * Emitted when any notification from the V8 Inspector is received.
@@ -2622,6 +2654,8 @@ declare module 'inspector' {
2622
2654
  * example, when inspector.waitingForDebugger is called
2623
2655
  */
2624
2656
  once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
2657
+ once(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
2658
+ once(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
2625
2659
  prependListener(event: string, listener: (...args: any[]) => void): this;
2626
2660
  /**
2627
2661
  * Emitted when any notification from the V8 Inspector is received.
@@ -2739,6 +2773,8 @@ declare module 'inspector' {
2739
2773
  * example, when inspector.waitingForDebugger is called
2740
2774
  */
2741
2775
  prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
2776
+ prependListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
2777
+ prependListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
2742
2778
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2743
2779
  /**
2744
2780
  * Emitted when any notification from the V8 Inspector is received.
@@ -2856,6 +2892,8 @@ declare module 'inspector' {
2856
2892
  * example, when inspector.waitingForDebugger is called
2857
2893
  */
2858
2894
  prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
2895
+ prependOnceListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
2896
+ prependOnceListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
2859
2897
  }
2860
2898
 
2861
2899
  /**
@@ -3010,6 +3048,7 @@ declare module 'inspector/promises' {
3010
3048
  NodeWorker,
3011
3049
  Network,
3012
3050
  NodeRuntime,
3051
+ Target,
3013
3052
  } from 'inspector';
3014
3053
 
3015
3054
  /**
@@ -3346,6 +3385,7 @@ declare module 'inspector/promises' {
3346
3385
  * Enable the `NodeRuntime.waitingForDisconnect`.
3347
3386
  */
3348
3387
  post(method: 'NodeRuntime.notifyWhenWaitingForDisconnect', params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType): Promise<void>;
3388
+ post(method: 'Target.setAutoAttach', params?: Target.SetAutoAttachParameterType): Promise<void>;
3349
3389
 
3350
3390
  addListener(event: string, listener: (...args: any[]) => void): this;
3351
3391
  /**
@@ -3464,6 +3504,8 @@ declare module 'inspector/promises' {
3464
3504
  * example, when inspector.waitingForDebugger is called
3465
3505
  */
3466
3506
  addListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
3507
+ addListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
3508
+ addListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
3467
3509
  emit(event: string | symbol, ...args: any[]): boolean;
3468
3510
  emit(event: 'inspectorNotification', message: InspectorNotification<object>): boolean;
3469
3511
  emit(event: 'Runtime.executionContextCreated', message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
@@ -3497,6 +3539,8 @@ declare module 'inspector/promises' {
3497
3539
  emit(event: 'Network.loadingFinished', message: InspectorNotification<Network.LoadingFinishedEventDataType>): boolean;
3498
3540
  emit(event: 'NodeRuntime.waitingForDisconnect'): boolean;
3499
3541
  emit(event: 'NodeRuntime.waitingForDebugger'): boolean;
3542
+ emit(event: 'Target.targetCreated', message: InspectorNotification<Target.TargetCreatedEventDataType>): boolean;
3543
+ emit(event: 'Target.attachedToTarget', message: InspectorNotification<Target.AttachedToTargetEventDataType>): boolean;
3500
3544
  on(event: string, listener: (...args: any[]) => void): this;
3501
3545
  /**
3502
3546
  * Emitted when any notification from the V8 Inspector is received.
@@ -3614,6 +3658,8 @@ declare module 'inspector/promises' {
3614
3658
  * example, when inspector.waitingForDebugger is called
3615
3659
  */
3616
3660
  on(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
3661
+ on(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
3662
+ on(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
3617
3663
  once(event: string, listener: (...args: any[]) => void): this;
3618
3664
  /**
3619
3665
  * Emitted when any notification from the V8 Inspector is received.
@@ -3731,6 +3777,8 @@ declare module 'inspector/promises' {
3731
3777
  * example, when inspector.waitingForDebugger is called
3732
3778
  */
3733
3779
  once(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
3780
+ once(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
3781
+ once(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
3734
3782
  prependListener(event: string, listener: (...args: any[]) => void): this;
3735
3783
  /**
3736
3784
  * Emitted when any notification from the V8 Inspector is received.
@@ -3848,6 +3896,8 @@ declare module 'inspector/promises' {
3848
3896
  * example, when inspector.waitingForDebugger is called
3849
3897
  */
3850
3898
  prependListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
3899
+ prependListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
3900
+ prependListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
3851
3901
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
3852
3902
  /**
3853
3903
  * Emitted when any notification from the V8 Inspector is received.
@@ -3965,6 +4015,8 @@ declare module 'inspector/promises' {
3965
4015
  * example, when inspector.waitingForDebugger is called
3966
4016
  */
3967
4017
  prependOnceListener(event: 'NodeRuntime.waitingForDebugger', listener: () => void): this;
4018
+ prependOnceListener(event: 'Target.targetCreated', listener: (message: InspectorNotification<Target.TargetCreatedEventDataType>) => void): this;
4019
+ prependOnceListener(event: 'Target.attachedToTarget', listener: (message: InspectorNotification<Target.AttachedToTargetEventDataType>) => void): this;
3968
4020
  }
3969
4021
 
3970
4022
  export {
@@ -3985,6 +4037,7 @@ declare module 'inspector/promises' {
3985
4037
  NodeWorker,
3986
4038
  Network,
3987
4039
  NodeRuntime,
4040
+ Target,
3988
4041
  };
3989
4042
  }
3990
4043
 
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.0.14",
3
+ "version": "24.1.0",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -155,6 +155,6 @@
155
155
  "undici-types": "~7.8.0"
156
156
  },
157
157
  "peerDependencies": {},
158
- "typesPublisherContentHash": "f2ab6ee3016c1a7d1baf5391d24e04e58c4d932ac8ba8267ea5acc2cf3259dbb",
158
+ "typesPublisherContentHash": "83cb68186fcf703a4b7951de645e523dc4495aa83f0ef95d9b64cb5032c5b1d6",
159
159
  "typeScriptVersion": "5.1"
160
160
  }