Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
2336
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
25.8.0
to
25.9.0
+298
node/stream/iter.d.ts
declare module "node:stream/iter" {
// Symbols and custom typedefs
const broadcastProtocol: unique symbol;
const drainableProtocol: unique symbol;
const shareProtocol: unique symbol;
const shareSyncProtocol: unique symbol;
const toAsyncStreamable: unique symbol;
const toStreamable: unique symbol;
type Source =
| string
| ArrayBufferLike
| ArrayBufferView
| Iterable<SyncSource>
| AsyncIterable<Source>
| Streamable
| AsyncStreamable;
type SyncSource = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncSource> | Streamable;
type Transform = StatelessTransformFn | StatefulTransform;
type SyncTransform = SyncStatelessTransformFn | SyncStatefulTransform;
type TransformResult =
| string
| ArrayBufferLike
| ArrayBufferView
| Iterable<SyncTransformResult>
| AsyncIterable<TransformResult>;
type SyncTransformResult = string | ArrayBufferLike | ArrayBufferView | Iterable<SyncTransformResult>;
interface AsyncStreamable {
[toAsyncStreamable](): Source;
}
interface Broadcastable {
[broadcastProtocol](options: BroadcastOptions): Broadcast;
}
interface Drainable {
[drainableProtocol](): Promise<boolean> | null;
}
interface Shareable {
[shareProtocol](options: ShareOptions): Share;
}
interface Streamable {
[toStreamable](): SyncSource;
}
interface SyncShareable {
[shareSyncProtocol](options: ShareSyncOptions): SyncShare;
}
// IDL dictionaries, enums, typedefs
type BackpressurePolicy = "strict" | "block" | "drop-oldest" | "drop-newest";
type ByteReadableStream = AsyncIterable<Uint8Array[]>;
type SyncByteReadableStream = Iterable<Uint8Array[]>;
interface WriteOptions {
signal?: AbortSignal;
}
interface PushStreamOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
signal?: AbortSignal;
}
interface PullOptions {
signal?: AbortSignal;
}
interface PipeToOptions {
signal?: AbortSignal;
preventClose?: boolean;
preventFail?: boolean;
}
interface PipeToSyncOptions {
preventClose?: boolean;
preventFail?: boolean;
}
interface ConsumeOptions {
signal?: AbortSignal;
limit?: number;
}
interface ConsumeSyncOptions {
limit?: number;
}
interface TextConsumeOptions extends ConsumeOptions {
encoding?: string;
}
interface TextConsumeSyncOptions extends ConsumeSyncOptions {
encoding?: string;
}
interface MergeOptions {
signal?: AbortSignal;
}
interface BroadcastOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
signal?: AbortSignal;
}
interface ShareOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
signal?: AbortSignal;
}
interface ShareSyncOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
}
interface DuplexDirectionOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
}
interface DuplexOptions {
highWaterMark?: number;
backpressure?: BackpressurePolicy;
a?: DuplexDirectionOptions;
b?: DuplexDirectionOptions;
signal?: AbortSignal;
}
interface TransformCallbackOptions {
signal: AbortSignal;
}
interface StatelessTransformFn {
(chunks: Uint8Array[] | null, options: TransformCallbackOptions): TransformResult | null;
}
interface SyncStatelessTransformFn {
(chunks: Uint8Array[] | null): SyncTransformResult | null;
}
interface StatefulTransform {
transform(
source: AsyncIterable<Uint8Array[] | null>,
options: TransformCallbackOptions,
): AsyncIterable<TransformResult>;
}
interface SyncStatefulTransform {
transform(source: Iterable<Uint8Array[] | null>): Iterable<SyncTransformResult>;
}
// IDL interfaces
interface PushWriter extends Writer, Drainable {}
interface PushStreamResult {
writer: PushWriter;
readable: ByteReadableStream;
}
interface BroadcastWriter extends Writer, Drainable {}
interface BroadcastResult {
writer: BroadcastWriter;
broadcast: Broadcast;
}
interface Writer extends Disposable, AsyncDisposable {
readonly desiredSize: number | null;
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
writev(chunks: Array<Uint8Array | string>, options?: WriteOptions): Promise<void>;
writeSync(chunk: Uint8Array | string): boolean;
writevSync(chunks: Array<Uint8Array | string>): boolean;
end(options?: WriteOptions): Promise<number>;
endSync(): number;
fail(reason?: any): void;
}
interface PartialWriter extends Partial<Writer> {
write(chunk: Uint8Array | string, options?: WriteOptions): Promise<void>;
}
interface SyncWriter extends Disposable {
readonly desiredSize: number | null;
writeSync(chunk: Uint8Array | string): number;
writevSync(chunks: Array<Uint8Array | string>): number;
endSync(): number;
fail(reason?: any): void;
}
interface PartialSyncWriter extends Partial<SyncWriter> {
writeSync(chunk: Uint8Array | string): number;
}
interface Broadcast extends Disposable {
readonly consumerCount: number;
readonly bufferSize: number;
push(...args: any[]): ByteReadableStream;
cancel(reason?: any): void;
}
interface Share extends Disposable {
readonly consumerCount: number;
readonly bufferSize: number;
pull(...args: any[]): ByteReadableStream;
cancel(reason?: any): void;
}
interface SyncShare extends Disposable {
readonly consumerCount: number;
readonly bufferSize: number;
pull(...args: any): SyncByteReadableStream;
cancel(reason?: any): void;
}
interface DuplexChannel extends AsyncDisposable {
readonly writer: Writer;
readonly readable: ByteReadableStream;
close(): Promise<void>;
}
// Push stream creation
function push(...transforms: Transform[]): PushStreamResult;
function push(...args: [...transforms: Transform[], options: PushStreamOptions]): PushStreamResult;
// Stream factories
function from(input: Source): ByteReadableStream;
function fromSync(input: SyncSource): SyncByteReadableStream;
// Pull pipelines
function pull(source: Source, ...transforms: Transform[]): ByteReadableStream;
function pull(
source: Source,
...args: [...transforms: Transform[], options: PullOptions]
): ByteReadableStream;
function pullSync(source: SyncSource, ...transforms: SyncTransform[]): SyncByteReadableStream;
// Pipe operations
function pipeTo(source: Source, writer: PartialWriter, options?: PipeToOptions): Promise<number>;
function pipeTo(source: Source, ...args: [...transforms: Transform[], writer: PartialWriter]): Promise<number>;
function pipeTo(
source: Source,
...args: [...transforms: Transform[], writer: PartialWriter, options: PipeToOptions]
): Promise<number>;
function pipeToSync(source: SyncSource, writer: PartialSyncWriter, options?: PipeToSyncOptions): number;
function pipeToSync(
source: SyncSource,
...args: [...transforms: SyncTransform[], writer: PartialSyncWriter]
): number;
function pipeToSync(
source: SyncSource,
...args: [...transforms: SyncTransform[], writer: PartialSyncWriter, options: PipeToSyncOptions]
): number;
// Consumers
function bytes(source: Source, options?: ConsumeOptions): Promise<Uint8Array>;
function bytesSync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array;
function text(source: Source, options?: TextConsumeOptions): Promise<string>;
function textSync(source: SyncSource, options?: TextConsumeSyncOptions): string;
function arrayBuffer(source: Source, options?: ConsumeOptions): Promise<ArrayBuffer>;
function arrayBufferSync(source: SyncSource, options?: ConsumeSyncOptions): ArrayBuffer;
function array(source: Source, options?: ConsumeOptions): Promise<Uint8Array[]>;
function arraySync(source: SyncSource, options?: ConsumeSyncOptions): Uint8Array[];
// Utilities
function tap(callback: StatelessTransformFn): StatelessTransformFn;
function tapSync(callback: SyncStatelessTransformFn): SyncStatelessTransformFn;
function merge(...sources: Source[]): ByteReadableStream;
function merge(...args: [...sources: Source[], options: MergeOptions]): ByteReadableStream;
function ondrain(drainable: any): Promise<boolean> | null;
// Multi-consumer
function broadcast(options?: BroadcastOptions): BroadcastResult;
function share(source: Source, options?: ShareOptions): Share;
function shareSync(source: SyncSource, options?: ShareSyncOptions): SyncShare;
// Duplex
function duplex(options?: DuplexOptions): [DuplexChannel, DuplexChannel];
// Node.js-specific extensions
namespace Broadcast {
/**
* Create a `Broadcast` from an existing source. The source is consumed
* automatically and pushed to all subscribers.
* @since v25.9.0
* @param options Same as `broadcast()`.
*/
function from(
input: ByteReadableStream | SyncByteReadableStream | Broadcastable,
options?: BroadcastOptions,
): BroadcastResult;
}
namespace Share {
/**
* Create a `Share` from an existing source.
* @since v25.9.0
* @param options Same as `share()`.
*/
function from(input: ByteReadableStream | SyncByteReadableStream | Shareable, options?: ShareOptions): Share;
}
namespace SyncShare {
/**
* @since v25.9.0
*/
function from(input: SyncByteReadableStream | SyncShareable, options?: ShareSyncOptions): SyncShare;
}
namespace Stream {
export {
array,
arrayBuffer,
arrayBufferSync,
arraySync,
broadcast,
broadcastProtocol,
bytes,
bytesSync,
drainableProtocol,
duplex,
from,
fromSync,
merge,
ondrain,
pipeTo,
pipeToSync,
pull,
pullSync,
push,
share,
shareProtocol,
shareSync,
shareSyncProtocol,
tap,
tapSync,
text,
textSync,
toAsyncStreamable,
toStreamable,
};
}
}
declare module "stream/iter" {
export * from "node:stream/iter";
}
declare module "node:zlib/iter" {
import { StatefulTransform, SyncStatefulTransform } from "node:stream/iter";
interface BrotliOptions {
chunkSize?: number | undefined;
params?: { [key: number]: number | boolean } | undefined;
dictionary?: NodeJS.ArrayBufferView | undefined;
}
interface ZlibOptions {
chunkSize?: number | undefined;
windowBits?: number | undefined;
dictionary?: NodeJS.ArrayBufferView | undefined;
}
interface ZlibCompressionOptions extends ZlibOptions {
level?: number | undefined;
memLevel?: number | undefined;
strategy?: number | undefined;
}
interface ZstdOptions {
chunkSize?: number | undefined;
params?: { [key: number]: number | boolean } | undefined;
dictionary?: NodeJS.ArrayBufferView | undefined;
}
interface ZstdCompressionOptions extends ZstdOptions {
pledgedSrcSize?: number | undefined;
}
/**
* Create a Brotli compression transform. Output is compatible with
* `zlib.brotliDecompress()` and `decompressBrotli()`/`decompressBrotliSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressBrotli(options?: BrotliOptions): StatefulTransform;
/**
* Create a Brotli compression transform. Output is compatible with
* `zlib.brotliDecompress()` and `decompressBrotli()`/`decompressBrotliSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressBrotliSync(options?: BrotliOptions): SyncStatefulTransform;
/**
* Create a deflate compression transform. Output is compatible with
* `zlib.inflate()` and `decompressDeflate()`/`decompressDeflateSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressDeflate(options?: ZlibCompressionOptions): StatefulTransform;
/**
* Create a deflate compression transform. Output is compatible with
* `zlib.inflate()` and `decompressDeflate()`/`decompressDeflateSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressDeflateSync(options?: ZlibCompressionOptions): SyncStatefulTransform;
/**
* Create a gzip compression transform. Output is compatible with `zlib.gunzip()`
* and `decompressGzip()`/`decompressGzipSync()`.
* @returns A stateful transform.
*/
function compressGzip(options?: ZlibCompressionOptions): StatefulTransform;
/**
* Create a gzip compression transform. Output is compatible with `zlib.gunzip()`
* and `decompressGzip()`/`decompressGzipSync()`.
* @returns A stateful transform.
*/
function compressGzipSync(options?: ZlibCompressionOptions): SyncStatefulTransform;
/**
* Create a Zstandard compression transform. Output is compatible with
* `zlib.zstdDecompress()` and `decompressZstd()`/`decompressZstdSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressZstd(options?: ZstdCompressionOptions): StatefulTransform;
/**
* Create a Zstandard compression transform. Output is compatible with
* `zlib.zstdDecompress()` and `decompressZstd()`/`decompressZstdSync()`.
* @since v25.9.0
* @returns A stateful transform.
*/
function compressZstdSync(options?: ZstdCompressionOptions): SyncStatefulTransform;
/**
* Create a Brotli decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressBrotli(options?: BrotliOptions): StatefulTransform;
/**
* Create a Brotli decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressBrotliSync(options?: BrotliOptions): SyncStatefulTransform;
/**
* Create a deflate decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressDeflate(options?: ZlibOptions): StatefulTransform;
/**
* Create a deflate decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressDeflateSync(options?: ZlibOptions): SyncStatefulTransform;
/**
* Create a gzip decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressGzip(options?: ZlibOptions): StatefulTransform;
/**
* Create a gzip decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressGzipSync(options?: ZlibOptions): SyncStatefulTransform;
/**
* Create a Zstandard decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressZstd(options?: ZstdOptions): StatefulTransform;
/**
* Create a Zstandard decompression transform.
* @since v25.9.0
* @returns A stateful transform.
*/
function decompressZstdSync(options?: ZstdOptions): SyncStatefulTransform;
}
declare module "zlib/iter" {
export * from "node:zlib/iter";
}
+108
-0

@@ -495,2 +495,71 @@ declare module "node:async_hooks" {

/**
* Creates a disposable scope that enters the given store and automatically
* restores the previous store value when the scope is disposed. This method is
* designed to work with JavaScript's explicit resource management (`using` syntax).
*
* Example:
*
* ```js
* import { AsyncLocalStorage } from 'node:async_hooks';
*
* const asyncLocalStorage = new AsyncLocalStorage();
*
* {
* using _ = asyncLocalStorage.withScope('my-store');
* console.log(asyncLocalStorage.getStore()); // Prints: my-store
* }
*
* console.log(asyncLocalStorage.getStore()); // Prints: undefined
* ```
*
* The `withScope()` method is particularly useful for managing context in
* synchronous code where you want to ensure the previous store value is restored
* when exiting a block, even if an error is thrown.
*
* ```js
* import { AsyncLocalStorage } from 'node:async_hooks';
*
* const asyncLocalStorage = new AsyncLocalStorage();
*
* try {
* using _ = asyncLocalStorage.withScope('my-store');
* console.log(asyncLocalStorage.getStore()); // Prints: my-store
* throw new Error('test');
* } catch (e) {
* // Store is automatically restored even after error
* console.log(asyncLocalStorage.getStore()); // Prints: undefined
* }
* ```
*
* **Important:** When using `withScope()` in async functions before the first
* `await`, be aware that the scope change will affect the caller's context. The
* synchronous portion of an async function (before the first `await`) runs
* immediately when called, and when it reaches the first `await`, it returns the
* promise to the caller. At that point, the scope change becomes visible in the
* caller's context and will persist in subsequent synchronous code until something
* else changes the scope value. For async operations, prefer using `run()` which
* properly isolates context across async boundaries.
*
* ```js
* import { AsyncLocalStorage } from 'node:async_hooks';
*
* const asyncLocalStorage = new AsyncLocalStorage();
*
* async function example() {
* using _ = asyncLocalStorage.withScope('my-store');
* console.log(asyncLocalStorage.getStore()); // Prints: my-store
* await someAsyncOperation(); // Function pauses here and returns promise
* console.log(asyncLocalStorage.getStore()); // Prints: my-store
* }
*
* // Calling without await
* example(); // Synchronous portion runs, then pauses at first await
* // After the promise is returned, the scope 'my-store' is now active in caller!
* console.log(asyncLocalStorage.getStore()); // Prints: my-store (unexpected!)
* ```
* @since v25.9.0
* @experimental
*/
withScope(store: T): RunScope;
/**
* Transitions into the context for the remainder of the current

@@ -538,2 +607,41 @@ * synchronous execution and then persists the store through any following

/**
* A disposable scope returned by `asyncLocalStorage.withScope()` that
* automatically restores the previous store value when disposed. This class
* implements the [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management) protocol and is designed to work
* with JavaScript's `using` syntax.
*
* The scope automatically restores the previous store value when the `using` block
* exits, whether through normal completion or by throwing an error.
* @since v25.9.0
* @experimental
*/
interface RunScope extends Disposable {
/**
* Explicitly ends the scope and restores the previous store value. This method
* is idempotent: calling it multiple times has the same effect as calling it once.
*
* The `[Symbol.dispose]()` method defers to `dispose()`.
*
* If `withScope()` is called without the `using` keyword, `dispose()` must be
* called manually to restore the previous store value. Forgetting to call
* `dispose()` will cause the store value to persist for the remainder of the
* current execution context:
*
* ```js
* import { AsyncLocalStorage } from 'node:async_hooks';
*
* const storage = new AsyncLocalStorage();
*
* // Without using, the scope must be disposed manually
* const scope = storage.withScope('my-store');
* // storage.getStore() === 'my-store' here
*
* scope.dispose(); // Restore previous value
* // storage.getStore() === undefined here
* ```
* @since v25.9.0
*/
dispose(): void;
}
/**
* @since v17.2.0, v16.14.0

@@ -540,0 +648,0 @@ * @return A map of provider types to the corresponding numeric id.

@@ -40,2 +40,3 @@ declare module "node:fs/promises" {

import { Stream } from "node:stream";
import { ByteReadableStream, Transform, Writer } from "node:stream/iter";
import { ReadableStream } from "node:stream/web";

@@ -89,2 +90,53 @@ interface FileChangeInfo<T extends string | Buffer> {

}
interface PullOptions extends Abortable {
/**
* Close the file handle when the stream ends.
* @default false
*/
autoClose?: boolean | undefined;
/**
* Byte offset to begin reading from. When specified,
* reads use explicit positioning (`pread` semantics).
*/
start?: number | undefined;
/**
* Maximum number of bytes to read before ending the
* iterator. Reads stop when `limit` bytes have been delivered or EOF is
* reached, whichever comes first.
*/
limit?: number | undefined;
/**
* Size in bytes of the buffer allocated for each
* read operation.
* @default 131072
*/
chunkSize?: number | undefined;
}
interface WriterOptions {
/**
* Close the file handle when the writer ends or fails.
* @default false
*/
autoClose?: boolean | undefined;
/**
* Byte offset to start writing at. When specified,
* writes use explicit positioning.
*/
start?: number | undefined;
/**
* Maximum number of bytes the writer will accept.
* Async writes (`write()`, `writev()`) that would exceed the limit reject
* with `ERR_OUT_OF_RANGE`. Sync writes (`writeSync()`, `writevSync()`)
* return `false`.
*/
limit?: number | undefined;
/**
* Maximum chunk size in bytes for synchronous write
* operations. Writes larger than this threshold fall back to async I/O.
* Set this to match the reader's `chunkSize` for optimal `pipeTo()`
* performance.
* @default 131072
*/
chunkSize?: number | undefined;
}
// TODO: Add `EventEmitter` close

@@ -208,2 +260,37 @@ interface FileHandle {

/**
* Return the file contents as an async iterable using the
* [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) pull model. Reads are performed in `chunkSize`-byte
* chunks (default 128 KB). If transforms are provided, they are applied
* via [`stream/iter pull()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pullsource-transforms-options).
*
* The file handle is locked while the iterable is being consumed and unlocked
* when iteration completes, an error occurs, or the consumer breaks.
*
* This function is only available when the `--experimental-stream-iter` flag is
* enabled.
*
* ```js
* import { open } from 'node:fs/promises';
* import { text } from 'node:stream/iter';
* import { compressGzip } from 'node:zlib/iter';
*
* const fh = await open('input.txt', 'r');
*
* // Read as text
* console.log(await text(fh.pull({ autoClose: true })));
*
* // Read 1 KB starting at byte 100
* const fh2 = await open('input.txt', 'r');
* console.log(await text(fh2.pull({ start: 100, limit: 1024, autoClose: true })));
*
* // Read with compression
* const fh3 = await open('input.txt', 'r');
* const compressed = fh3.pull(compressGzip(), { autoClose: true });
* ```
* @since v25.9.0
* @experimental
*/
pull(...transforms: Transform[]): ByteReadableStream;
pull(...args: [...transforms: Transform[], options: PullOptions]): ByteReadableStream;
/**
* Request that all data for the open file descriptor is flushed to the storage

@@ -457,2 +544,41 @@ * device. The specific implementation is operating system and device specific.

/**
* Return a [`node:stream/iter`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html) writer backed by this file handle.
*
* The writer supports both `Symbol.asyncDispose` and `Symbol.dispose`:
*
* * `await using w = fh.writer()` — if the writer is still open (no `end()`
* called), `asyncDispose` calls `fail()`. If `end()` is pending, it waits
* for it to complete.
* * `using w = fh.writer()` — calls `fail()` unconditionally.
*
* The `writeSync()` and `writevSync()` methods enable the try-sync fast path
* used by [`stream/iter pipeTo()`](https://nodejs.org/docs/latest-v25.x/api/stream_iter.html#pipetosource-transforms-writer). When the reader's chunk size matches the
* writer's `chunkSize`, all writes in a `pipeTo()` pipeline complete
* synchronously with zero promise overhead.
*
* This function is only available when the `--experimental-stream-iter` flag is
* enabled.
*
* ```js
* import { open } from 'node:fs/promises';
* import { from, pipeTo } from 'node:stream/iter';
* import { compressGzip } from 'node:zlib/iter';
*
* // Async pipeline
* const fh = await open('output.gz', 'w');
* await pipeTo(from('Hello!'), compressGzip(), fh.writer({ autoClose: true }));
*
* // Sync pipeline with limit
* const src = await open('input.txt', 'r');
* const dst = await open('output.txt', 'w');
* const w = dst.writer({ limit: 1024 * 1024 }); // Max 1 MB
* await pipeTo(src.pull({ autoClose: true }), w);
* await w.end();
* await dst.close();
* ```
* @since v25.9.0
* @experimental
*/
writer(options?: WriterOptions): Writer;
/**
* Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s

@@ -459,0 +585,0 @@ * @since v13.13.0, v12.17.0

+2
-0

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

/// <reference path="stream/consumers.d.ts" />
/// <reference path="stream/iter.d.ts" />
/// <reference path="stream/promises.d.ts" />

@@ -117,1 +118,2 @@ /// <reference path="stream/web.d.ts" />

/// <reference path="zlib.d.ts" />
/// <reference path="zlib/iter.d.ts" />

@@ -221,2 +221,3 @@ declare module "node:module" {

* @since v20.6.0, v18.19.0
* @deprecated Use `module.registerHooks()` instead.
* @param specifier Customization hooks to be registered; this should be

@@ -223,0 +224,0 @@ * the same string that would be passed to `import()`, except that if it is

+2
-2
{
"name": "@types/node",
"version": "25.8.0",
"version": "25.9.0",
"description": "TypeScript definitions for node",

@@ -153,4 +153,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"peerDependencies": {},
"typesPublisherContentHash": "e3b0c76dfc9cc84424890451a36d8ae1dbc86b0b0e49cc458f2a886fda8e4649",
"typesPublisherContentHash": "2c46dd4d6ce51acbd418cda854101b97987beaea870ba7b8c1a22436b4a0a28c",
"typeScriptVersion": "5.3"
}

@@ -182,3 +182,3 @@ declare module "node:quic" {

*/
keys?: KeyObject | webcrypto.CryptoKey | ReadonlyArray<KeyObject | webcrypto.CryptoKey> | undefined;
keys?: KeyObject | readonly KeyObject[] | undefined;
/**

@@ -657,3 +657,3 @@ * Specifies the maximum UDP packet payload size.

* If the datagram payload is specified as an `ArrayBufferView`, then ownership of
* that view will be transfered to the underlying stream.
* that view will be transferred to the underlying stream.
* @since v23.8.0

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

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

### Additional Details
* Last updated: Thu, 14 May 2026 16:39:50 GMT
* Last updated: Mon, 18 May 2026 12:43:58 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

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

@@ -89,2 +89,17 @@ declare module "node:repl" {

breakEvalOnSigint?: boolean | undefined;
/**
* This function customizes error handling in the REPL.
* It receives the thrown exception as its first argument and must return one
* of the following values synchronously:
* * `'print'` to print the error to the output stream (default behavior).
* * `'ignore'` to skip all remaining error handling.
* * `'unhandled'` to treat the exception as fully unhandled. In this case,
* the error will be passed to process-wide exception handlers, such as
* the `'uncaughtException'` event.
* The `'unhandled'` value may or may not be desirable in situations
* where the `REPLServer` instance has been closed, depending on the particular
* use case.
* @since v25.9.0
*/
handleError?: ((err: unknown) => "print" | "ignore" | "unhandled") | undefined;
}

@@ -91,0 +106,0 @@ type REPLEval = (

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

/// <reference path="../stream/consumers.d.ts" />
/// <reference path="../stream/iter.d.ts" />
/// <reference path="../stream/promises.d.ts" />

@@ -119,1 +120,2 @@ /// <reference path="../stream/web.d.ts" />

/// <reference path="../zlib.d.ts" />
/// <reference path="../zlib/iter.d.ts" />

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

/// <reference path="../stream/consumers.d.ts" />
/// <reference path="../stream/iter.d.ts" />
/// <reference path="../stream/promises.d.ts" />

@@ -119,1 +120,2 @@ /// <reference path="../stream/web.d.ts" />

/// <reference path="../zlib.d.ts" />
/// <reference path="../zlib/iter.d.ts" />

@@ -235,7 +235,8 @@ declare module "node:vm" {

* 2. If `contextObject` is an object, contextifies it with the new context.
* If `contextObject` is undefined, creates a new object and contextifies it.
* If `contextObject` is undefined, creates a new object and contextifies it.
* If `contextObject` is `vm.constants.DONT_CONTEXTIFY`, don't contextify anything.
* 3. Runs the compiled code contained by the `vm.Script` object within the created context. The code
* does not have access to the scope in which this method is called.
* 4. Returns the result.
* 3. Compiles the code as a `vm.Script`
* 4. Runs the compiled code within the created context. The code does not have access to the scope in
* which this method is called.
* 5. Returns the result.
*

@@ -242,0 +243,0 @@ * The following example compiles code that sets a global variable, then executes

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