Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions types/node/v24/domain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ declare module "domain" {
*/
class Domain extends EventEmitter {
/**
* An array of timers and event emitters that have been explicitly added
* to the domain.
* An array of event emitters that have been explicitly added to the domain.
*/
members: Array<EventEmitter | NodeJS.Timer>;
members: EventEmitter[];
/**
* 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
* pushes the domain onto the domain
Expand Down Expand Up @@ -91,20 +90,17 @@ declare module "domain" {
* will be routed to the domain's `'error'` event, just like with implicit
* binding.
*
* This also works with timers that are returned from `setInterval()` and `setTimeout()`. If their callback function throws, it will be caught by
* the domain `'error'` handler.
*
* If the Timer or `EventEmitter` was already bound to a domain, it is removed
* from that one, and bound to this one instead.
* @param emitter emitter or timer to be added to the domain
* If the `EventEmitter` was already bound to a domain, it is removed from that
* one, and bound to this one instead.
* @param emitter emitter to be added to the domain
*/
add(emitter: EventEmitter | NodeJS.Timer): void;
add(emitter: EventEmitter): void;
/**
* The opposite of {@link add}. Removes domain handling from the
* specified emitter.
* @param emitter emitter or timer to be removed from the domain
* @param emitter emitter to be removed from the domain
*/
remove(emitter: EventEmitter | NodeJS.Timer): void;
remove(emitter: EventEmitter): void;
/**
* The returned function will be a wrapper around the supplied callback
* function. When the returned function is called, any errors that are
Expand Down
845 changes: 419 additions & 426 deletions types/node/v24/inspector.generated.d.ts

Large diffs are not rendered by default.

62 changes: 0 additions & 62 deletions types/node/v24/module.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,59 +381,18 @@ declare module "module" {
| "module-typescript"
| "wasm";
type ModuleSource = string | ArrayBuffer | NodeJS.TypedArray;
/**
* The `initialize` hook provides a way to define a custom function that runs in
* the hooks thread when the hooks module is initialized. Initialization happens
* when the hooks module is registered via {@link register}.
*
* This hook can receive data from a {@link register} invocation, including
* ports and other transferable objects. The return value of `initialize` can be a
* `Promise`, in which case it will be awaited before the main application thread
* execution resumes.
*/
type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
interface ResolveHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
/**
* The module importing this one, or undefined if this is the Node.js entry point
*/
parentURL: string | undefined;
}
interface ResolveFnOutput {
/**
* A hint to the load hook (it might be ignored); can be an intermediary value.
*/
format?: string | null | undefined;
/**
* The import attributes to use when caching the module (optional; if excluded the input will be used)
*/
importAttributes?: ImportAttributes | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The absolute URL to which this input resolves
*/
url: string;
}
/**
* The `resolve` hook chain is responsible for telling Node.js where to find and
* how to cache a given `import` statement or expression, or `require` call. It can
* optionally return a format (such as `'module'`) as a hint to the `load` hook. If
* a format is specified, the `load` hook is ultimately responsible for providing
* the final `format` value (and it is free to ignore the hint provided by
* `resolve`); if `resolve` provides a `format`, a custom `load` hook is required
* even if only to pass the value to the Node.js default `load` hook.
*/
type ResolveHook = (
specifier: string,
context: ResolveHookContext,
Expand All @@ -451,36 +410,15 @@ declare module "module" {
) => ResolveFnOutput,
) => ResolveFnOutput;
interface LoadHookContext {
/**
* Export conditions of the relevant `package.json`
*/
conditions: string[];
/**
* The format optionally supplied by the `resolve` hook chain (can be an intermediary value).
*/
format: string | null | undefined;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAttributes: ImportAttributes;
}
interface LoadFnOutput {
format: string | null | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.
* @default false
*/
shortCircuit?: boolean | undefined;
/**
* The source for Node.js to evaluate
*/
source?: ModuleSource | undefined;
}
/**
* The `load` hook provides a way to define a custom method of determining how a
* URL should be interpreted, retrieved, and parsed. It is also in charge of
* validating the import attributes.
*/
type LoadHook = (
url: string,
context: LoadHookContext,
Expand Down
8 changes: 4 additions & 4 deletions types/node/v24/net.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ declare module "net" {
readable?: boolean | undefined;
writable?: boolean | undefined;
signal?: AbortSignal | undefined;
noDelay?: boolean | undefined;
keepAlive?: boolean | undefined;
keepAliveInitialDelay?: number | undefined;
blockList?: BlockList | undefined;
}
interface OnReadOpts {
buffer: Uint8Array | (() => Uint8Array);
Expand All @@ -52,9 +56,6 @@ declare module "net" {
hints?: number | undefined;
family?: number | undefined;
lookup?: LookupFunction | undefined;
noDelay?: boolean | undefined;
keepAlive?: boolean | undefined;
keepAliveInitialDelay?: number | undefined;
/**
* @since v18.13.0
*/
Expand All @@ -63,7 +64,6 @@ declare module "net" {
* @since v18.13.0
*/
autoSelectFamilyAttemptTimeout?: number | undefined;
blockList?: BlockList | undefined;
}
interface IpcSocketConnectOpts {
path: string;
Expand Down
4 changes: 2 additions & 2 deletions types/node/v24/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/node",
"version": "24.12.9999",
"version": "24.13.9999",
"nonNpm": "conflict",
"nonNpmDescription": "Node.js",
"projects": [
Expand All @@ -18,7 +18,7 @@
}
},
"dependencies": {
"undici-types": "~7.16.0"
"undici-types": "~7.18.0"
},
"devDependencies": {
"@types/node": "workspace:."
Expand Down
21 changes: 20 additions & 1 deletion types/node/v24/process.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ declare module "process" {
* arguments passed when the Node.js process was launched. The first element will
* be {@link execPath}. See `process.argv0` if access to the original value
* of `argv[0]` is needed. The second element will be the path to the JavaScript
* file being executed. The remaining elements will be any additional command-line
* 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
* will be the absolute path to it. The remaining elements are additional command-line
* arguments.
*
* For example, assuming the following script for `process-args.js`:
Expand Down Expand Up @@ -1740,6 +1741,24 @@ declare module "process" {
*/
readonly release: ProcessRelease;
readonly features: ProcessFeatures;
/**
* The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
* is set on the current Node.js process. This property allows programmatic control over the
* tracing of warnings, enabling or disabling stack traces for warnings at runtime.
*
* ```js
* // Enable trace warnings
* process.traceProcessWarnings = true;
*
* // Emit a warning with a stack trace
* process.emitWarning('Warning with stack trace');
*
* // Disable trace warnings
* process.traceProcessWarnings = false;
* ```
* @since v6.10.0
*/
traceProcessWarnings: boolean;
/**
* `process.umask()` returns the Node.js process's file mode creation mask. Child
* processes inherit the mask from the parent process.
Expand Down
6 changes: 6 additions & 0 deletions types/node/v24/readline.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ declare module "readline" {
*/
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "error", listener: (error: Error) => void): this;
addListener(event: "line", listener: (input: string) => void): this;
addListener(event: "pause", listener: () => void): this;
addListener(event: "resume", listener: () => void): this;
Expand All @@ -266,6 +267,7 @@ declare module "readline" {
addListener(event: "history", listener: (history: string[]) => void): this;
emit(event: string | symbol, ...args: any[]): boolean;
emit(event: "close"): boolean;
emit(event: "error", error: Error): boolean;
emit(event: "line", input: string): boolean;
emit(event: "pause"): boolean;
emit(event: "resume"): boolean;
Expand All @@ -275,6 +277,7 @@ declare module "readline" {
emit(event: "history", history: string[]): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "close", listener: () => void): this;
on(event: "error", listener: (error: Error) => void): this;
on(event: "line", listener: (input: string) => void): this;
on(event: "pause", listener: () => void): this;
on(event: "resume", listener: () => void): this;
Expand All @@ -284,6 +287,7 @@ declare module "readline" {
on(event: "history", listener: (history: string[]) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "close", listener: () => void): this;
once(event: "error", listener: (error: Error) => void): this;
once(event: "line", listener: (input: string) => void): this;
once(event: "pause", listener: () => void): this;
once(event: "resume", listener: () => void): this;
Expand All @@ -293,6 +297,7 @@ declare module "readline" {
once(event: "history", listener: (history: string[]) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "error", listener: (error: Error) => void): this;
prependListener(event: "line", listener: (input: string) => void): this;
prependListener(event: "pause", listener: () => void): this;
prependListener(event: "resume", listener: () => void): this;
Expand All @@ -302,6 +307,7 @@ declare module "readline" {
prependListener(event: "history", listener: (history: string[]) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "error", listener: (error: Error) => void): this;
prependOnceListener(event: "line", listener: (input: string) => void): this;
prependOnceListener(event: "pause", listener: () => void): this;
prependOnceListener(event: "resume", listener: () => void): this;
Expand Down
Loading