Skip to content

Commit 4e4c198

Browse files
authored
🤖 Merge PR DefinitelyTyped#75038 node: v24.13 by @Renegade334
1 parent 3f337f1 commit 4e4c198

20 files changed

Lines changed: 636 additions & 555 deletions

types/node/v24/domain.d.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,9 @@ declare module "domain" {
2424
*/
2525
class Domain extends EventEmitter {
2626
/**
27-
* An array of timers and event emitters that have been explicitly added
28-
* to the domain.
27+
* An array of event emitters that have been explicitly added to the domain.
2928
*/
30-
members: Array<EventEmitter | NodeJS.Timer>;
29+
members: EventEmitter[];
3130
/**
3231
* The `enter()` method is plumbing used by the `run()`, `bind()`, and `intercept()` methods to set the active domain. It sets `domain.active` and `process.domain` to the domain, and implicitly
3332
* pushes the domain onto the domain
@@ -91,20 +90,17 @@ declare module "domain" {
9190
* will be routed to the domain's `'error'` event, just like with implicit
9291
* binding.
9392
*
94-
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
95-
* the domain `'error'` handler.
96-
*
97-
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
98-
* from that one, and bound to this one instead.
99-
* @param emitter emitter or timer to be added to the domain
93+
* If the `EventEmitter` was already bound to a domain, it is removed from that
94+
* one, and bound to this one instead.
95+
* @param emitter emitter to be added to the domain
10096
*/
101-
add(emitter: EventEmitter | NodeJS.Timer): void;
97+
add(emitter: EventEmitter): void;
10298
/**
10399
* The opposite of {@link add}. Removes domain handling from the
104100
* specified emitter.
105-
* @param emitter emitter or timer to be removed from the domain
101+
* @param emitter emitter to be removed from the domain
106102
*/
107-
remove(emitter: EventEmitter | NodeJS.Timer): void;
103+
remove(emitter: EventEmitter): void;
108104
/**
109105
* The returned function will be a wrapper around the supplied callback
110106
* function. When the returned function is called, any errors that are

types/node/v24/inspector.generated.d.ts

Lines changed: 419 additions & 426 deletions
Large diffs are not rendered by default.

types/node/v24/module.d.ts

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -381,59 +381,18 @@ declare module "module" {
381381
| "module-typescript"
382382
| "wasm";
383383
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
384-
/**
385-
* The `initialize` hook provides a way to define a custom function that runs in
386-
* the hooks thread when the hooks module is initialized. Initialization happens
387-
* when the hooks module is registered via {@link register}.
388-
*
389-
* This hook can receive data from a {@link register} invocation, including
390-
* ports and other transferable objects. The return value of `initialize` can be a
391-
* `Promise`, in which case it will be awaited before the main application thread
392-
* execution resumes.
393-
*/
394384
type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
395385
interface ResolveHookContext {
396-
/**
397-
* Export conditions of the relevant `package.json`
398-
*/
399386
conditions: string[];
400-
/**
401-
* An object whose key-value pairs represent the assertions for the module to import
402-
*/
403387
importAttributes: ImportAttributes;
404-
/**
405-
* The module importing this one, or undefined if this is the Node.js entry point
406-
*/
407388
parentURL: string | undefined;
408389
}
409390
interface ResolveFnOutput {
410-
/**
411-
* A hint to the load hook (it might be ignored); can be an intermediary value.
412-
*/
413391
format?: string | null | undefined;
414-
/**
415-
* The import attributes to use when caching the module (optional; if excluded the input will be used)
416-
*/
417392
importAttributes?: ImportAttributes | undefined;
418-
/**
419-
* A signal that this hook intends to terminate the chain of `resolve` hooks.
420-
* @default false
421-
*/
422393
shortCircuit?: boolean | undefined;
423-
/**
424-
* The absolute URL to which this input resolves
425-
*/
426394
url: string;
427395
}
428-
/**
429-
* The `resolve` hook chain is responsible for telling Node.js where to find and
430-
* how to cache a given `import` statement or expression, or `require` call. It can
431-
* optionally return a format (such as `'module'`) as a hint to the `load` hook. If
432-
* a format is specified, the `load` hook is ultimately responsible for providing
433-
* the final `format` value (and it is free to ignore the hint provided by
434-
* `resolve`); if `resolve` provides a `format`, a custom `load` hook is required
435-
* even if only to pass the value to the Node.js default `load` hook.
436-
*/
437396
type ResolveHook = (
438397
specifier: string,
439398
context: ResolveHookContext,
@@ -451,36 +410,15 @@ declare module "module" {
451410
) => ResolveFnOutput,
452411
) => ResolveFnOutput;
453412
interface LoadHookContext {
454-
/**
455-
* Export conditions of the relevant `package.json`
456-
*/
457413
conditions: string[];
458-
/**
459-
* The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
460-
*/
461414
format: string | null | undefined;
462-
/**
463-
* An object whose key-value pairs represent the assertions for the module to import
464-
*/
465415
importAttributes: ImportAttributes;
466416
}
467417
interface LoadFnOutput {
468418
format: string | null | undefined;
469-
/**
470-
* A signal that this hook intends to terminate the chain of `resolve` hooks.
471-
* @default false
472-
*/
473419
shortCircuit?: boolean | undefined;
474-
/**
475-
* The source for Node.js to evaluate
476-
*/
477420
source?: ModuleSource | undefined;
478421
}
479-
/**
480-
* The `load` hook provides a way to define a custom method of determining how a
481-
* URL should be interpreted, retrieved, and parsed. It is also in charge of
482-
* validating the import attributes.
483-
*/
484422
type LoadHook = (
485423
url: string,
486424
context: LoadHookContext,

types/node/v24/net.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ declare module "net" {
3434
readable?: boolean | undefined;
3535
writable?: boolean | undefined;
3636
signal?: AbortSignal | undefined;
37+
noDelay?: boolean | undefined;
38+
keepAlive?: boolean | undefined;
39+
keepAliveInitialDelay?: number | undefined;
40+
blockList?: BlockList | undefined;
3741
}
3842
interface OnReadOpts {
3943
buffer: Uint8Array | (() => Uint8Array);
@@ -52,9 +56,6 @@ declare module "net" {
5256
hints?: number | undefined;
5357
family?: number | undefined;
5458
lookup?: LookupFunction | undefined;
55-
noDelay?: boolean | undefined;
56-
keepAlive?: boolean | undefined;
57-
keepAliveInitialDelay?: number | undefined;
5859
/**
5960
* @since v18.13.0
6061
*/
@@ -63,7 +64,6 @@ declare module "net" {
6364
* @since v18.13.0
6465
*/
6566
autoSelectFamilyAttemptTimeout?: number | undefined;
66-
blockList?: BlockList | undefined;
6767
}
6868
interface IpcSocketConnectOpts {
6969
path: string;

types/node/v24/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/node",
4-
"version": "24.12.9999",
4+
"version": "24.13.9999",
55
"nonNpm": "conflict",
66
"nonNpmDescription": "Node.js",
77
"projects": [
@@ -18,7 +18,7 @@
1818
}
1919
},
2020
"dependencies": {
21-
"undici-types": "~7.16.0"
21+
"undici-types": "~7.18.0"
2222
},
2323
"devDependencies": {
2424
"@types/node": "workspace:."

types/node/v24/process.d.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,8 @@ declare module "process" {
608608
* arguments passed when the Node.js process was launched. The first element will
609609
* be {@link execPath}. See `process.argv0` if access to the original value
610610
* of `argv[0]` is needed. The second element will be the path to the JavaScript
611-
* file being executed. The remaining elements will be any additional command-line
611+
* file being executed. If a [program entry point](https://nodejs.org/docs/latest-v24.x/api/cli.html#program-entry-point) was provided, the second element
612+
* will be the absolute path to it. The remaining elements are additional command-line
612613
* arguments.
613614
*
614615
* For example, assuming the following script for `process-args.js`:
@@ -1740,6 +1741,24 @@ declare module "process" {
17401741
*/
17411742
readonly release: ProcessRelease;
17421743
readonly features: ProcessFeatures;
1744+
/**
1745+
* The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
1746+
* is set on the current Node.js process. This property allows programmatic control over the
1747+
* tracing of warnings, enabling or disabling stack traces for warnings at runtime.
1748+
*
1749+
* ```js
1750+
* // Enable trace warnings
1751+
* process.traceProcessWarnings = true;
1752+
*
1753+
* // Emit a warning with a stack trace
1754+
* process.emitWarning('Warning with stack trace');
1755+
*
1756+
* // Disable trace warnings
1757+
* process.traceProcessWarnings = false;
1758+
* ```
1759+
* @since v6.10.0
1760+
*/
1761+
traceProcessWarnings: boolean;
17431762
/**
17441763
* `process.umask()` returns the Node.js process's file mode creation mask. Child
17451764
* processes inherit the mask from the parent process.

types/node/v24/readline.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ declare module "readline" {
257257
*/
258258
addListener(event: string, listener: (...args: any[]) => void): this;
259259
addListener(event: "close", listener: () => void): this;
260+
addListener(event: "error", listener: (error: Error) => void): this;
260261
addListener(event: "line", listener: (input: string) => void): this;
261262
addListener(event: "pause", listener: () => void): this;
262263
addListener(event: "resume", listener: () => void): this;
@@ -266,6 +267,7 @@ declare module "readline" {
266267
addListener(event: "history", listener: (history: string[]) => void): this;
267268
emit(event: string | symbol, ...args: any[]): boolean;
268269
emit(event: "close"): boolean;
270+
emit(event: "error", error: Error): boolean;
269271
emit(event: "line", input: string): boolean;
270272
emit(event: "pause"): boolean;
271273
emit(event: "resume"): boolean;
@@ -275,6 +277,7 @@ declare module "readline" {
275277
emit(event: "history", history: string[]): boolean;
276278
on(event: string, listener: (...args: any[]) => void): this;
277279
on(event: "close", listener: () => void): this;
280+
on(event: "error", listener: (error: Error) => void): this;
278281
on(event: "line", listener: (input: string) => void): this;
279282
on(event: "pause", listener: () => void): this;
280283
on(event: "resume", listener: () => void): this;
@@ -284,6 +287,7 @@ declare module "readline" {
284287
on(event: "history", listener: (history: string[]) => void): this;
285288
once(event: string, listener: (...args: any[]) => void): this;
286289
once(event: "close", listener: () => void): this;
290+
once(event: "error", listener: (error: Error) => void): this;
287291
once(event: "line", listener: (input: string) => void): this;
288292
once(event: "pause", listener: () => void): this;
289293
once(event: "resume", listener: () => void): this;
@@ -293,6 +297,7 @@ declare module "readline" {
293297
once(event: "history", listener: (history: string[]) => void): this;
294298
prependListener(event: string, listener: (...args: any[]) => void): this;
295299
prependListener(event: "close", listener: () => void): this;
300+
prependListener(event: "error", listener: (error: Error) => void): this;
296301
prependListener(event: "line", listener: (input: string) => void): this;
297302
prependListener(event: "pause", listener: () => void): this;
298303
prependListener(event: "resume", listener: () => void): this;
@@ -302,6 +307,7 @@ declare module "readline" {
302307
prependListener(event: "history", listener: (history: string[]) => void): this;
303308
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
304309
prependOnceListener(event: "close", listener: () => void): this;
310+
prependOnceListener(event: "error", listener: (error: Error) => void): this;
305311
prependOnceListener(event: "line", listener: (input: string) => void): this;
306312
prependOnceListener(event: "pause", listener: () => void): this;
307313
prependOnceListener(event: "resume", listener: () => void): this;

0 commit comments

Comments
 (0)