@types/node 16.0.3 → 16.3.3

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/inspector.d.ts CHANGED
@@ -11,7 +11,7 @@
11
11
  * The inspector module provides an API for interacting with the V8 inspector.
12
12
  */
13
13
  declare module 'inspector' {
14
- import EventEmitter = require('events');
14
+ import EventEmitter = require('node:events');
15
15
 
16
16
  interface InspectorNotification<T> {
17
17
  method: string;
@@ -1804,6 +1804,100 @@ declare module 'inspector' {
1804
1804
  }
1805
1805
  }
1806
1806
 
1807
+ namespace NodeTracing {
1808
+ interface TraceConfig {
1809
+ /**
1810
+ * Controls how the trace buffer stores data.
1811
+ */
1812
+ recordMode?: string;
1813
+ /**
1814
+ * Included category filters.
1815
+ */
1816
+ includedCategories: string[];
1817
+ }
1818
+
1819
+ interface StartParameterType {
1820
+ traceConfig: TraceConfig;
1821
+ }
1822
+
1823
+ interface GetCategoriesReturnType {
1824
+ /**
1825
+ * A list of supported tracing categories.
1826
+ */
1827
+ categories: string[];
1828
+ }
1829
+
1830
+ interface DataCollectedEventDataType {
1831
+ value: Array<{}>;
1832
+ }
1833
+ }
1834
+
1835
+ namespace NodeWorker {
1836
+ type WorkerID = string;
1837
+
1838
+ /**
1839
+ * Unique identifier of attached debugging session.
1840
+ */
1841
+ type SessionID = string;
1842
+
1843
+ interface WorkerInfo {
1844
+ workerId: WorkerID;
1845
+ type: string;
1846
+ title: string;
1847
+ url: string;
1848
+ }
1849
+
1850
+ interface SendMessageToWorkerParameterType {
1851
+ message: string;
1852
+ /**
1853
+ * Identifier of the session.
1854
+ */
1855
+ sessionId: SessionID;
1856
+ }
1857
+
1858
+ interface EnableParameterType {
1859
+ /**
1860
+ * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
1861
+ * message to run them.
1862
+ */
1863
+ waitForDebuggerOnStart: boolean;
1864
+ }
1865
+
1866
+ interface DetachParameterType {
1867
+ sessionId: SessionID;
1868
+ }
1869
+
1870
+ interface AttachedToWorkerEventDataType {
1871
+ /**
1872
+ * Identifier assigned to the session used to send/receive messages.
1873
+ */
1874
+ sessionId: SessionID;
1875
+ workerInfo: WorkerInfo;
1876
+ waitingForDebugger: boolean;
1877
+ }
1878
+
1879
+ interface DetachedFromWorkerEventDataType {
1880
+ /**
1881
+ * Detached session identifier.
1882
+ */
1883
+ sessionId: SessionID;
1884
+ }
1885
+
1886
+ interface ReceivedMessageFromWorkerEventDataType {
1887
+ /**
1888
+ * Identifier of a session which sends a message.
1889
+ */
1890
+ sessionId: SessionID;
1891
+ message: string;
1892
+ }
1893
+ }
1894
+
1895
+ namespace NodeRuntime {
1896
+ interface NotifyWhenWaitingForDisconnectParameterType {
1897
+ enabled: boolean;
1898
+ }
1899
+ }
1900
+
1807
1901
  /**
1808
1902
  * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
1809
1903
  */
@@ -2203,6 +2297,53 @@ declare module 'inspector' {
2203
2297
 
2204
2298
  post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
2205
2299
 
2300
+ /**
2301
+ * Gets supported tracing categories.
2302
+ */
2303
+ post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
2304
+
2305
+ /**
2306
+ * Start trace events collection.
2307
+ */
2308
+ post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
2309
+ post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
2310
+
2311
+ /**
2312
+ * Stop trace events collection. Remaining collected events will be sent as a sequence of
2313
+ * dataCollected events followed by tracingComplete event.
2314
+ */
2315
+ post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
2316
+
2317
+ /**
2318
+ * Sends protocol message over session with given id.
2319
+ */
2320
+ post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
2321
+ post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
2322
+
2323
+ /**
2324
+ * Instructs the inspector to attach to running workers. Will also attach to new workers
2325
+ * as they start
2326
+ */
2327
+ post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
2328
+ post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
2329
+
2330
+ /**
2331
+ * Detaches from all running workers and disables attaching to new workers as they are started.
2332
+ */
2333
+ post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
2334
+
2335
+ /**
2336
+ * Detached from the worker with given sessionId.
2337
+ */
2338
+ post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
2339
+ post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
2340
+
2341
+ /**
2342
+ * Enable the `NodeRuntime.waitingForDisconnect`.
2343
+ */
2344
+ post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
2345
+ post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void;
2346
+
2206
2347
  // Events
2207
2348
 
2208
2349
  addListener(event: string, listener: (...args: any[]) => void): this;
@@ -2297,6 +2438,41 @@ declare module 'inspector' {
2297
2438
  */
2298
2439
  addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2299
2440
 
2441
+ /**
2442
+ * Contains an bucket of collected trace events.
2443
+ */
2444
+ addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2445
+
2446
+ /**
2447
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2448
+ * delivered via dataCollected events.
2449
+ */
2450
+ addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2451
+
2452
+ /**
2453
+ * Issued when attached to a worker.
2454
+ */
2455
+ addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2456
+
2457
+ /**
2458
+ * Issued when detached from the worker.
2459
+ */
2460
+ addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2461
+
2462
+ /**
2463
+ * Notifies about a new protocol message received from the session
2464
+ * (session ID is provided in attachedToWorker notification).
2465
+ */
2466
+ addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2467
+
2468
+ /**
2469
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
2470
+ * enabled.
2471
+ * It is fired when the Node process finished all code execution and is
2472
+ * waiting for all frontends to disconnect.
2473
+ */
2474
+ addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2475
+
2300
2476
  emit(event: string | symbol, ...args: any[]): boolean;
2301
2477
  emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
2302
2478
  emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
@@ -2319,6 +2495,12 @@ declare module 'inspector' {
2319
2495
  emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
2320
2496
  emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
2321
2497
  emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
2498
+ emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
2499
+ emit(event: "NodeTracing.tracingComplete"): boolean;
2500
+ emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
2501
+ emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
2502
+ emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
2503
+ emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
2322
2504
 
2323
2505
  on(event: string, listener: (...args: any[]) => void): this;
2324
2506
 
@@ -2412,6 +2594,41 @@ declare module 'inspector' {
2412
2594
  */
2413
2595
  on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2414
2596
 
2597
+ /**
2598
+ * Contains an bucket of collected trace events.
2599
+ */
2600
+ on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2601
+
2602
+ /**
2603
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2604
+ * delivered via dataCollected events.
2605
+ */
2606
+ on(event: "NodeTracing.tracingComplete", listener: () => void): this;
2607
+
2608
+ /**
2609
+ * Issued when attached to a worker.
2610
+ */
2611
+ on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2612
+
2613
+ /**
2614
+ * Issued when detached from the worker.
2615
+ */
2616
+ on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2617
+
2618
+ /**
2619
+ * Notifies about a new protocol message received from the session
2620
+ * (session ID is provided in attachedToWorker notification).
2621
+ */
2622
+ on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2623
+
2624
+ /**
2625
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
2626
+ * enabled.
2627
+ * It is fired when the Node process finished all code execution and is
2628
+ * waiting for all frontends to disconnect.
2629
+ */
2630
+ on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2631
+
2415
2632
  once(event: string, listener: (...args: any[]) => void): this;
2416
2633
 
2417
2634
  /**
@@ -2504,6 +2721,41 @@ declare module 'inspector' {
2504
2721
  */
2505
2722
  once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2506
2723
 
2724
+ /**
2725
+ * Contains an bucket of collected trace events.
2726
+ */
2727
+ once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2728
+
2729
+ /**
2730
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2731
+ * delivered via dataCollected events.
2732
+ */
2733
+ once(event: "NodeTracing.tracingComplete", listener: () => void): this;
2734
+
2735
+ /**
2736
+ * Issued when attached to a worker.
2737
+ */
2738
+ once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2739
+
2740
+ /**
2741
+ * Issued when detached from the worker.
2742
+ */
2743
+ once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2744
+
2745
+ /**
2746
+ * Notifies about a new protocol message received from the session
2747
+ * (session ID is provided in attachedToWorker notification).
2748
+ */
2749
+ once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2750
+
2751
+ /**
2752
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
2753
+ * enabled.
2754
+ * It is fired when the Node process finished all code execution and is
2755
+ * waiting for all frontends to disconnect.
2756
+ */
2757
+ once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2758
+
2507
2759
  prependListener(event: string, listener: (...args: any[]) => void): this;
2508
2760
 
2509
2761
  /**
@@ -2596,6 +2848,41 @@ declare module 'inspector' {
2596
2848
  */
2597
2849
  prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2598
2850
 
2851
+ /**
2852
+ * Contains an bucket of collected trace events.
2853
+ */
2854
+ prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2855
+
2856
+ /**
2857
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2858
+ * delivered via dataCollected events.
2859
+ */
2860
+ prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2861
+
2862
+ /**
2863
+ * Issued when attached to a worker.
2864
+ */
2865
+ prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2866
+
2867
+ /**
2868
+ * Issued when detached from the worker.
2869
+ */
2870
+ prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2871
+
2872
+ /**
2873
+ * Notifies about a new protocol message received from the session
2874
+ * (session ID is provided in attachedToWorker notification).
2875
+ */
2876
+ prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2877
+
2878
+ /**
2879
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
2880
+ * enabled.
2881
+ * It is fired when the Node process finished all code execution and is
2882
+ * waiting for all frontends to disconnect.
2883
+ */
2884
+ prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2885
+
2599
2886
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2600
2887
 
2601
2888
  /**
@@ -2687,6 +2974,41 @@ declare module 'inspector' {
2687
2974
  * If heap objects tracking has been started then backend may send update for one or more fragments
2688
2975
  */
2689
2976
  prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2977
+
2978
+ /**
2979
+ * Contains an bucket of collected trace events.
2980
+ */
2981
+ prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2982
+
2983
+ /**
2984
+ * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2985
+ * delivered via dataCollected events.
2986
+ */
2987
+ prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2988
+
2989
+ /**
2990
+ * Issued when attached to a worker.
2991
+ */
2992
+ prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2993
+
2994
+ /**
2995
+ * Issued when detached from the worker.
2996
+ */
2997
+ prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2998
+
2999
+ /**
3000
+ * Notifies about a new protocol message received from the session
3001
+ * (session ID is provided in attachedToWorker notification).
3002
+ */
3003
+ prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
3004
+
3005
+ /**
3006
+ * This event is fired instead of `Runtime.executionContextDestroyed` when
3007
+ * enabled.
3008
+ * It is fired when the Node process finished all code execution and is
3009
+ * waiting for all frontends to disconnect.
3010
+ */
3011
+ prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2690
3012
  }
2691
3013
 
2692
3014
  // Top Level API
@@ -2719,5 +3041,6 @@ declare module 'inspector' {
2719
3041
  }
2720
3042
 
2721
3043
  declare module 'node:inspector' {
2722
- export * from 'inspector';
3044
+ import EventEmitter = require('inspector');
3045
+ export = EventEmitter;
2723
3046
  }
node/module.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'module' {
2
- import { URL } from 'url';
2
+ import { URL } from 'node:url';
3
3
  namespace Module {
4
4
  /**
5
5
  * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
node/net.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module 'net' {
2
- import * as stream from 'stream';
3
- import { Abortable, EventEmitter } from 'events';
4
- import * as dns from 'dns';
2
+ import * as stream from 'node:stream';
3
+ import { Abortable, EventEmitter } from 'node:events';
4
+ import * as dns from 'node:dns';
5
5
 
6
6
  type LookupFunction = (
7
7
  hostname: string,
node/os.d.ts CHANGED
@@ -208,6 +208,9 @@ declare module 'os' {
208
208
  }
209
209
  }
210
210
 
211
+ const devNull: string;
212
+ const EOL: string;
213
+
211
214
  function arch(): string;
212
215
  /**
213
216
  * Returns a string identifying the kernel version.
@@ -219,7 +222,6 @@ declare module 'os' {
219
222
  function version(): string;
220
223
  function platform(): NodeJS.Platform;
221
224
  function tmpdir(): string;
222
- const EOL: string;
223
225
  function endianness(): "BE" | "LE";
224
226
  /**
225
227
  * Gets the priority of a process.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.0.3",
3
+ "version": "16.3.3",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "51d8ad1a9b0bed07493ef55038c7b74d0dc1c4e052495b0180b5f8bf45bae1d0",
230
+ "typesPublisherContentHash": "046ee08897f6b1ab1ee2bd22e5df32d1fa1f782ba1d32a106aab33c28f7f1081",
231
231
  "typeScriptVersion": "3.6"
232
232
  }
node/perf_hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'perf_hooks' {
2
- import { AsyncResource } from 'async_hooks';
2
+ import { AsyncResource } from 'node:async_hooks';
3
3
 
4
4
  type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
5
5
 
node/process.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare module 'process' {
2
- import * as tty from 'tty';
2
+ import * as tty from 'node:tty';
3
+ import { Worker } from 'node:worker_threads';
3
4
 
4
5
  global {
5
6
  var process: NodeJS.Process;
@@ -78,22 +79,26 @@ declare module 'process' {
78
79
  type BeforeExitListener = (code: number) => void;
79
80
  type DisconnectListener = () => void;
80
81
  type ExitListener = (code: number) => void;
81
- type RejectionHandledListener = (promise: Promise<any>) => void;
82
+ type RejectionHandledListener = (promise: Promise<unknown>) => void;
82
83
  type UncaughtExceptionListener = (error: Error) => void;
83
- type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
84
+ type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<unknown>) => void;
84
85
  type WarningListener = (warning: Error) => void;
85
- type MessageListener = (message: any, sendHandle: any) => void;
86
+ type MessageListener = (message: unknown, sendHandle: unknown) => void;
86
87
  type SignalsListener = (signal: Signals) => void;
87
- type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
88
- type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
89
- type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
88
+ type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<unknown>, value: unknown) => void;
89
+ type WorkerListener = (worker: Worker) => void;
90
90
 
91
91
  interface Socket extends ReadWriteStream {
92
92
  isTTY?: true | undefined;
93
93
  }
94
94
 
95
95
  // Alias for compatibility
96
- interface ProcessEnv extends Dict<string> {}
96
+ interface ProcessEnv extends Dict<string> {
97
+ /**
98
+ * Can be used to change the default timezone at runtime
99
+ */
100
+ TZ?: string;
101
+ }
97
102
 
98
103
  interface HRTime {
99
104
  (time?: [number, number]): [number, number];
@@ -363,23 +368,21 @@ declare module 'process' {
363
368
  addListener(event: "warning", listener: WarningListener): this;
364
369
  addListener(event: "message", listener: MessageListener): this;
365
370
  addListener(event: Signals, listener: SignalsListener): this;
366
- addListener(event: "newListener", listener: NewListenerListener): this;
367
- addListener(event: "removeListener", listener: RemoveListenerListener): this;
368
371
  addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
372
+ addListener(event: "worker", listener: WorkerListener): this;
369
373
 
370
374
  emit(event: "beforeExit", code: number): boolean;
371
375
  emit(event: "disconnect"): boolean;
372
376
  emit(event: "exit", code: number): boolean;
373
- emit(event: "rejectionHandled", promise: Promise<any>): boolean;
377
+ emit(event: "rejectionHandled", promise: Promise<unknown>): boolean;
374
378
  emit(event: "uncaughtException", error: Error): boolean;
375
379
  emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
376
- emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
380
+ emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
377
381
  emit(event: "warning", warning: Error): boolean;
378
- emit(event: "message", message: any, sendHandle: any): this;
382
+ emit(event: "message", message: unknown, sendHandle: unknown): this;
379
383
  emit(event: Signals, signal: Signals): boolean;
380
- emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
381
- emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
382
- emit(event: "multipleResolves", listener: MultipleResolveListener): this;
384
+ emit(event: "multipleResolves", type: MultipleResolveType, promise: Promise<unknown>, value: unknown): this;
385
+ emit(event: "worker", listener: WorkerListener): this;
383
386
 
384
387
  on(event: "beforeExit", listener: BeforeExitListener): this;
385
388
  on(event: "disconnect", listener: DisconnectListener): this;
@@ -391,9 +394,8 @@ declare module 'process' {
391
394
  on(event: "warning", listener: WarningListener): this;
392
395
  on(event: "message", listener: MessageListener): this;
393
396
  on(event: Signals, listener: SignalsListener): this;
394
- on(event: "newListener", listener: NewListenerListener): this;
395
- on(event: "removeListener", listener: RemoveListenerListener): this;
396
397
  on(event: "multipleResolves", listener: MultipleResolveListener): this;
398
+ on(event: "worker", listener: WorkerListener): this;
397
399
  on(event: string | symbol, listener: (...args: any[]) => void): this;
398
400
 
399
401
  once(event: "beforeExit", listener: BeforeExitListener): this;
@@ -406,9 +408,9 @@ declare module 'process' {
406
408
  once(event: "warning", listener: WarningListener): this;
407
409
  once(event: "message", listener: MessageListener): this;
408
410
  once(event: Signals, listener: SignalsListener): this;
409
- once(event: "newListener", listener: NewListenerListener): this;
410
- once(event: "removeListener", listener: RemoveListenerListener): this;
411
411
  once(event: "multipleResolves", listener: MultipleResolveListener): this;
412
+ once(event: "worker", listener: WorkerListener): this;
413
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
412
414
 
413
415
  prependListener(event: "beforeExit", listener: BeforeExitListener): this;
414
416
  prependListener(event: "disconnect", listener: DisconnectListener): this;
@@ -420,9 +422,8 @@ declare module 'process' {
420
422
  prependListener(event: "warning", listener: WarningListener): this;
421
423
  prependListener(event: "message", listener: MessageListener): this;
422
424
  prependListener(event: Signals, listener: SignalsListener): this;
423
- prependListener(event: "newListener", listener: NewListenerListener): this;
424
- prependListener(event: "removeListener", listener: RemoveListenerListener): this;
425
425
  prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
426
+ prependListener(event: "worker", listener: WorkerListener): this;
426
427
 
427
428
  prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
428
429
  prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
@@ -434,9 +435,8 @@ declare module 'process' {
434
435
  prependOnceListener(event: "warning", listener: WarningListener): this;
435
436
  prependOnceListener(event: "message", listener: MessageListener): this;
436
437
  prependOnceListener(event: Signals, listener: SignalsListener): this;
437
- prependOnceListener(event: "newListener", listener: NewListenerListener): this;
438
- prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
439
438
  prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
439
+ prependOnceListener(event: "worker", listener: WorkerListener): this;
440
440
 
441
441
  listeners(event: "beforeExit"): BeforeExitListener[];
442
442
  listeners(event: "disconnect"): DisconnectListener[];
@@ -448,9 +448,8 @@ declare module 'process' {
448
448
  listeners(event: "warning"): WarningListener[];
449
449
  listeners(event: "message"): MessageListener[];
450
450
  listeners(event: Signals): SignalsListener[];
451
- listeners(event: "newListener"): NewListenerListener[];
452
- listeners(event: "removeListener"): RemoveListenerListener[];
453
451
  listeners(event: "multipleResolves"): MultipleResolveListener[];
452
+ listeners(event: "worker"): WorkerListener[];
454
453
  }
455
454
  }
456
455
  }
node/readline.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'readline' {
2
- import { Abortable, EventEmitter } from 'events';
2
+ import { Abortable, EventEmitter } from 'node:events';
3
3
 
4
4
  interface Key {
5
5
  sequence?: string | undefined;
node/repl.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module 'repl' {
2
- import { Interface, Completer, AsyncCompleter } from 'readline';
3
- import { Context } from 'vm';
4
- import { InspectOptions } from 'util';
2
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
3
+ import { Context } from 'node:vm';
4
+ import { InspectOptions } from 'node:util';
5
5
 
6
6
  interface ReplOptions {
7
7
  /**
node/stream/promises.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module "stream/promises" {
2
2
  import { FinishedOptions, PipelineSource, PipelineTransform,
3
- PipelineDestination, PipelinePromise, PipelineOptions } from "stream";
3
+ PipelineDestination, PipelinePromise, PipelineOptions } from "node:stream";
4
4
 
5
5
  function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
6
6
 
node/stream.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'stream' {
2
- import { EventEmitter, Abortable } from 'events';
3
- import * as streamPromises from "stream/promises";
2
+ import { EventEmitter, Abortable } from 'node:events';
3
+ import * as streamPromises from "node:stream/promises";
4
4
 
5
5
  class internal extends EventEmitter {
6
6
  pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
node/timers/promises.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'timers/promises' {
2
- import { TimerOptions } from 'timers';
2
+ import { TimerOptions } from 'node:timers';
3
3
 
4
4
  /**
5
5
  * Returns a promise that resolves after the specified delay in milliseconds.