@types/node 16.3.0 → 16.4.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 CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://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: Fri, 09 Jul 2021 02:01:16 GMT
11
+ * Last updated: Tue, 20 Jul 2021 21:31:16 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
node/assert/strict.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  declare module 'assert/strict' {
2
- import { strict } from 'assert';
2
+ import { strict } from 'node:assert';
3
3
  export = strict;
4
4
  }
5
5
 
6
6
  declare module 'node:assert/strict' {
7
- import * as assert from 'assert/strict';
8
- export = assert;
7
+ import { strict } from 'node:assert';
8
+ export = strict;
9
9
  }
node/buffer.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'buffer' {
2
- import { BinaryLike } from 'crypto';
2
+ import { BinaryLike } from 'node:crypto';
3
3
 
4
4
  export const INSPECT_MAX_BYTES: number;
5
5
  export const kMaxLength: number;
@@ -91,7 +91,7 @@ declare module 'buffer' {
91
91
  * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
92
92
  * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
93
93
  */
94
- class Buffer extends Uint8Array {
94
+ interface BufferConstructor {
95
95
  /**
96
96
  * Allocates a new buffer containing the given {str}.
97
97
  *
@@ -99,21 +99,21 @@ declare module 'buffer' {
99
99
  * @param encoding encoding to use, optional. Default is 'utf8'
100
100
  * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
101
101
  */
102
- constructor(str: string, encoding?: BufferEncoding);
102
+ new(str: string, encoding?: BufferEncoding): Buffer;
103
103
  /**
104
104
  * Allocates a new buffer of {size} octets.
105
105
  *
106
106
  * @param size count of octets to allocate.
107
107
  * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
108
108
  */
109
- constructor(size: number);
109
+ new(size: number): Buffer;
110
110
  /**
111
111
  * Allocates a new buffer containing the given {array} of octets.
112
112
  *
113
113
  * @param array The octets to store.
114
114
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
115
115
  */
116
- constructor(array: Uint8Array);
116
+ new(array: Uint8Array): Buffer;
117
117
  /**
118
118
  * Produces a Buffer backed by the same allocated memory as
119
119
  * the given {ArrayBuffer}/{SharedArrayBuffer}.
@@ -122,21 +122,21 @@ declare module 'buffer' {
122
122
  * @param arrayBuffer The ArrayBuffer with which to share memory.
123
123
  * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
124
124
  */
125
- constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
125
+ new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
126
126
  /**
127
127
  * Allocates a new buffer containing the given {array} of octets.
128
128
  *
129
129
  * @param array The octets to store.
130
130
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
131
131
  */
132
- constructor(array: ReadonlyArray<any>);
132
+ new(array: ReadonlyArray<any>): Buffer;
133
133
  /**
134
134
  * Copies the passed {buffer} data onto a new {Buffer} instance.
135
135
  *
136
136
  * @param buffer The buffer to copy.
137
137
  * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
138
138
  */
139
- constructor(buffer: Buffer);
139
+ new(buffer: Buffer): Buffer;
140
140
  /**
141
141
  * When passed a reference to the .buffer property of a TypedArray instance,
142
142
  * the newly created Buffer will share the same allocated memory as the TypedArray.
@@ -145,37 +145,37 @@ declare module 'buffer' {
145
145
  *
146
146
  * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
147
147
  */
148
- static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
148
+ from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
149
149
  /**
150
150
  * Creates a new Buffer using the passed {data}
151
151
  * @param data data to create a new Buffer
152
152
  */
153
- static from(data: Uint8Array | ReadonlyArray<number>): Buffer;
154
- static from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
153
+ from(data: Uint8Array | ReadonlyArray<number>): Buffer;
154
+ from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
155
155
  /**
156
156
  * Creates a new Buffer containing the given JavaScript string {str}.
157
157
  * If provided, the {encoding} parameter identifies the character encoding.
158
158
  * If not provided, {encoding} defaults to 'utf8'.
159
159
  */
160
- static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
160
+ from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
161
161
  /**
162
162
  * Creates a new Buffer using the passed {data}
163
163
  * @param values to create a new Buffer
164
164
  */
165
- static of(...items: number[]): Buffer;
165
+ of(...items: number[]): Buffer;
166
166
  /**
167
167
  * Returns true if {obj} is a Buffer
168
168
  *
169
169
  * @param obj object to test.
170
170
  */
171
- static isBuffer(obj: any): obj is Buffer;
171
+ isBuffer(obj: any): obj is Buffer;
172
172
  /**
173
173
  * Returns true if {encoding} is a valid encoding argument.
174
174
  * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
175
175
  *
176
176
  * @param encoding string to test.
177
177
  */
178
- static isEncoding(encoding: string): encoding is BufferEncoding;
178
+ isEncoding(encoding: string): encoding is BufferEncoding;
179
179
  /**
180
180
  * Gives the actual byte length of a string. encoding defaults to 'utf8'.
181
181
  * This is not the same as String.prototype.length since that returns the number of characters in a string.
@@ -183,7 +183,7 @@ declare module 'buffer' {
183
183
  * @param string string to test.
184
184
  * @param encoding encoding used to evaluate (defaults to 'utf8')
185
185
  */
186
- static byteLength(
186
+ byteLength(
187
187
  string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
188
188
  encoding?: BufferEncoding
189
189
  ): number;
@@ -198,11 +198,11 @@ declare module 'buffer' {
198
198
  * @param totalLength Total length of the buffers when concatenated.
199
199
  * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
200
200
  */
201
- static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
201
+ concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
202
202
  /**
203
203
  * The same as buf1.compare(buf2).
204
204
  */
205
- static compare(buf1: Uint8Array, buf2: Uint8Array): number;
205
+ compare(buf1: Uint8Array, buf2: Uint8Array): number;
206
206
  /**
207
207
  * Allocates a new buffer of {size} octets.
208
208
  *
@@ -211,26 +211,28 @@ declare module 'buffer' {
211
211
  * If parameter is omitted, buffer will be filled with zeros.
212
212
  * @param encoding encoding used for call to buf.fill while initalizing
213
213
  */
214
- static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
214
+ alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
215
215
  /**
216
216
  * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
217
217
  * of the newly created Buffer are unknown and may contain sensitive data.
218
218
  *
219
219
  * @param size count of octets to allocate
220
220
  */
221
- static allocUnsafe(size: number): Buffer;
221
+ allocUnsafe(size: number): Buffer;
222
222
  /**
223
223
  * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
224
224
  * of the newly created Buffer are unknown and may contain sensitive data.
225
225
  *
226
226
  * @param size count of octets to allocate
227
227
  */
228
- static allocUnsafeSlow(size: number): Buffer;
228
+ allocUnsafeSlow(size: number): Buffer;
229
229
  /**
230
230
  * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
231
231
  */
232
- static poolSize: number;
232
+ poolSize: number;
233
+ }
233
234
 
235
+ interface Buffer extends Uint8Array {
234
236
  write(string: string, encoding?: BufferEncoding): number;
235
237
  write(string: string, offset: number, encoding?: BufferEncoding): number;
236
238
  write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
@@ -321,6 +323,7 @@ declare module 'buffer' {
321
323
  keys(): IterableIterator<number>;
322
324
  values(): IterableIterator<number>;
323
325
  }
326
+ var Buffer: BufferConstructor;
324
327
 
325
328
  /**
326
329
  * Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1).
node/child_process.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  declare module 'child_process' {
2
- import { ObjectEncodingOptions } from 'fs';
3
- import { EventEmitter, Abortable } from 'events';
4
- import * as net from 'net';
5
- import { Writable, Readable, Stream, Pipe } from 'stream';
2
+ import { ObjectEncodingOptions } from 'node:fs';
3
+ import { EventEmitter, Abortable } from 'node:events';
4
+ import * as net from 'node:net';
5
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
6
+ import { URL } from 'node:url';
6
7
 
7
8
  type Serializable = string | object | number | boolean | bigint;
8
9
  type SendHandle = net.Socket | net.Server;
@@ -157,7 +158,7 @@ declare module 'child_process' {
157
158
  interface ProcessEnvOptions {
158
159
  uid?: number | undefined;
159
160
  gid?: number | undefined;
160
- cwd?: string | undefined;
161
+ cwd?: string | URL | undefined;
161
162
  env?: NodeJS.ProcessEnv | undefined;
162
163
  }
163
164
 
@@ -488,7 +489,7 @@ declare module 'child_process' {
488
489
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
489
490
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
490
491
 
491
- interface CommonExecOptions extends ProcessEnvOptions {
492
+ interface CommonExecOptions extends CommonOptions {
492
493
  input?: string | NodeJS.ArrayBufferView | undefined;
493
494
  stdio?: StdioOptions | undefined;
494
495
  killSignal?: NodeJS.Signals | number | undefined;
node/cluster.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  // Requires `esModuleInterop: true`
2
2
  declare module 'cluster' {
3
- import * as child from 'child_process';
4
- import EventEmitter = require('events');
5
- import * as net from 'net';
3
+ import * as child from 'node:child_process';
4
+ import EventEmitter = require('node:events');
5
+ import * as net from 'node:net';
6
6
 
7
7
  export interface ClusterSettings {
8
8
  execArgv?: string[] | undefined; // default: process.execArgv
@@ -184,4 +184,5 @@ declare module 'cluster' {
184
184
 
185
185
  declare module 'node:cluster' {
186
186
  export * from 'cluster';
187
+ export { default as default } from 'cluster';
187
188
  }
node/console.d.ts CHANGED
@@ -1,5 +1,10 @@
1
1
  declare module 'console' {
2
- import { InspectOptions } from 'util';
2
+ import console = require('node:console');
3
+ export = console;
4
+ }
5
+
6
+ declare module 'node:console' {
7
+ import { InspectOptions } from 'node:util';
3
8
 
4
9
  global {
5
10
  // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
@@ -127,8 +132,3 @@ declare module 'console' {
127
132
 
128
133
  export = globalThis.console;
129
134
  }
130
-
131
- declare module 'node:console' {
132
- import console = require('console');
133
- export = console;
134
- }
node/constants.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2
2
  declare module 'constants' {
3
- import { constants as osConstants, SignalConstants } from 'os';
4
- import { constants as cryptoConstants } from 'crypto';
5
- import { constants as fsConstants } from 'fs';
3
+ import { constants as osConstants, SignalConstants } from 'node:os';
4
+ import { constants as cryptoConstants } from 'node:crypto';
5
+ import { constants as fsConstants } from 'node:fs';
6
6
 
7
7
  const exp: typeof osConstants.errno &
8
8
  typeof osConstants.priority &
node/crypto.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'crypto' {
2
- import * as stream from 'stream';
3
- import { PeerCertificate } from 'tls';
2
+ import * as stream from 'node:stream';
3
+ import { PeerCertificate } from 'node:tls';
4
4
 
5
5
  interface Certificate {
6
6
  /**
node/dgram.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module 'dgram' {
2
- import { AddressInfo } from 'net';
3
- import * as dns from 'dns';
4
- import { EventEmitter, Abortable } from 'events';
2
+ import { AddressInfo } from 'node:net';
3
+ import * as dns from 'node:dns';
4
+ import { EventEmitter, Abortable } from 'node:events';
5
5
 
6
6
  interface RemoteInfo {
7
7
  address: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @experimental
3
3
  */
4
- declare module 'diagnostic_channel' {
4
+ declare module 'diagnostics_channel' {
5
5
  /**
6
6
  * Returns wether a named channel has subscribers or not.
7
7
  */
@@ -33,6 +33,6 @@ declare module 'diagnostic_channel' {
33
33
  }
34
34
  }
35
35
 
36
- declare module 'node:diagnostic_channel' {
37
- export * from 'diagnostic_channel';
36
+ declare module 'node:diagnostics_channel' {
37
+ export * from 'diagnostics_channel';
38
38
  }
node/dns/promises.d.ts CHANGED
@@ -14,7 +14,7 @@ declare module "dns/promises" {
14
14
  RecordWithTtl,
15
15
  ResolveOptions,
16
16
  ResolverOptions,
17
- } from "dns";
17
+ } from "node:dns";
18
18
 
19
19
  function getServers(): string[];
20
20
 
node/dns.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'dns' {
2
- import * as dnsPromises from "dns/promises";
2
+ import * as dnsPromises from "node:dns/promises";
3
3
 
4
4
  // Supported getaddrinfo flags.
5
5
  export const ADDRCONFIG: number;
node/domain.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- /**
2
- * @deprecated
3
- */
1
+ /**
2
+ * @deprecated
3
+ */
4
4
  declare module 'domain' {
5
- import EventEmitter = require('events');
5
+ import EventEmitter = require('node:events');
6
6
  class Domain extends EventEmitter {
7
7
  members: Array<EventEmitter | NodeJS.Timer>;
8
8
  enter(): void;
@@ -17,9 +17,9 @@ declare module 'domain' {
17
17
  function create(): Domain;
18
18
  }
19
19
 
20
- /**
21
- * @deprecated
22
- */
20
+ /**
21
+ * @deprecated
22
+ */
23
23
  declare module 'node:domain' {
24
24
  export * from 'domain';
25
25
  }
node/events.d.ts CHANGED
@@ -53,7 +53,7 @@ declare module 'events' {
53
53
  static defaultMaxListeners: number;
54
54
  }
55
55
 
56
- import internal = require('events');
56
+ import internal = require('node:events');
57
57
  namespace EventEmitter {
58
58
  // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
59
59
  export { internal as EventEmitter };
node/fs/promises.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'fs/promises' {
2
- import { Abortable } from 'events';
3
- import { Stream } from 'stream';
2
+ import { Abortable } from 'node:events';
3
+ import { Stream } from 'node:stream';
4
4
  import {
5
5
  Stats,
6
6
  BigIntStats,
@@ -19,7 +19,7 @@ declare module 'fs/promises' {
19
19
  OpenMode,
20
20
  Mode,
21
21
  WatchOptions,
22
- } from 'fs';
22
+ } from 'node:fs';
23
23
 
24
24
  interface FlagAndOpenMode {
25
25
  mode?: Mode | undefined;
node/fs.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  declare module 'fs' {
2
- import * as stream from 'stream';
3
- import { Abortable, EventEmitter } from 'events';
4
- import { URL } from 'url';
5
- import * as promises from 'fs/promises';
2
+ import * as stream from 'node:stream';
3
+ import { Abortable, EventEmitter } from 'node:events';
4
+ import { URL } from 'node:url';
5
+ import * as promises from 'node:fs/promises';
6
6
 
7
7
  export { promises };
8
8
  /**
node/http.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module 'http' {
2
- import * as stream from 'stream';
3
- import { URL } from 'url';
4
- import { Socket, Server as NetServer } from 'net';
2
+ import * as stream from 'node:stream';
3
+ import { URL } from 'node:url';
4
+ import { Socket, Server as NetServer } from 'node:net';
5
5
 
6
6
  // incoming headers will never contain number
7
7
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
node/http2.d.ts CHANGED
@@ -1,18 +1,18 @@
1
1
  declare module 'http2' {
2
- import EventEmitter = require('events');
3
- import * as fs from 'fs';
4
- import * as net from 'net';
5
- import * as stream from 'stream';
6
- import * as tls from 'tls';
7
- import * as url from 'url';
2
+ import EventEmitter = require('node:events');
3
+ import * as fs from 'node:fs';
4
+ import * as net from 'node:net';
5
+ import * as stream from 'node:stream';
6
+ import * as tls from 'node:tls';
7
+ import * as url from 'node:url';
8
8
 
9
9
  import {
10
10
  IncomingHttpHeaders as Http1IncomingHttpHeaders,
11
11
  OutgoingHttpHeaders,
12
12
  IncomingMessage,
13
13
  ServerResponse,
14
- } from 'http';
15
- export { OutgoingHttpHeaders } from 'http';
14
+ } from 'node:http';
15
+ export { OutgoingHttpHeaders } from 'node:http';
16
16
 
17
17
  export interface IncomingHttpStatusHeader {
18
18
  ":status"?: number | undefined;
node/https.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare module 'https' {
2
- import * as tls from 'tls';
3
- import * as http from 'http';
4
- import { URL } from 'url';
2
+ import * as tls from 'node:tls';
3
+ import * as http from 'node:http';
4
+ import { URL } from 'node:url';
5
5
 
6
6
  type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
7
7
 
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 16.3
1
+ // Type definitions for non-npm package Node.js 16.4
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.3.0",
3
+ "version": "16.4.0",
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": "4bb604c079055370e21bcc5b3653fe8fda304149e219b7fd226fd35a9de639e9",
230
+ "typesPublisherContentHash": "2ec5c8e3027bcb171df7f44d56e9c54b0fd1bbb9e1a658b14a3f5b1ba991635e",
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,6 +1,6 @@
1
1
  declare module 'process' {
2
- import * as tty from 'tty';
3
- import { Worker } from 'worker_threads';
2
+ import * as tty from 'node:tty';
3
+ import { Worker } from 'node:worker_threads';
4
4
 
5
5
  global {
6
6
  var process: NodeJS.Process;
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.
node/timers.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'timers' {
2
- import { Abortable } from 'events';
3
- import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'timers/promises';
2
+ import { Abortable } from 'node:events';
3
+ import { setTimeout as setTimeoutPromise, setImmediate as setImmediatePromise, setInterval as setIntervalPromise } from 'node:timers/promises';
4
4
 
5
5
  interface TimerOptions extends Abortable {
6
6
  /**
@@ -73,29 +73,3 @@ declare module 'timers' {
73
73
  declare module 'node:timers' {
74
74
  export * from 'timers';
75
75
  }
76
-
77
- declare module 'timers/promises' {
78
- import { TimerOptions } from 'timers';
79
-
80
- /**
81
- * Returns a promise that resolves after the specified delay in milliseconds.
82
- * @param delay defaults to 1
83
- */
84
- function setTimeout<T = void>(delay?: number, value?: T, options?: TimerOptions): Promise<T>;
85
-
86
- /**
87
- * Returns a promise that resolves in the next tick.
88
- */
89
- function setImmediate<T = void>(value?: T, options?: TimerOptions): Promise<T>;
90
-
91
- /**
92
- *
93
- * Returns an async iterator that generates values in an interval of delay ms.
94
- * @param delay defaults to 1
95
- */
96
- function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
97
- }
98
-
99
- declare module 'node:timers/promises' {
100
- export * from 'timers/promises';
101
- }
node/tls.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'tls' {
2
- import { X509Certificate } from 'crypto';
3
- import * as net from 'net';
2
+ import { X509Certificate } from 'node:crypto';
3
+ import * as net from 'node:net';
4
4
 
5
5
  const CLIENT_RENEG_LIMIT: number;
6
6
  const CLIENT_RENEG_WINDOW: number;
node/ts3.6/assert.d.ts CHANGED
@@ -96,3 +96,8 @@ declare module 'assert' {
96
96
 
97
97
  export = assert;
98
98
  }
99
+
100
+ declare module 'node:assert' {
101
+ import assert = require('assert');
102
+ export = assert;
103
+ }
node/ts3.6/base.d.ts CHANGED
@@ -23,7 +23,7 @@
23
23
  /// <reference path="../constants.d.ts" />
24
24
  /// <reference path="../crypto.d.ts" />
25
25
  /// <reference path="../dgram.d.ts" />
26
- /// <reference path="../diagnostic_channel.d.ts" />
26
+ /// <reference path="../diagnostics_channel.d.ts" />
27
27
  /// <reference path="../dns.d.ts" />
28
28
  /// <reference path="../dns/promises.d.ts" />
29
29
  /// <reference path="../dns/promises.d.ts" />
node/tty.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'tty' {
2
- import * as net from 'net';
2
+ import * as net from 'node:net';
3
3
 
4
4
  function isatty(fd: number): boolean;
5
5
  class ReadStream extends net.Socket {
node/url.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare module 'url' {
2
- import { ClientRequestArgs } from 'http';
3
- import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
2
+ import { ClientRequestArgs } from 'node:http';
3
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
4
4
 
5
5
  // Input to `url.format`
6
6
  interface UrlObject {
node/util.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'util' {
2
- import * as types from 'util/types';
2
+ import * as types from 'node:util/types';
3
3
 
4
4
  export interface InspectOptions {
5
5
  /**
@@ -197,12 +197,12 @@ declare module 'util' {
197
197
  }
198
198
  }
199
199
 
200
- declare module 'node:util' {
201
- export * from 'util';
200
+ declare module 'util/types' {
201
+ export * from 'util/types';
202
202
  }
203
203
 
204
204
  declare module 'util/types' {
205
- import { KeyObject, webcrypto } from 'crypto';
205
+ import { KeyObject, webcrypto } from 'node:crypto';
206
206
 
207
207
  function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
208
208
  function isArgumentsObject(object: unknown): object is IArguments;
@@ -259,6 +259,10 @@ declare module 'util/types' {
259
259
  function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
260
260
  }
261
261
 
262
+ declare module 'node:util' {
263
+ export * from 'util';
264
+ }
265
+
262
266
  declare module 'node:util/types' {
263
267
  export * from 'util/types';
264
268
  }
node/v8.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'v8' {
2
- import { Readable } from 'stream';
2
+ import { Readable } from 'node:stream';
3
3
 
4
4
  interface HeapSpaceInfo {
5
5
  space_name: string;
node/worker_threads.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  declare module 'worker_threads' {
2
2
  import { Blob } from 'node:buffer';
3
- import { Context } from 'vm';
4
- import { EventEmitter } from 'events';
5
- import { EventLoopUtilityFunction } from 'perf_hooks';
6
- import { FileHandle } from 'fs/promises';
7
- import { Readable, Writable } from 'stream';
8
- import { URL } from 'url';
9
- import { X509Certificate } from 'crypto';
3
+ import { Context } from 'node:vm';
4
+ import { EventEmitter } from 'node:events';
5
+ import { EventLoopUtilityFunction } from 'node:perf_hooks';
6
+ import { FileHandle } from 'node:fs/promises';
7
+ import { Readable, Writable } from 'node:stream';
8
+ import { URL } from 'node:url';
9
+ import { X509Certificate } from 'node:crypto';
10
10
 
11
11
  const isMainThread: boolean;
12
12
  const parentPort: null | MessagePort;
node/zlib.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare module 'zlib' {
2
- import * as stream from 'stream';
2
+ import * as stream from 'node:stream';
3
3
 
4
4
  interface ZlibOptions {
5
5
  /**