You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
2315
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node - npm Package Compare versions

Comparing version
22.15.30
to
24.0.0
+12
node/ts5.1/compatibility/disposable.d.ts
interface SymbolConstructor {
readonly dispose: unique symbol;
readonly asyncDispose: unique symbol;
}
interface Disposable {
[Symbol.dispose](): void;
}
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
/**
* License for programmatically and manually incorporated
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
*
* Copyright Node.js contributors. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
// NOTE: These definitions support Node.js and TypeScript 5.1.
// Reference required TypeScript libraries:
/// <reference lib="es2020" />
// TypeScript library polyfills required for TypeScript <=5.1:
/// <reference path="./compatibility/disposable.d.ts" />
// TypeScript library polyfills required for TypeScript <=5.6:
/// <reference path="../ts5.6/compatibility/float16array.d.ts" />
// Iterator definitions required for compatibility with TypeScript <5.6:
/// <reference path="../compatibility/iterators.d.ts" />
// Definitions for Node.js modules specific to TypeScript <=5.6:
/// <reference path="../ts5.6/globals.typedarray.d.ts" />
/// <reference path="../ts5.6/buffer.buffer.d.ts" />
// Definitions for Node.js modules that are not specific to any version of TypeScript:
/// <reference path="../globals.d.ts" />
/// <reference path="../assert.d.ts" />
/// <reference path="../assert/strict.d.ts" />
/// <reference path="../async_hooks.d.ts" />
/// <reference path="../buffer.d.ts" />
/// <reference path="../child_process.d.ts" />
/// <reference path="../cluster.d.ts" />
/// <reference path="../console.d.ts" />
/// <reference path="../constants.d.ts" />
/// <reference path="../crypto.d.ts" />
/// <reference path="../dgram.d.ts" />
/// <reference path="../diagnostics_channel.d.ts" />
/// <reference path="../dns.d.ts" />
/// <reference path="../dns/promises.d.ts" />
/// <reference path="../dns/promises.d.ts" />
/// <reference path="../domain.d.ts" />
/// <reference path="../dom-events.d.ts" />
/// <reference path="../events.d.ts" />
/// <reference path="../fs.d.ts" />
/// <reference path="../fs/promises.d.ts" />
/// <reference path="../http.d.ts" />
/// <reference path="../http2.d.ts" />
/// <reference path="../https.d.ts" />
/// <reference path="../inspector.d.ts" />
/// <reference path="../module.d.ts" />
/// <reference path="../net.d.ts" />
/// <reference path="../os.d.ts" />
/// <reference path="../path.d.ts" />
/// <reference path="../perf_hooks.d.ts" />
/// <reference path="../process.d.ts" />
/// <reference path="../punycode.d.ts" />
/// <reference path="../querystring.d.ts" />
/// <reference path="../readline.d.ts" />
/// <reference path="../readline/promises.d.ts" />
/// <reference path="../repl.d.ts" />
/// <reference path="../sea.d.ts" />
/// <reference path="../sqlite.d.ts" />
/// <reference path="../stream.d.ts" />
/// <reference path="../stream/promises.d.ts" />
/// <reference path="../stream/consumers.d.ts" />
/// <reference path="../stream/web.d.ts" />
/// <reference path="../string_decoder.d.ts" />
/// <reference path="../test.d.ts" />
/// <reference path="../timers.d.ts" />
/// <reference path="../timers/promises.d.ts" />
/// <reference path="../tls.d.ts" />
/// <reference path="../trace_events.d.ts" />
/// <reference path="../tty.d.ts" />
/// <reference path="../url.d.ts" />
/// <reference path="../util.d.ts" />
/// <reference path="../v8.d.ts" />
/// <reference path="../vm.d.ts" />
/// <reference path="../wasi.d.ts" />
/// <reference path="../worker_threads.d.ts" />
/// <reference path="../zlib.d.ts" />
// Interface declaration for Float16Array, required in @types/node v24+.
// These definitions are specific to TS <=5.6.
// This needs all of the "common" properties/methods of the TypedArrays,
// otherwise the type unions `TypedArray` and `ArrayBufferView` will be
// empty objects.
interface Float16Array extends Pick<Float32Array, typeof Symbol.iterator | "entries" | "keys" | "values"> {
readonly BYTES_PER_ELEMENT: number;
readonly buffer: ArrayBufferLike;
readonly byteLength: number;
readonly byteOffset: number;
readonly length: number;
readonly [Symbol.toStringTag]: "Float16Array";
at(index: number): number | undefined;
copyWithin(target: number, start: number, end?: number): this;
every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean;
fill(value: number, start?: number, end?: number): this;
filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array;
find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined;
findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number;
findLast<S extends number>(
predicate: (value: number, index: number, array: Float16Array) => value is S,
thisArg?: any,
): S | undefined;
findLast(
predicate: (value: number, index: number, array: Float16Array) => unknown,
thisArg?: any,
): number | undefined;
findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number;
forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void;
includes(searchElement: number, fromIndex?: number): boolean;
indexOf(searchElement: number, fromIndex?: number): number;
join(separator?: string): string;
lastIndexOf(searchElement: number, fromIndex?: number): number;
map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array;
reduce(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
): number;
reduce(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
initialValue: number,
): number;
reduce<U>(
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U,
initialValue: U,
): U;
reduceRight(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
): number;
reduceRight(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
initialValue: number,
): number;
reduceRight<U>(
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U,
initialValue: U,
): U;
reverse(): Float16Array;
set(array: ArrayLike<number>, offset?: number): void;
slice(start?: number, end?: number): Float16Array;
some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean;
sort(compareFn?: (a: number, b: number) => number): this;
subarray(begin?: number, end?: number): Float16Array;
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
toReversed(): Float16Array;
toSorted(compareFn?: (a: number, b: number) => number): Float16Array;
toString(): string;
valueOf(): Float16Array;
with(index: number, value: number): Float16Array;
[index: number]: number;
}
// Interface declaration for Float16Array, required in @types/node v24+.
// These definitions are specific to TS 5.7.
// This needs all of the "common" properties/methods of the TypedArrays,
// otherwise the type unions `TypedArray` and `ArrayBufferView` will be
// empty objects.
interface Float16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
readonly BYTES_PER_ELEMENT: number;
readonly buffer: TArrayBuffer;
readonly byteLength: number;
readonly byteOffset: number;
readonly length: number;
readonly [Symbol.toStringTag]: "Float16Array";
at(index: number): number | undefined;
copyWithin(target: number, start: number, end?: number): this;
entries(): ArrayIterator<[number, number]>;
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
fill(value: number, start?: number, end?: number): this;
filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array<ArrayBuffer>;
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
findLast<S extends number>(
predicate: (value: number, index: number, array: this) => value is S,
thisArg?: any,
): S | undefined;
findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined;
findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number;
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
includes(searchElement: number, fromIndex?: number): boolean;
indexOf(searchElement: number, fromIndex?: number): number;
join(separator?: string): string;
keys(): ArrayIterator<number>;
lastIndexOf(searchElement: number, fromIndex?: number): number;
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array<ArrayBuffer>;
reduce(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
): number;
reduce(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
initialValue: number,
): number;
reduce<U>(
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U,
initialValue: U,
): U;
reduceRight(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
): number;
reduceRight(
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
initialValue: number,
): number;
reduceRight<U>(
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U,
initialValue: U,
): U;
reverse(): this;
set(array: ArrayLike<number>, offset?: number): void;
slice(start?: number, end?: number): Float16Array<ArrayBuffer>;
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
sort(compareFn?: (a: number, b: number) => number): this;
subarray(begin?: number, end?: number): Float16Array<TArrayBuffer>;
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
toReversed(): Float16Array<ArrayBuffer>;
toSorted(compareFn?: (a: number, b: number) => number): Float16Array<ArrayBuffer>;
toString(): string;
valueOf(): this;
values(): ArrayIterator<number>;
with(index: number, value: number): Float16Array<ArrayBuffer>;
[Symbol.iterator](): ArrayIterator<number>;
[index: number]: number;
}
/**
* License for programmatically and manually incorporated
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
*
* Copyright Node.js contributors. All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
// NOTE: These definitions support Node.js and TypeScript 5.7.
// Reference required TypeScript libraries:
/// <reference lib="es2020" />
/// <reference lib="esnext.disposable" />
// TypeScript library polyfills required for TypeScript 5.7:
/// <reference path="./compatibility/float16array.d.ts" />
// Iterator definitions required for compatibility with TypeScript <5.6:
/// <reference path="../compatibility/iterators.d.ts" />
// Definitions for Node.js modules specific to TypeScript 5.7+:
/// <reference path="../globals.typedarray.d.ts" />
/// <reference path="../buffer.buffer.d.ts" />
// Definitions for Node.js modules that are not specific to any version of TypeScript:
/// <reference path="../globals.d.ts" />
/// <reference path="../assert.d.ts" />
/// <reference path="../assert/strict.d.ts" />
/// <reference path="../async_hooks.d.ts" />
/// <reference path="../buffer.d.ts" />
/// <reference path="../child_process.d.ts" />
/// <reference path="../cluster.d.ts" />
/// <reference path="../console.d.ts" />
/// <reference path="../constants.d.ts" />
/// <reference path="../crypto.d.ts" />
/// <reference path="../dgram.d.ts" />
/// <reference path="../diagnostics_channel.d.ts" />
/// <reference path="../dns.d.ts" />
/// <reference path="../dns/promises.d.ts" />
/// <reference path="../dns/promises.d.ts" />
/// <reference path="../domain.d.ts" />
/// <reference path="../dom-events.d.ts" />
/// <reference path="../events.d.ts" />
/// <reference path="../fs.d.ts" />
/// <reference path="../fs/promises.d.ts" />
/// <reference path="../http.d.ts" />
/// <reference path="../http2.d.ts" />
/// <reference path="../https.d.ts" />
/// <reference path="../inspector.d.ts" />
/// <reference path="../module.d.ts" />
/// <reference path="../net.d.ts" />
/// <reference path="../os.d.ts" />
/// <reference path="../path.d.ts" />
/// <reference path="../perf_hooks.d.ts" />
/// <reference path="../process.d.ts" />
/// <reference path="../punycode.d.ts" />
/// <reference path="../querystring.d.ts" />
/// <reference path="../readline.d.ts" />
/// <reference path="../readline/promises.d.ts" />
/// <reference path="../repl.d.ts" />
/// <reference path="../sea.d.ts" />
/// <reference path="../sqlite.d.ts" />
/// <reference path="../stream.d.ts" />
/// <reference path="../stream/promises.d.ts" />
/// <reference path="../stream/consumers.d.ts" />
/// <reference path="../stream/web.d.ts" />
/// <reference path="../string_decoder.d.ts" />
/// <reference path="../test.d.ts" />
/// <reference path="../timers.d.ts" />
/// <reference path="../timers/promises.d.ts" />
/// <reference path="../tls.d.ts" />
/// <reference path="../trace_events.d.ts" />
/// <reference path="../tty.d.ts" />
/// <reference path="../url.d.ts" />
/// <reference path="../util.d.ts" />
/// <reference path="../v8.d.ts" />
/// <reference path="../vm.d.ts" />
/// <reference path="../wasi.d.ts" />
/// <reference path="../worker_threads.d.ts" />
/// <reference path="../zlib.d.ts" />
+5
-5
/**
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/assert.js)
*/

@@ -799,3 +799,3 @@ declare module "assert" {

* If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value)
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value)
* error. In both cases the error handler is skipped.

@@ -870,3 +870,3 @@ *

* the function does not return a promise, `assert.doesNotReject()` will return a
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v22.x/api/errors.html#err_invalid_return_value) error. In both cases
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_invalid_return_value) error. In both cases
* the error handler is skipped.

@@ -934,3 +934,3 @@ *

* undefined, a default error message is assigned. If the `message` parameter is an
* instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
* instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
* @since v13.6.0, v12.16.0

@@ -958,3 +958,3 @@ */

* undefined, a default error message is assigned. If the `message` parameter is an
* instance of an [Error](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
* instance of an [Error](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
* @since v13.6.0, v12.16.0

@@ -961,0 +961,0 @@ */

@@ -5,4 +5,4 @@ /**

*
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v22.x/api/async_context.html#class-asynclocalstorage) tracks async context
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v24.x/api/async_context.html#class-asynclocalstorage) tracks async context
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
*

@@ -16,3 +16,3 @@ * The `node:async_hooks` module provides an API to track asynchronous resources.

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/async_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/async_hooks.js)
*/

@@ -49,3 +49,3 @@ declare module "async_hooks" {

* Promise contexts may not get precise `executionAsyncIds` by default.
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking).
* @since v8.1.0

@@ -123,3 +123,3 @@ * @return The `asyncId` of the current execution context. Useful to track when something calls.

* Promise contexts may not get valid `triggerAsyncId`s by default. See
* the section on [promise execution tracking](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html#promise-execution-tracking).
* the section on [promise execution tracking](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promise-execution-tracking).
* @return The ID of the resource responsible for calling the callback that is currently being executed.

@@ -327,2 +327,12 @@ */

}
interface AsyncLocalStorageOptions {
/**
* The default value to be used when no store is provided.
*/
defaultValue?: any;
/**
* A name for the `AsyncLocalStorage` value.
*/
name?: string | undefined;
}
/**

@@ -366,4 +376,4 @@ * This class creates stores that stay coherent through asynchronous operations.

* // 0: start
* // 0: finish
* // 1: start
* // 0: finish
* // 1: finish

@@ -379,2 +389,7 @@ * ```

/**
* Creates a new instance of `AsyncLocalStorage`. Store is only provided within a
* `run()` call or after an `enterWith()` call.
*/
constructor(options?: AsyncLocalStorageOptions);
/**
* Binds the given function to the current execution context.

@@ -441,2 +456,7 @@ * @since v19.8.0

/**
* The name of the `AsyncLocalStorage` instance if provided.
* @since v24.0.0
*/
readonly name: string;
/**
* Runs a function synchronously within a context and returns its

@@ -443,0 +463,0 @@ * return value. The store is not accessible outside of the callback function.

/**
* Clusters of Node.js processes can be used to run multiple instances of Node.js
* that can distribute workloads among their application threads. When process isolation
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html)
* is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html)
* module instead, which allows running multiple application threads within a single Node.js instance.

@@ -53,3 +53,3 @@ *

* On Windows, it is not yet possible to set up a named pipe server in a worker.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/cluster.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/cluster.js)
*/

@@ -84,4 +84,4 @@ declare module "cluster" {

* Configures the stdio of forked processes. Because the cluster module relies on IPC to function, this configuration must
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processspawncommand-args-options)'s
* [`stdio`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#optionsstdio).
* contain an `'ipc'` entry. When this option is provided, it overrides `silent`. See [`child_prcess.spawn()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processspawncommand-args-options)'s
* [`stdio`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#optionsstdio).
*/

@@ -104,3 +104,3 @@ stdio?: any[] | undefined;

* Specify the kind of serialization used for sending messages between processes. Possible values are `'json'` and `'advanced'`.
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#advanced-serialization) for more details.
* See [Advanced serialization for `child_process`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#advanced-serialization) for more details.
* @default false

@@ -148,6 +148,6 @@ */

/**
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
* All workers are created using [`child_process.fork()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options), the returned object
* from this function is stored as `.process`. In a worker, the global `process` is stored.
*
* See: [Child Process module](https://nodejs.org/docs/latest-v22.x/api/child_process.html#child_processforkmodulepath-args-options).
* See: [Child Process module](https://nodejs.org/docs/latest-v24.x/api/child_process.html#child_processforkmodulepath-args-options).
*

@@ -163,3 +163,3 @@ * Workers will call `process.exit(0)` if the `'disconnect'` event occurs

*
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v22.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
* In the primary, this sends a message to a specific worker. It is identical to [`ChildProcess.send()`](https://nodejs.org/docs/latest-v24.x/api/child_process.html#subprocesssendmessage-sendhandle-options-callback).
*

@@ -206,3 +206,3 @@ * In a worker, this sends a message to the primary. It is identical to `process.send()`.

* In a worker, `process.kill()` exists, but it is not this function;
* it is [`kill()`](https://nodejs.org/docs/latest-v22.x/api/process.html#processkillpid-signal).
* it is [`kill()`](https://nodejs.org/docs/latest-v24.x/api/process.html#processkillpid-signal).
* @since v0.9.12

@@ -421,3 +421,3 @@ * @param [signal='SIGTERM'] Name of the kill signal to send to the worker process.

* The scheduling policy, either `cluster.SCHED_RR` for round-robin or `cluster.SCHED_NONE` to leave it to the operating system. This is a
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings)
* global setting and effectively frozen once either the first worker is spawned, or [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
* is called, whichever comes first.

@@ -433,4 +433,4 @@ *

/**
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings)
* (or [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv)) this settings object will contain
* After calling [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings)
* (or [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)) this settings object will contain
* the settings, including the default values.

@@ -442,3 +442,3 @@ *

readonly settings: ClusterSettings;
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clustersetupprimarysettings) instead. */
/** @deprecated since v16.0.0 - use [`.setupPrimary()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clustersetupprimarysettings) instead. */
setupMaster(settings?: ClusterSettings): void;

@@ -448,7 +448,7 @@ /**

*
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv)
* Any settings changes only affect future calls to [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv)
* and have no effect on workers that are already running.
*
* The only attribute of a worker that cannot be set via `.setupPrimary()` is the `env` passed to
* [`.fork()`](https://nodejs.org/docs/latest-v22.x/api/cluster.html#clusterforkenv).
* [`.fork()`](https://nodejs.org/docs/latest-v24.x/api/cluster.html#clusterforkenv).
*

@@ -455,0 +455,0 @@ * The defaults above apply to the first call only; the defaults for later calls are the current values at the time of

@@ -8,8 +8,8 @@ /**

* * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
* more information.

@@ -58,3 +58,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
*/

@@ -75,3 +75,3 @@ declare module "console" {

* starts with `"Assertion failed"`. If provided, `message` is formatted using
* [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args).
* [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args).
*

@@ -158,3 +158,3 @@ * If `value` is [truthy](https://developer.mozilla.org/en-US/docs/Glossary/Truthy), nothing happens.

/**
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
* Uses [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) on `obj` and prints the resulting string to `stdout`.
* This function bypasses any custom `inspect()` function defined on `obj`.

@@ -174,3 +174,3 @@ * @since v0.1.101

* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)).
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
*

@@ -186,4 +186,4 @@ * ```js

* If formatting elements (e.g. `%d`) are not found in the first string then
* [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options) is called on each argument and the
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)
* [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options) is called on each argument and the
* resulting string values are concatenated. See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
* for more information.

@@ -220,3 +220,3 @@ * @since v0.1.100

* values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html)
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)).
* (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)).
*

@@ -231,3 +231,3 @@ * ```js

*
* See [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args) for more information.
* See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information.
* @since v0.1.100

@@ -308,3 +308,3 @@ */

/**
* Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilformatformat-args)
* Prints to `stderr` the string `'Trace: '`, followed by the [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)
* formatted message and stack trace to the current position in the code.

@@ -373,8 +373,8 @@ *

* * A `Console` class with methods such as `console.log()`, `console.error()` and `console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
* * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdout) and
* [`process.stderr`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module.
*
* _**Warning**_: The global console object's methods are neither consistently
* synchronous like the browser APIs they resemble, nor are they consistently
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v22.x/api/process.html#a-note-on-process-io) for
* asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v24.x/api/process.html#a-note-on-process-io) for
* more information.

@@ -423,3 +423,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/console.js)
*/

@@ -445,3 +445,3 @@ namespace console {

* Specifies options that are passed along to
* [`util.inspect()`](https://nodejs.org/docs/latest-v22.x/api/util.html#utilinspectobject-options).
* [`util.inspect()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilinspectobject-options).
*/

@@ -448,0 +448,0 @@ inspectOptions?: InspectOptions | undefined;

@@ -26,3 +26,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dgram.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dgram.js)
*/

@@ -29,0 +29,0 @@ declare module "dgram" {

@@ -23,3 +23,3 @@ /**

* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/diagnostics_channel.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/diagnostics_channel.js)
*/

@@ -26,0 +26,0 @@ declare module "diagnostics_channel" {

@@ -44,4 +44,4 @@ /**

*
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations) for more information.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/dns.js)
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations) for more information.
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/dns.js)
*/

@@ -75,3 +75,3 @@ declare module "dns" {

/**
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v22.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
* One or more [supported `getaddrinfo`](https://nodejs.org/docs/latest-v24.x/api/dns.html#supported-getaddrinfo-flags) flags. Multiple flags may be
* passed by bitwise `OR`ing their values.

@@ -89,3 +89,3 @@ */

* addresses before IPv4 addresses. Default value is configurable using
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder).
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder).
* @default `verbatim` (addresses are not reordered)

@@ -139,3 +139,3 @@ * @since v22.1.0

* important consequences on the behavior of any Node.js program. Please take some
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v22.x/api/dns.html#implementation-considerations)
* time to consult the [Implementation considerations section](https://nodejs.org/docs/latest-v24.x/api/dns.html#implementation-considerations)
* before using `dns.lookup()`.

@@ -162,3 +162,3 @@ *

*
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
* version, and `all` is not set to `true`, it returns a `Promise` for an `Object` with `address` and `family` properties.

@@ -203,3 +203,3 @@ * @since v0.1.90

*
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
* On an error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
* where `err.code` is the error code.

@@ -215,3 +215,3 @@ *

*
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v22.x/api/util.html#utilpromisifyoriginal) ed
* If this method is invoked as its [util.promisify()](https://nodejs.org/docs/latest-v24.x/api/util.html#utilpromisifyoriginal) ed
* version, it returns a `Promise` for an `Object` with `hostname` and `service` properties.

@@ -333,3 +333,3 @@ * @since v0.11.14

*
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object,
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object,
* where `err.code` is one of the `DNS error codes`.

@@ -675,4 +675,4 @@ * @since v0.1.27

*
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-error) object, where `err.code` is
* one of the [DNS error codes](https://nodejs.org/docs/latest-v22.x/api/dns.html#error-codes).
* On error, `err` is an [`Error`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-error) object, where `err.code` is
* one of the [DNS error codes](https://nodejs.org/docs/latest-v24.x/api/dns.html#error-codes).
* @since v0.1.16

@@ -685,3 +685,3 @@ */

/**
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:

@@ -741,3 +741,3 @@ *

/**
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnspromiseslookuphostname-options).
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:

@@ -750,4 +750,4 @@ *

* The default is `verbatim` and {@link setDefaultResultOrder} have higher
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--dns-result-orderorder). When using
* [worker threads](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--dns-result-orderorder). When using
* [worker threads](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
* thread won't affect the default dns orders in workers.

@@ -798,3 +798,3 @@ * @since v16.4.0, v14.18.0

* Creating a new resolver uses the default server settings. Setting
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v22.x/api/dns.html#dnssetserversservers) does not affect
* the servers used for a resolver using [`resolver.setServers()`](https://nodejs.org/docs/latest-v24.x/api/dns.html#dnssetserversservers) does not affect
* other resolvers:

@@ -801,0 +801,0 @@ *

@@ -15,3 +15,3 @@ /**

* @deprecated Since v1.4.2 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/domain.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/domain.js)
*/

@@ -18,0 +18,0 @@ declare module "domain" {

@@ -35,3 +35,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/events.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/events.js)
*/

@@ -435,3 +435,2 @@ declare module "events" {

* @since v20.5.0
* @experimental
* @return Disposable that removes the `abort` listener.

@@ -438,0 +437,0 @@ */

@@ -262,3 +262,2 @@ /**

* @since v17.0.0
* @experimental
*/

@@ -1255,16 +1254,24 @@ readableWebStream(): ReadableStream;

/**
* Retrieves the files matching the specified pattern.
* ```js
* import { glob } from 'node:fs/promises';
*
* for await (const entry of glob('*.js'))
* console.log(entry);
* ```
* @since v22.0.0
* @returns An AsyncIterator that yields the paths of files
* that match the pattern.
*/
function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
function glob(
pattern: string | string[],
opt: GlobOptionsWithFileTypes,
pattern: string | readonly string[],
options: GlobOptionsWithFileTypes,
): NodeJS.AsyncIterator<Dirent>;
function glob(
pattern: string | string[],
opt: GlobOptionsWithoutFileTypes,
pattern: string | readonly string[],
options: GlobOptionsWithoutFileTypes,
): NodeJS.AsyncIterator<string>;
function glob(
pattern: string | string[],
opt: GlobOptions,
pattern: string | readonly string[],
options: GlobOptions,
): NodeJS.AsyncIterator<Dirent | string>;

@@ -1271,0 +1278,0 @@ }

@@ -17,2 +17,3 @@ export {}; // Make this a module

type _EventSource = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").EventSource;
type _CloseEvent = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").CloseEvent;
// #endregion Fetch and friends

@@ -254,5 +255,3 @@

/** An iterable iterator returned by the Node.js API. */
// Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used IterableIterator.
// TODO: In next major @types/node version, change default TReturn to undefined.
interface Iterator<T, TReturn = any, TNext = any> extends IteratorObject<T, TReturn, TNext> {
interface Iterator<T, TReturn = undefined, TNext = any> extends IteratorObject<T, TReturn, TNext> {
[Symbol.iterator](): NodeJS.Iterator<T, TReturn, TNext>;

@@ -262,5 +261,3 @@ }

/** An async iterable iterator returned by the Node.js API. */
// Default TReturn/TNext in v22 is `any`, for compatibility with the previously-used AsyncIterableIterator.
// TODO: In next major @types/node version, change default TReturn to undefined.
interface AsyncIterator<T, TReturn = any, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
interface AsyncIterator<T, TReturn = undefined, TNext = any> extends AsyncIteratorObject<T, TReturn, TNext> {
[Symbol.asyncIterator](): NodeJS.AsyncIterator<T, TReturn, TNext>;

@@ -368,3 +365,7 @@ }

: typeof import("undici-types").EventSource;
interface CloseEvent extends _CloseEvent {}
var CloseEvent: typeof globalThis extends { onmessage: any; CloseEvent: infer T } ? T
: typeof import("undici-types").CloseEvent;
// #endregion fetch
}

@@ -15,2 +15,3 @@ export {}; // Make this a module

| BigInt64Array<TArrayBuffer>
| Float16Array<TArrayBuffer>
| Float32Array<TArrayBuffer>

@@ -17,0 +18,0 @@ | Float64Array<TArrayBuffer>;

/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/https.js)
*/

@@ -6,0 +6,0 @@ declare module "https" {

@@ -25,11 +25,13 @@ /**

// NOTE: These definitions support Node.js and TypeScript 5.7+.
// NOTE: These definitions support Node.js and TypeScript 5.8+.
// Reference required TypeScript libs:
// Reference required TypeScript libraries:
/// <reference lib="es2020" />
/// <reference lib="esnext.disposable" />
/// <reference lib="esnext.float16" />
// TypeScript backwards-compatibility definitions:
/// <reference path="compatibility/index.d.ts" />
// Iterator definitions required for compatibility with TypeScript <5.6:
/// <reference path="compatibility/iterators.d.ts" />
// Definitions specific to TypeScript 5.7+:
// Definitions for Node.js modules specific to TypeScript 5.7+:
/// <reference path="globals.typedarray.d.ts" />

@@ -36,0 +38,0 @@ /// <reference path="buffer.buffer.d.ts" />

@@ -33,3 +33,3 @@ /**

* {@link enableCompileCache} to indicate the result of the attempt to enable the
* [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache).
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
* @since v22.8.0

@@ -85,3 +85,3 @@ */

/**
* Enable [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* Enable [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
* in the current Node.js instance.

@@ -104,3 +104,3 @@ *

* values to indicate the result of the attempt to enable the
* [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache).
* [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache).
*

@@ -118,3 +118,3 @@ * This method only affects the current Node.js instance. To enable it in child worker threads,

/**
* Flush the [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* Flush the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
* accumulated from modules already loaded

@@ -130,3 +130,3 @@ * in the current Node.js instance to disk. This returns after all the flushing

* @since v22.8.0
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v22.x/api/module.html#module-compile-cache)
* @return Path to the [module compile cache](https://nodejs.org/docs/latest-v24.x/api/module.html#module-compile-cache)
* directory if it is enabled, or `undefined` otherwise.

@@ -202,3 +202,3 @@ */

/**
* [Transferable objects](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#portpostmessagevalue-transferlist)
* [Transferable objects](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#portpostmessagevalue-transferlist)
* to be passed into the `initialize` hook.

@@ -212,6 +212,6 @@ */

* resolution and loading behavior. See
* [Customization hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks).
* [Customization hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks).
*
* This feature requires `--allow-worker` if used with the
* [Permission Model](https://nodejs.org/docs/latest-v22.x/api/permissions.html#permission-model).
* [Permission Model](https://nodejs.org/docs/latest-v24.x/api/permissions.html#permission-model).
* @since v20.6.0, v18.19.0

@@ -232,3 +232,3 @@ * @param specifier Customization hooks to be registered; this should be

/**
* See [load hook](https://nodejs.org/docs/latest-v22.x/api/module.html#loadurl-context-nextload).
* See [load hook](https://nodejs.org/docs/latest-v24.x/api/module.html#loadurl-context-nextload).
* @default undefined

@@ -238,3 +238,3 @@ */

/**
* See [resolve hook](https://nodejs.org/docs/latest-v22.x/api/module.html#resolvespecifier-context-nextresolve).
* See [resolve hook](https://nodejs.org/docs/latest-v24.x/api/module.html#resolvespecifier-context-nextresolve).
* @default undefined

@@ -251,3 +251,3 @@ */

/**
* Register [hooks](https://nodejs.org/docs/latest-v22.x/api/module.html#customization-hooks)
* Register [hooks](https://nodejs.org/docs/latest-v24.x/api/module.html#customization-hooks)
* that customize Node.js module resolution and loading behavior.

@@ -283,5 +283,5 @@ * @since v22.15.0

* that require transformation such as `Enums`,
* see [type-stripping](https://nodejs.org/docs/latest-v22.x/api/typescript.md#type-stripping) for more information.
* see [type-stripping](https://nodejs.org/docs/latest-v24.x/api/typescript.md#type-stripping) for more information.
* When mode is `'transform'`, it also transforms TypeScript features to JavaScript,
* see [transform TypeScript features](https://nodejs.org/docs/latest-v22.x/api/typescript.md#typescript-features) for more information.
* see [transform TypeScript features](https://nodejs.org/docs/latest-v24.x/api/typescript.md#typescript-features) for more information.
* When mode is `'strip'`, source maps are not generated, because locations are preserved.

@@ -374,2 +374,3 @@ * If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown.

type ModuleFormat =
| "addon"
| "builtin"

@@ -591,10 +592,19 @@ | "commonjs"

/**
* The directory name of the current module. This is the same as the `path.dirname()` of the `import.meta.filename`.
* **Caveat:** only present on `file:` modules.
* The directory name of the current module.
*
* This is the same as the ``path.dirname()` of the `import.meta.filename`.
*
* > **Caveat**: only present on `file:` modules.
* @since v21.2.0, v20.11.0
*/
dirname: string;
/**
* The full absolute path and filename of the current module, with symlinks resolved.
* The full absolute path and filename of the current module, with
* symlinks resolved.
*
* This is the same as the `url.fileURLToPath()` of the `import.meta.url`.
* **Caveat:** only local modules support this property. Modules not using the `file:` protocol will not provide it.
*
* > **Caveat** only local modules support this property. Modules not using the
* > `file:` protocol will not provide it.
* @since v21.2.0, v20.11.0
*/

@@ -604,18 +614,42 @@ filename: string;

* The absolute `file:` URL of the module.
*
* This is defined exactly the same as it is in browsers providing the URL of the
* current module file.
*
* This enables useful patterns such as relative file loading:
*
* ```js
* import { readFileSync } from 'node:fs';
* const buffer = readFileSync(new URL('./data.proto', import.meta.url));
* ```
*/
url: string;
/**
* Provides a module-relative resolution function scoped to each module, returning
* the URL string.
* `import.meta.resolve` is a module-relative resolution function scoped to
* each module, returning the URL string.
*
* Second `parent` parameter is only used when the `--experimental-import-meta-resolve`
* command flag enabled.
* ```js
* const dependencyAsset = import.meta.resolve('component-lib/asset.css');
* // file:///app/node_modules/component-lib/asset.css
* import.meta.resolve('./dep.js');
* // file:///app/dep.js
* ```
*
* @since v20.6.0
* All features of the Node.js module resolution are supported. Dependency
* resolutions are subject to the permitted exports resolutions within the package.
*
* @param specifier The module specifier to resolve relative to `parent`.
* @param parent The absolute parent module URL to resolve from.
* @returns The absolute (`file:`) URL string for the resolved module.
* **Caveats**:
*
* * This can result in synchronous file-system operations, which
* can impact performance similarly to `require.resolve`.
* * This feature is not available within custom loaders (it would
* create a deadlock).
* @since v13.9.0, v12.16.0
* @param specifier The module specifier to resolve relative to the
* current module.
* @param parent An optional absolute parent module URL to resolve from.
* **Default:** `import.meta.url`
* @returns The absolute URL string that the specifier would resolve to.
*/
resolve(specifier: string, parent?: string | URL | undefined): string;
resolve(specifier: string, parent?: string | URL): string;
}

@@ -695,3 +729,3 @@ namespace NodeJS {

* This does not apply to
* [native addons](https://nodejs.org/docs/latest-v22.x/api/addons.html),
* [native addons](https://nodejs.org/docs/latest-v24.x/api/addons.html),
* for which reloading will result in an error.

@@ -730,3 +764,3 @@ * @since v0.3.0

* of
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v22.x/api/modules.html#loading-from-the-global-folders)
* [GLOBAL\_FOLDERS](https://nodejs.org/docs/latest-v24.x/api/modules.html#loading-from-the-global-folders)
* like `$HOME/.node_modules`, which are

@@ -733,0 +767,0 @@ * always included. Each of these paths is used as a starting point for

@@ -13,3 +13,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/net.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/net.js)
*/

@@ -47,5 +47,2 @@ declare module "net" {

}
// TODO: remove empty ConnectOpts placeholder at next major @types/node version.
/** @deprecated */
interface ConnectOpts {}
interface TcpSocketConnectOpts {

@@ -543,3 +540,3 @@ port: number;

* Optionally overrides all `net.Socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
* @default See [stream.getDefaultHighWaterMark()](https://nodejs.org/docs/latest-v24.x/api/stream.html#streamgetdefaulthighwatermarkobjectmode).
* @since v18.17.0, v20.1.0

@@ -546,0 +543,0 @@ */

@@ -8,3 +8,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/os.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/os.js)
*/

@@ -245,3 +245,3 @@ declare module "os" {

*
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v22.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
* Throws a [`SystemError`](https://nodejs.org/docs/latest-v24.x/api/errors.html#class-systemerror) if a user has no `username` or `homedir`.
* @since v6.0.0

@@ -422,9 +422,9 @@ */

* Returns the operating system CPU architecture for which the Node.js binary was
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
* and `'x64'`.
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,
* `'mips'`, `'mipsel'`, `'ppc64'`, `'riscv64'`, `'s390x'`, and `'x64'`.
*
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v22.x/api/process.html#processarch).
* The return value is equivalent to [process.arch](https://nodejs.org/docs/latest-v24.x/api/process.html#processarch).
* @since v0.5.0
*/
function arch(): string;
function arch(): NodeJS.Architecture;
/**

@@ -451,3 +451,4 @@ * Returns a string identifying the kernel version.

/**
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,
* `mips`, `mips64`, `ppc64`, `ppc64le`, `s390x`, `i386`, `i686`, `x86_64`.
*

@@ -454,0 +455,0 @@ * On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not

{
"name": "@types/node",
"version": "22.15.30",
"version": "24.0.0",
"description": "TypeScript definitions for node",

@@ -207,2 +207,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"typesVersions": {
"<=5.1": {
"*": [
"ts5.1/*"
]
},
"<=5.6": {

@@ -212,2 +217,7 @@ "*": [

]
},
"<=5.7": {
"*": [
"ts5.7/*"
]
}

@@ -222,7 +232,7 @@ },

"dependencies": {
"undici-types": "~6.21.0"
"undici-types": "~7.8.0"
},
"peerDependencies": {},
"typesPublisherContentHash": "e608b189ccd6623034719d736dfcdaf6bae11f1e8fe989b19c4a6d3221277a64",
"typesPublisherContentHash": "8d6ceac3f0f5283bf419c4930f679c52f7a63cc3f0cc2bd866acff9fb14a8eba",
"typeScriptVersion": "5.1"
}

@@ -16,3 +16,3 @@ declare module "path/posix" {

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/path.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/path.js)
*/

@@ -19,0 +19,0 @@ declare module "path" {

@@ -30,3 +30,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/perf_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/perf_hooks.js)
*/

@@ -899,3 +899,3 @@ declare module "perf_hooks" {

* `PerformanceEntry` is a global reference for `import { PerformanceEntry } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceentry
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceentry
* @since v19.0.0

@@ -910,3 +910,3 @@ */

* `PerformanceMark` is a global reference for `import { PerformanceMark } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemark
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemark
* @since v19.0.0

@@ -921,3 +921,3 @@ */

* `PerformanceMeasure` is a global reference for `import { PerformanceMeasure } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performancemeasure
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performancemeasure
* @since v19.0.0

@@ -932,3 +932,3 @@ */

* `PerformanceObserver` is a global reference for `import { PerformanceObserver } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserver
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserver
* @since v19.0.0

@@ -943,3 +943,3 @@ */

* `PerformanceObserverEntryList` is a global reference for `import { PerformanceObserverEntryList } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceobserverentrylist
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceobserverentrylist
* @since v19.0.0

@@ -954,3 +954,3 @@ */

* `PerformanceResourceTiming` is a global reference for `import { PerformanceResourceTiming } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performanceresourcetiming
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performanceresourcetiming
* @since v19.0.0

@@ -965,3 +965,3 @@ */

* `performance` is a global reference for `import { performance } from 'node:perf_hooks'`
* @see https://nodejs.org/docs/latest-v22.x/api/globals.html#performance
* @see https://nodejs.org/docs/latest-v24.x/api/globals.html#performance
* @since v16.0.0

@@ -968,0 +968,0 @@ */

@@ -27,3 +27,3 @@ /**

* @deprecated Since v7.0.0 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/punycode.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/punycode.js)
*/

@@ -30,0 +30,0 @@ declare module "punycode" {

@@ -12,3 +12,3 @@ /**

* when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/querystring.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/querystring.js)
*/

@@ -15,0 +15,0 @@ declare module "querystring" {

/**
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdin)) one line at a time.
* The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream
* (such as [`process.stdin`](https://nodejs.org/docs/latest-v24.x/api/process.html#processstdin)) one line at a time.
*

@@ -34,3 +34,3 @@ * To use the promise-based APIs:

* received on the `input` stream.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/readline.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/readline.js)
*/

@@ -50,3 +50,3 @@ declare module "readline" {

* Instances of the `readline.Interface` class are constructed using the `readline.createInterface()` method. Every instance is associated with a
* single `input` [Readable](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream.
* single `input` [Readable](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream and a single `output` [Writable](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream.
* The `output` stream is used to print prompts for user input that arrives on,

@@ -105,3 +105,3 @@ * and is read from, the `input` stream.

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
*/

@@ -120,3 +120,3 @@ protected constructor(

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#class-interfaceconstructor
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#class-interfaceconstructor
*/

@@ -327,7 +327,7 @@ protected constructor(options: ReadLineOptions);

/**
* The [`Readable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#readable-streams) stream to listen to
* The [`Readable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#readable-streams) stream to listen to
*/
input: NodeJS.ReadableStream;
/**
* The [`Writable`](https://nodejs.org/docs/latest-v22.x/api/stream.html#writable-streams) stream to write readline data to.
* The [`Writable`](https://nodejs.org/docs/latest-v24.x/api/stream.html#writable-streams) stream to write readline data to.
*/

@@ -377,3 +377,3 @@ output?: NodeJS.WritableStream | undefined;

* `\r` followed by `\n` will always be considered a single newline
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v22.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
* (which may be reasonable for [reading files](https://nodejs.org/docs/latest-v24.x/api/readline.html#example-read-file-stream-line-by-line) with `\r\n` line delimiter).
* @default 100

@@ -566,3 +566,3 @@ */

/**
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream
* The `readline.clearLine()` method clears current line of given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream
* in a specified direction identified by `dir`.

@@ -575,3 +575,3 @@ * @since v0.7.7

/**
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) stream from
* The `readline.clearScreenDown()` method clears the given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) stream from
* the current position of the cursor down.

@@ -585,3 +585,3 @@ * @since v0.7.7

* The `readline.cursorTo()` method moves cursor to the specified position in a
* given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
* given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
* @since v0.7.7

@@ -594,3 +594,3 @@ * @param callback Invoked once the operation completes.

* The `readline.moveCursor()` method moves the cursor _relative_ to its current
* position in a given [TTY](https://nodejs.org/docs/latest-v22.x/api/tty.html) `stream`.
* position in a given [TTY](https://nodejs.org/docs/latest-v24.x/api/tty.html) `stream`.
* @since v0.7.7

@@ -597,0 +597,0 @@ * @param callback Invoked once the operation completes.

/**
* @since v17.0.0
* @experimental
*/

@@ -5,0 +4,0 @@ declare module "readline/promises" {

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Thu, 05 Jun 2025 18:56:28 GMT
* Last updated: Tue, 10 Jun 2025 02:18:06 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

@@ -14,0 +14,0 @@

@@ -9,3 +9,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/repl.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/repl.js)
*/

@@ -41,8 +41,6 @@ declare module "repl" {

* The function to be used when evaluating each given line of input.
* Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
* **Default:** an async wrapper for the JavaScript `eval()` function. An `eval` function can
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
* additional lines.
*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_default_evaluation
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_custom_evaluation_functions
* additional lines. See the [custom evaluation functions](https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#custom-evaluation-functions)
* section for more details.
*/

@@ -79,3 +77,3 @@ eval?: REPLEval | undefined;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_customizing_repl_output
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_customizing_repl_output
*/

@@ -86,3 +84,3 @@ writer?: REPLWriter | undefined;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/readline.html#readline_use_of_the_completer_function
* @see https://nodejs.org/dist/latest-v24.x/docs/api/readline.html#readline_use_of_the_completer_function
*/

@@ -175,3 +173,3 @@ completer?: Completer | AsyncCompleter | undefined;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_commands_and_special_keys
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_commands_and_special_keys
*/

@@ -182,3 +180,3 @@ readonly editorMode: boolean;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
*/

@@ -189,3 +187,3 @@ readonly underscoreAssigned: boolean;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
*/

@@ -197,3 +195,3 @@ readonly last: any;

* @since v9.8.0
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
*/

@@ -205,3 +203,3 @@ readonly underscoreErrAssigned: boolean;

* @since v9.8.0
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
*/

@@ -258,3 +256,3 @@ readonly lastError: any;

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_class_replserver
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_class_replserver
*/

@@ -304,3 +302,3 @@ private constructor();

*
* When multi-line input is being entered, an ellipsis is printed rather than the
* When multi-line input is being entered, a pipe `'|'` is printed rather than the
* 'prompt'.

@@ -432,3 +430,3 @@ *

*
* @see https://nodejs.org/dist/latest-v22.x/docs/api/repl.html#repl_recoverable_errors
* @see https://nodejs.org/dist/latest-v24.x/docs/api/repl.html#repl_recoverable_errors
*/

@@ -435,0 +433,0 @@ class Recoverable extends SyntaxError {

@@ -114,3 +114,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/src/node_sea.cc)
* @see [source](https://github.com/nodejs/node/blob/v24.x/src/node_sea.cc)
*/

@@ -117,0 +117,0 @@ declare module "node:sea" {

@@ -43,3 +43,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/sqlite.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/sqlite.js)
*/

@@ -93,2 +93,10 @@ declare module "node:sqlite" {

allowExtension?: boolean | undefined;
/**
* The [busy timeout](https://sqlite.org/c3ref/busy_timeout.html) in milliseconds. This is the maximum amount of
* time that SQLite will wait for a database lock to be released before
* returning an error.
* @since v24.0.0
* @default 0
*/
timeout?: number | undefined;
}

@@ -171,2 +179,27 @@ interface CreateSessionOptions {

}
interface AggregateOptions<T extends SQLInputValue = SQLInputValue> extends FunctionOptions {
/**
* The identity value for the aggregation function. This value is used when the aggregation
* function is initialized. When a `Function` is passed the identity will be its return value.
*/
start: T | (() => T);
/**
* The function to call for each row in the aggregation. The
* function receives the current state and the row value. The return value of
* this function should be the new state.
*/
step: (accumulator: T, ...args: SQLOutputValue[]) => T;
/**
* The function to call to get the result of the
* aggregation. The function receives the final state and should return the
* result of the aggregation.
*/
result?: ((accumulator: T) => SQLInputValue) | undefined;
/**
* When this function is provided, the `aggregate` method will work as a window function.
* The function receives the current state and the dropped row value. The return value of this function should be the
* new state.
*/
inverse?: ((accumulator: T, ...args: SQLOutputValue[]) => T) | undefined;
}
/**

@@ -188,2 +221,34 @@ * This class represents a single [connection](https://www.sqlite.org/c3ref/sqlite3.html) to a SQLite database. All APIs

/**
* Registers a new aggregate function with the SQLite database. This method is a wrapper around
* [`sqlite3_create_window_function()`](https://www.sqlite.org/c3ref/create_function.html).
*
* When used as a window function, the `result` function will be called multiple times.
*
* ```js
* import { DatabaseSync } from 'node:sqlite';
*
* const db = new DatabaseSync(':memory:');
* db.exec(`
* CREATE TABLE t3(x, y);
* INSERT INTO t3 VALUES ('a', 4),
* ('b', 5),
* ('c', 3),
* ('d', 8),
* ('e', 1);
* `);
*
* db.aggregate('sumint', {
* start: 0,
* step: (acc, value) => acc + value,
* });
*
* db.prepare('SELECT sumint(y) as total FROM t3').get(); // { total: 21 }
* ```
* @since v24.0.0
* @param name The name of the SQLite function to create.
* @param options Function configuration settings.
*/
aggregate(name: string, options: AggregateOptions): void;
aggregate<T extends SQLInputValue>(name: string, options: AggregateOptions<T>): void;
/**
* Closes the database connection. An exception is thrown if the database is not

@@ -211,2 +276,11 @@ * open. This method is a wrapper around [`sqlite3_close_v2()`](https://www.sqlite.org/c3ref/close.html).

/**
* This method is a wrapper around [`sqlite3_db_filename()`](https://sqlite.org/c3ref/db_filename.html)
* @since v24.0.0
* @param dbName Name of the database. This can be `'main'` (the default primary database) or any other
* database that has been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html) **Default:** `'main'`.
* @returns The location of the database file. When using an in-memory database,
* this method returns null.
*/
location(dbName?: string): string | null;
/**
* This method allows one or more SQL statements to be executed without returning

@@ -228,3 +302,3 @@ * any results. This method is useful when executing SQL statements read from a

* SQLite data type: see
* [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v22.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
* [Type conversion between JavaScript and SQLite](https://nodejs.org/docs/latest-v24.x/api/sqlite.html#type-conversion-between-javascript-and-sqlite).
* The result defaults to `NULL` if the return value is `undefined`.

@@ -244,2 +318,8 @@ */

/**
* Whether the database is currently within a transaction. This method
* is a wrapper around [`sqlite3_get_autocommit()`](https://sqlite.org/c3ref/get_autocommit.html).
* @since v24.0.0
*/
readonly isTransaction: boolean;
/**
* Opens the database specified in the `path` argument of the `DatabaseSync`constructor. This method should only be used when the database is not opened via

@@ -332,2 +412,34 @@ * the constructor. An exception is thrown if the database is already open.

}
interface StatementColumnMetadata {
/**
* The unaliased name of the column in the origin
* table, or `null` if the column is the result of an expression or subquery.
* This property is the result of [`sqlite3_column_origin_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
column: string | null;
/**
* The unaliased name of the origin database, or
* `null` if the column is the result of an expression or subquery. This
* property is the result of [`sqlite3_column_database_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
database: string | null;
/**
* The name assigned to the column in the result set of a
* `SELECT` statement. This property is the result of
* [`sqlite3_column_name()`](https://www.sqlite.org/c3ref/column_name.html).
*/
name: string;
/**
* The unaliased name of the origin table, or `null` if
* the column is the result of an expression or subquery. This property is the
* result of [`sqlite3_column_table_name()`](https://www.sqlite.org/c3ref/column_database_name.html).
*/
table: string | null;
/**
* The declared data type of the column, or `null` if the
* column is the result of an expression or subquery. This property is the
* result of [`sqlite3_column_decltype()`](https://www.sqlite.org/c3ref/column_decltype.html).
*/
type: string | null;
}
interface StatementResultingChanges {

@@ -378,2 +490,10 @@ /**

/**
* This method is used to retrieve information about the columns returned by the
* prepared statement.
* @since v23.11.0
* @returns An array of objects. Each object corresponds to a column
* in the prepared statement, and contains the following properties:
*/
columns(): StatementColumnMetadata[];
/**
* The source SQL text of the prepared statement with parameter

@@ -477,3 +597,63 @@ * placeholders replaced by the values that were used during the most recent

}
interface BackupOptions {
/**
* Name of the source database. This can be `'main'` (the default primary database) or any other
* database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
* @default 'main'
*/
source?: string | undefined;
/**
* Name of the target database. This can be `'main'` (the default primary database) or any other
* database that have been added with [`ATTACH DATABASE`](https://www.sqlite.org/lang_attach.html)
* @default 'main'
*/
target?: string | undefined;
/**
* Number of pages to be transmitted in each batch of the backup.
* @default 100
*/
rate?: number | undefined;
/**
* Callback function that will be called with the number of pages copied and the total number of
* pages.
*/
progress?: ((progressInfo: BackupProgressInfo) => void) | undefined;
}
interface BackupProgressInfo {
totalPages: number;
remainingPages: number;
}
/**
* This method makes a database backup. This method abstracts the
* [`sqlite3_backup_init()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupinit),
* [`sqlite3_backup_step()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupstep)
* and [`sqlite3_backup_finish()`](https://www.sqlite.org/c3ref/backup_finish.html#sqlite3backupfinish) functions.
*
* The backed-up database can be used normally during the backup process. Mutations coming from the same connection - same
* `DatabaseSync` - object will be reflected in the backup right away. However, mutations from other connections will cause
* the backup process to restart.
*
* ```js
* import { backup, DatabaseSync } from 'node:sqlite';
*
* const sourceDb = new DatabaseSync('source.db');
* const totalPagesTransferred = await backup(sourceDb, 'backup.db', {
* rate: 1, // Copy one page at a time.
* progress: ({ totalPages, remainingPages }) => {
* console.log('Backup in progress', { totalPages, remainingPages });
* },
* });
*
* console.log('Backup completed', totalPagesTransferred);
* ```
* @since v23.8.0
* @param sourceDb The database to backup. The source database must be open.
* @param path The path where the backup will be created. If the file already exists,
* the contents will be overwritten.
* @param options Optional configuration for the backup. The
* following properties are supported:
* @returns A promise that resolves when the backup is completed and rejects if an error occurs.
*/
function backup(sourceDb: DatabaseSync, path: string | Buffer | URL, options?: BackupOptions): Promise<void>;
/**
* @since v22.13.0

@@ -480,0 +660,0 @@ */

@@ -39,3 +39,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/string_decoder.js)
*/

@@ -42,0 +42,0 @@ declare module "string_decoder" {

@@ -9,3 +9,3 @@ /**

* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/timers.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers.js)
*/

@@ -12,0 +12,0 @@ declare module "timers" {

@@ -14,3 +14,3 @@ /**

* @since v15.0.0
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/timers/promises.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers/promises.js)
*/

@@ -17,0 +17,0 @@ declare module "timers/promises" {

@@ -9,3 +9,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tls.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tls.js)
*/

@@ -801,9 +801,2 @@ declare module "tls" {

}
/**
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
*/
interface SecurePair {
encrypted: TLSSocket;
cleartext: TLSSocket;
}
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";

@@ -1108,41 +1101,2 @@ interface SecureContextOptions {

/**
* Creates a new secure pair object with two streams, one of which reads and writes
* the encrypted data and the other of which reads and writes the cleartext data.
* Generally, the encrypted stream is piped to/from an incoming encrypted data
* stream and the cleartext one is used as a replacement for the initial encrypted
* stream.
*
* `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties.
*
* Using `cleartext` has the same API as {@link TLSSocket}.
*
* The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
*
* ```js
* pair = tls.createSecurePair(// ... );
* pair.encrypted.pipe(socket);
* socket.pipe(pair.encrypted);
* ```
*
* can be replaced by:
*
* ```js
* secureSocket = tls.TLSSocket(socket, options);
* ```
*
* where `secureSocket` has the same API as `pair.cleartext`.
* @since v0.3.2
* @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
* @param context A secure context object as returned by `tls.createSecureContext()`
* @param isServer `true` to specify that this TLS connection should be opened as a server.
* @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
* @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
*/
function createSecurePair(
context?: SecureContext,
isServer?: boolean,
requestCert?: boolean,
rejectUnauthorized?: boolean,
): SecurePair;
/**
* `{@link createServer}` sets the default value of the `honorCipherOrder` option

@@ -1203,3 +1157,3 @@ * to `true`, other APIs that create secure contexts leave it unset.

* Not all supported ciphers are enabled by default. See
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v22.x/api/tls.html#modifying-the-default-tls-cipher-suite).
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v24.x/api/tls.html#modifying-the-default-tls-cipher-suite).
*

@@ -1206,0 +1160,0 @@ * Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for

@@ -12,4 +12,4 @@ /**

* * `node`: An empty placeholder.
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) trace data.
* The [`async_hooks`](https://nodejs.org/docs/latest-v22.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) trace data.
* The [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
* * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.

@@ -26,3 +26,3 @@ * * `node.console`: Enables capture of `console.time()` and `console.count()` output.

* * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v22.x/api/perf_hooks.html) measurements.
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v24.x/api/perf_hooks.html) measurements.
* * `node.perf.usertiming`: Enables capture of only Performance API User Timing

@@ -35,3 +35,3 @@ * measures and marks.

* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `v8`: The [V8](https://nodejs.org/docs/latest-v22.x/api/v8.html) events are GC, compiling, and execution related.
* * `v8`: The [V8](https://nodejs.org/docs/latest-v24.x/api/v8.html) events are GC, compiling, and execution related.
* * `node.http`: Enables capture of trace data for http request / response.

@@ -94,5 +94,5 @@ *

*
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v22.x/api/worker_threads.html#class-worker) threads.
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#class-worker) threads.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/trace_events.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/trace_events.js)
*/

@@ -99,0 +99,0 @@ declare module "trace_events" {

@@ -15,2 +15,3 @@ export {}; // Make this a module

| BigInt64Array
| Float16Array
| Float32Array

@@ -17,0 +18,0 @@ | Float64Array;

@@ -25,11 +25,15 @@ /**

// NOTE: These definitions support Node.js and TypeScript 4.9 through 5.6.
// NOTE: These definitions support Node.js and TypeScript 5.2 through 5.6.
// Reference required TypeScript libs:
// Reference required TypeScript libraries:
/// <reference lib="es2020" />
/// <reference lib="esnext.disposable" />
// TypeScript backwards-compatibility definitions:
/// <reference path="../compatibility/index.d.ts" />
// TypeScript library polyfills required for TypeScript <=5.6:
/// <reference path="./compatibility/float16array.d.ts" />
// Definitions specific to TypeScript 4.9 through 5.6:
// Iterator definitions required for compatibility with TypeScript <5.6:
/// <reference path="../compatibility/iterators.d.ts" />
// Definitions for Node.js modules specific to TypeScript <=5.6:
/// <reference path="./globals.typedarray.d.ts" />

@@ -36,0 +40,0 @@ /// <reference path="./buffer.buffer.d.ts" />

@@ -24,3 +24,3 @@ /**

* manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/tty.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tty.js)
*/

@@ -27,0 +27,0 @@ declare module "tty" {

@@ -8,3 +8,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/url.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/url.js)
*/

@@ -424,3 +424,2 @@ declare module "url" {

* @since v16.7.0
* @experimental
*/

@@ -432,3 +431,2 @@ static createObjectURL(blob: NodeBlob): string;

* @since v16.7.0
* @experimental
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.

@@ -763,2 +761,41 @@ */

}
interface URLPatternComponentResult {
input: string;
groups: Record<string, string | undefined>;
}
interface URLPatternInit {
protocol?: string;
username?: string;
password?: string;
hostname?: string;
port?: string;
pathname?: string;
search?: string;
hash?: string;
baseURL?: string;
}
interface URLPatternOptions {
ignoreCase?: boolean;
}
interface URLPatternResult {
inputs: (string | URLPatternInit)[];
protocol: URLPatternComponentResult;
username: URLPatternComponentResult;
password: URLPatternComponentResult;
hostname: URLPatternComponentResult;
port: URLPatternComponentResult;
pathname: URLPatternComponentResult;
search: URLPatternComponentResult;
hash: URLPatternComponentResult;
}
/**
* @since v23.8.0
* @experimental
*/
class URLPattern {
constructor(input: string | URLPatternInit, baseURL: string, options?: URLPatternOptions);
constructor(input?: string | URLPatternInit, options?: URLPatternOptions);
exec(input: string | URLPatternInit, baseURL?: string): URLPatternResult | null;
test(input: string | URLPatternInit, baseURL?: string): boolean;
}
interface URLSearchParamsIterator<T> extends NodeJS.Iterator<T, NodeJS.BuiltinIteratorReturn, unknown> {

@@ -944,15 +981,11 @@ [Symbol.iterator](): URLSearchParamsIterator<T>;

}
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
import {
URL as _URL,
URLPattern as _URLPattern,
URLPatternInit as _URLPatternInit,
URLPatternResult as _URLPatternResult,
URLSearchParams as _URLSearchParams,
} from "url";
global {
interface URLSearchParams extends _URLSearchParams {}
interface URL extends _URL {}
interface Global {
URL: typeof _URL;
URLSearchParams: typeof _URLSearchParams;
}
/**
* `URL` class is a global reference for `import { URL } from 'url'`
* https://nodejs.org/api/url.html#the-whatwg-url-api
* @since v10.0.0
*/
var URL: typeof globalThis extends {

@@ -963,7 +996,3 @@ onmessage: any;

: typeof _URL;
/**
* `URLSearchParams` class is a global reference for `import { URLSearchParams } from 'node:url'`
* https://nodejs.org/api/url.html#class-urlsearchparams
* @since v10.0.0
*/
interface URLSearchParams extends _URLSearchParams {}
var URLSearchParams: typeof globalThis extends {

@@ -974,2 +1003,6 @@ onmessage: any;

: typeof _URLSearchParams;
interface URLPatternInit extends _URLPatternInit {}
interface URLPatternResult extends _URLPatternResult {}
interface URLPattern extends _URLPattern {}
var URLPattern: typeof _URLPattern;
}

@@ -976,0 +1009,0 @@ }

@@ -7,3 +7,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/v8.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/v8.js)
*/

@@ -551,4 +551,3 @@ declare module "v8" {

* The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v22.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
* @experimental
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v24.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
* @since v18.10.0, v16.18.0

@@ -779,29 +778,2 @@ */

type StartupSnapshotCallbackFn = (args: any) => any;
interface StartupSnapshot {
/**
* Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
* This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
* @since v18.6.0, v16.17.0
*/
addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
* The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
* to re-acquire resources that the application needs when the application is restarted from the snapshot.
* @since v18.6.0, v16.17.0
*/
addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
* If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
* data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
* @since v18.6.0, v16.17.0
*/
setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* Returns true if the Node.js instance is run to build a snapshot.
* @since v18.6.0, v16.17.0
*/
isBuildingSnapshot(): boolean;
}
/**

@@ -885,6 +857,31 @@ * The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots.

*
* @experimental
* @since v18.6.0, v16.17.0
*/
const startupSnapshot: StartupSnapshot;
namespace startupSnapshot {
/**
* Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
* This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
* @since v18.6.0, v16.17.0
*/
function addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
* The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
* to re-acquire resources that the application needs when the application is restarted from the snapshot.
* @since v18.6.0, v16.17.0
*/
function addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
* If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
* data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
* @since v18.6.0, v16.17.0
*/
function setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
/**
* Returns true if the Node.js instance is run to build a snapshot.
* @since v18.6.0, v16.17.0
*/
function isBuildingSnapshot(): boolean;
}
}

@@ -891,0 +888,0 @@ declare module "node:v8" {

@@ -37,3 +37,3 @@ /**

* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/vm.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/vm.js)
*/

@@ -64,2 +64,3 @@ declare module "vm" {

importAttributes: ImportAttributes,
phase: "source" | "evaluation",
) => Module | Promise<Module>;

@@ -76,3 +77,4 @@ interface ScriptOptions extends BaseOptions {

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -128,3 +130,4 @@ importModuleDynamically?:

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -144,3 +147,4 @@ importModuleDynamically?:

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -173,3 +177,4 @@ importModuleDynamically?:

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -217,3 +222,4 @@ importModuleDynamically?:

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -420,5 +426,5 @@ importModuleDynamically?:

* If the given `contextObject` is an object, the `vm.createContext()` method will
* [prepare that object](https://nodejs.org/docs/latest-v22.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
* [prepare that object](https://nodejs.org/docs/latest-v24.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
* and return a reference to it so that it can be used in calls to {@link runInContext} or
* [`script.runInContext()`](https://nodejs.org/docs/latest-v22.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
* [`script.runInContext()`](https://nodejs.org/docs/latest-v24.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its

@@ -918,3 +924,4 @@ * existing properties but also having the built-in objects and functions any standard

* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @experimental
*/

@@ -1017,3 +1024,3 @@ importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;

*
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v22.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v24.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
* @since v21.7.0, v20.12.0

@@ -1020,0 +1027,0 @@ */

@@ -70,3 +70,3 @@ /**

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/wasi.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/wasi.js)
*/

@@ -73,0 +73,0 @@ declare module "wasi" {

@@ -18,24 +18,27 @@ /**

* import {
* Worker, isMainThread, parentPort, workerData,
* Worker,
* isMainThread,
* parentPort,
* workerData,
* } from 'node:worker_threads';
* import { parse } from 'some-js-parsing-library';
*
* if (isMainThread) {
* module.exports = function parseJSAsync(script) {
* return new Promise((resolve, reject) => {
* const worker = new Worker(__filename, {
* workerData: script,
* });
* worker.on('message', resolve);
* worker.on('error', reject);
* worker.on('exit', (code) => {
* if (code !== 0)
* reject(new Error(`Worker stopped with exit code ${code}`));
* });
* });
* };
* } else {
* if (!isMainThread) {
* const { parse } = await import('some-js-parsing-library');
* const script = workerData;
* parentPort.postMessage(parse(script));
* }
*
* export default function parseJSAsync(script) {
* return new Promise((resolve, reject) => {
* const worker = new Worker(new URL(import.meta.url), {
* workerData: script,
* });
* worker.on('message', resolve);
* worker.on('error', reject);
* worker.on('exit', (code) => {
* if (code !== 0)
* reject(new Error(`Worker stopped with exit code ${code}`));
* });
* });
* };
* ```

@@ -53,3 +56,3 @@ *

* specifically `argv` and `execArgv` options.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/worker_threads.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/worker_threads.js)
*/

@@ -64,2 +67,3 @@ declare module "worker_threads" {

import { URL } from "node:url";
import { HeapInfo } from "node:v8";
const isInternalThread: boolean;

@@ -191,2 +195,7 @@ const isMainThread: boolean;

/**
* If true, the `MessagePort` object will keep the Node.js event loop active.
* @since v18.1.0, v16.17.0
*/
hasRef(): boolean;
/**
* Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default

@@ -473,2 +482,9 @@ * behavior). If the port is `ref()`ed, calling `ref()` again has no effect.

getHeapSnapshot(): Promise<Readable>;
/**
* This method returns a `Promise` that will resolve to an object identical to `v8.getHeapStatistics()`,
* or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running.
* This methods allows the statistics to be observed from outside the actual thread.
* @since v24.0.0
*/
getHeapStatistics(): Promise<HeapInfo>;
addListener(event: "error", listener: (err: Error) => void): this;

@@ -475,0 +491,0 @@ addListener(event: "exit", listener: (exitCode: number) => void): this;

@@ -12,3 +12,3 @@ /**

* Compression and decompression are built around the Node.js
* [Streams API](https://nodejs.org/docs/latest-v22.x/api/stream.html).
* [Streams API](https://nodejs.org/docs/latest-v24.x/api/stream.html).
*

@@ -93,3 +93,3 @@ * Compressing or decompressing a stream (such as a file) can be accomplished by

* @since v0.5.8
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/zlib.js)
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/zlib.js)
*/

@@ -148,3 +148,3 @@ declare module "zlib" {

/**
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
* @default buffer.kMaxLength

@@ -169,3 +169,3 @@ */

* Key-value object containing indexed
* [Zstd parameters](https://nodejs.org/docs/latest-v22.x/api/zlib.html#zstd-constants).
* [Zstd parameters](https://nodejs.org/docs/latest-v24.x/api/zlib.html#zstd-constants).
*/

@@ -175,3 +175,3 @@ params?: { [key: number]: number | boolean } | undefined;

* Limits output size when using
* [convenience methods](https://nodejs.org/docs/latest-v22.x/api/zlib.html#convenience-methods).
* [convenience methods](https://nodejs.org/docs/latest-v24.x/api/zlib.html#convenience-methods).
* @default buffer.kMaxLength

@@ -182,4 +182,2 @@ */

interface Zlib {
/** @deprecated Use bytesWritten instead. */
readonly bytesRead: number;
readonly bytesWritten: number;

@@ -186,0 +184,0 @@ shell?: boolean | string | undefined;

// Polyfills for the explicit resource management types added in TypeScript 5.2.
// TODO: remove once this package no longer supports TS 5.1, and replace with a
// <reference> to TypeScript's disposable library in index.d.ts.
interface SymbolConstructor {
readonly dispose: unique symbol;
readonly asyncDispose: unique symbol;
}
interface Disposable {
[Symbol.dispose](): void;
}
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
// Declaration files in this directory contain types relating to TypeScript library features
// that are not included in all TypeScript versions supported by DefinitelyTyped, but
// which can be made backwards-compatible without needing `typesVersions`.
// If adding declarations to this directory, please specify which versions of TypeScript require them,
// so that they can be removed when no longer needed.
/// <reference path="disposable.d.ts" />
/// <reference path="indexable.d.ts" />
/// <reference path="iterators.d.ts" />
// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
// TODO: these methods are not used within @types/node, and should be removed at the next
// major @types/node version; users should include the es2022 TypeScript libraries
// if they need these features.
interface RelativeIndexable<T> {
at(index: number): T | undefined;
}
interface String extends RelativeIndexable<string> {}
interface Array<T> extends RelativeIndexable<T> {}
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
interface Int8Array extends RelativeIndexable<number> {}
interface Uint8Array extends RelativeIndexable<number> {}
interface Uint8ClampedArray extends RelativeIndexable<number> {}
interface Int16Array extends RelativeIndexable<number> {}
interface Uint16Array extends RelativeIndexable<number> {}
interface Int32Array extends RelativeIndexable<number> {}
interface Uint32Array extends RelativeIndexable<number> {}
interface Float32Array extends RelativeIndexable<number> {}
interface Float64Array extends RelativeIndexable<number> {}
interface BigInt64Array extends RelativeIndexable<bigint> {}
interface BigUint64Array extends RelativeIndexable<bigint> {}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display