@types/node 25.3.5 → 25.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 +1 -1
- node/assert.d.ts +2 -2
- node/child_process.d.ts +5 -0
- node/events.d.ts +6 -13
- node/http.d.ts +21 -0
- node/inspector.generated.d.ts +428 -415
- node/module.d.ts +0 -62
- node/net.d.ts +4 -4
- node/package.json +2 -2
- node/process.d.ts +18 -0
- node/readline.d.ts +1 -0
- node/sqlite.d.ts +103 -16
- node/stream.d.ts +15 -5
- node/test.d.ts +42 -19
- node/tls.d.ts +6 -2
- node/url.d.ts +22 -0
- node/util.d.ts +27 -2
- node/v8.d.ts +0 -1
- node/worker_threads.d.ts +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:
|
|
11
|
+
* Last updated: Mon, 09 Mar 2026 18:46:38 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node/assert.d.ts
CHANGED
|
@@ -253,10 +253,10 @@ declare module "node:assert" {
|
|
|
253
253
|
* import assert from 'node:assert/strict';
|
|
254
254
|
*
|
|
255
255
|
* // Using `assert()` works the same:
|
|
256
|
-
* assert(
|
|
256
|
+
* assert(2 + 2 > 5);;
|
|
257
257
|
* // AssertionError: The expression evaluated to a falsy value:
|
|
258
258
|
* //
|
|
259
|
-
* // assert(
|
|
259
|
+
* // assert(2 + 2 > 5)
|
|
260
260
|
* ```
|
|
261
261
|
* @since v0.1.21
|
|
262
262
|
*/
|
node/child_process.d.ts
CHANGED
|
@@ -228,6 +228,11 @@ declare module "node:child_process" {
|
|
|
228
228
|
/**
|
|
229
229
|
* The `subprocess.exitCode` property indicates the exit code of the child process.
|
|
230
230
|
* If the child process is still running, the field will be `null`.
|
|
231
|
+
*
|
|
232
|
+
* When the child process is terminated by a signal, `subprocess.exitCode` will be
|
|
233
|
+
* `null` and `subprocess.signalCode` will be set. To get the corresponding
|
|
234
|
+
* POSIX exit code, use
|
|
235
|
+
* `util.convertProcessSignalToExitCode(subprocess.signalCode)`.
|
|
231
236
|
*/
|
|
232
237
|
readonly exitCode: number | null;
|
|
233
238
|
/**
|
node/events.d.ts
CHANGED
|
@@ -638,24 +638,17 @@ declare module "node:events" {
|
|
|
638
638
|
*/
|
|
639
639
|
function getMaxListeners(emitter: EventEmitter | EventTarget): number;
|
|
640
640
|
/**
|
|
641
|
-
*
|
|
642
|
-
* registered on the given `emitter`.
|
|
641
|
+
* Returns the number of registered listeners for the event named `eventName`.
|
|
643
642
|
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
643
|
+
* For `EventEmitter`s this behaves exactly the same as calling `.listenerCount`
|
|
644
|
+
* on the emitter.
|
|
646
645
|
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
* myEmitter.on('event', () => {});
|
|
650
|
-
* console.log(listenerCount(myEmitter, 'event'));
|
|
651
|
-
* // Prints: 2
|
|
652
|
-
* ```
|
|
646
|
+
* For `EventTarget`s this is the only way to obtain the listener count. This can
|
|
647
|
+
* be useful for debugging and diagnostic purposes.
|
|
653
648
|
* @since v0.9.12
|
|
654
|
-
* @deprecated Use `emitter.listenerCount()` instead.
|
|
655
|
-
* @param emitter The emitter to query
|
|
656
|
-
* @param eventName The event name
|
|
657
649
|
*/
|
|
658
650
|
function listenerCount(emitter: EventEmitter, eventName: string | symbol): number;
|
|
651
|
+
function listenerCount(emitter: EventTarget, eventName: string): number;
|
|
659
652
|
interface OnOptions extends Abortable {
|
|
660
653
|
/**
|
|
661
654
|
* Names of events that will end the iteration.
|
node/http.d.ts
CHANGED
|
@@ -2136,6 +2136,27 @@ declare module "node:http" {
|
|
|
2136
2136
|
* @param [max=1000]
|
|
2137
2137
|
*/
|
|
2138
2138
|
function setMaxIdleHTTPParsers(max: number): void;
|
|
2139
|
+
/**
|
|
2140
|
+
* Dynamically resets the global configurations to enable built-in proxy support for
|
|
2141
|
+
* `fetch()` and `http.request()`/`https.request()` at runtime, as an alternative
|
|
2142
|
+
* to using the `--use-env-proxy` flag or `NODE_USE_ENV_PROXY` environment variable.
|
|
2143
|
+
* It can also be used to override settings configured from the environment variables.
|
|
2144
|
+
*
|
|
2145
|
+
* As this function resets the global configurations, any previously configured
|
|
2146
|
+
* `http.globalAgent`, `https.globalAgent` or undici global dispatcher would be
|
|
2147
|
+
* overridden after this function is invoked. It's recommended to invoke it before any
|
|
2148
|
+
* requests are made and avoid invoking it in the middle of any requests.
|
|
2149
|
+
*
|
|
2150
|
+
* See [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details on proxy URL formats and `NO_PROXY`
|
|
2151
|
+
* syntax.
|
|
2152
|
+
* @since v25.4.0
|
|
2153
|
+
* @param proxyEnv An object containing proxy configuration. This accepts the
|
|
2154
|
+
* same options as the `proxyEnv` option accepted by {@link Agent}. **Default:**
|
|
2155
|
+
* `process.env`.
|
|
2156
|
+
* @returns A function that restores the original agent and dispatcher
|
|
2157
|
+
* settings to the state before this `http.setGlobalProxyFromEnv()` is invoked.
|
|
2158
|
+
*/
|
|
2159
|
+
function setGlobalProxyFromEnv(proxyEnv?: ProxyEnv): () => void;
|
|
2139
2160
|
/**
|
|
2140
2161
|
* Global instance of `Agent` which is used as the default for all HTTP client
|
|
2141
2162
|
* requests. Diverges from a default `Agent` configuration by having `keepAlive`
|