Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1878
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 20.9.2 to 20.10.4

4

node/assert.d.ts

@@ -48,3 +48,3 @@ /**

/** If provided, the generated stack trace omits frames before this function. */
// tslint:disable-next-line:ban-types
// eslint-disable-next-line @typescript-eslint/ban-types
stackStartFn?: Function | undefined;

@@ -232,3 +232,3 @@ });

operator?: string,
// tslint:disable-next-line:ban-types
// eslint-disable-next-line @typescript-eslint/ban-types
stackStartFn?: Function,

@@ -235,0 +235,0 @@ ): never;

@@ -253,3 +253,3 @@ /**

*/
table(tabularData: any, properties?: ReadonlyArray<string>): void;
table(tabularData: any, properties?: readonly string[]): void;
/**

@@ -256,0 +256,0 @@ * Starts a timer that can be used to compute the duration of an operation. Timers

@@ -345,3 +345,3 @@ /**

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
port?: number,

@@ -352,3 +352,3 @@ address?: string,

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
port?: number,

@@ -358,3 +358,3 @@ callback?: (error: Error | null, bytes: number) => void,

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
callback?: (error: Error | null, bytes: number) => void,

@@ -507,3 +507,3 @@ ): void;

*
* Calling `socket.unref()` multiple times will have no addition effect.
* Calling `socket.unref()` multiple times will have no additional effect.
*

@@ -510,0 +510,0 @@ * The `socket.unref()` method returns a reference to the socket so calls can be

@@ -664,3 +664,3 @@ /**

*/
export function setServers(servers: ReadonlyArray<string>): void;
export function setServers(servers: readonly string[]): void;
/**

@@ -667,0 +667,0 @@ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),

@@ -311,2 +311,10 @@ /**

/**
* Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* @since v20.1.0
*/
function getDefaultResultOrder(): "ipv4first" | "verbatim";
/**
* Sets the IP address and port of servers to be used when performing DNS

@@ -337,3 +345,3 @@ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted

*/
function setServers(servers: ReadonlyArray<string>): void;
function setServers(servers: readonly string[]): void;
/**

@@ -340,0 +348,0 @@ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:

@@ -473,9 +473,37 @@ /**

/**
* Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that require
* manual async tracking. Specifically, all events emitted by instances of
* `EventEmitterAsyncResource` will run within its async context.
* Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that
* require manual async tracking. Specifically, all events emitted by instances
* of `events.EventEmitterAsyncResource` will run within its `async context`.
*
* The EventEmitterAsyncResource class has the same methods and takes the
* same options as EventEmitter and AsyncResource themselves.
* @throws if `options.name` is not provided when instantiated directly.
* ```js
* import { EventEmitterAsyncResource, EventEmitter } from 'node:events';
* import { notStrictEqual, strictEqual } from 'node:assert';
* import { executionAsyncId, triggerAsyncId } from 'node:async_hooks';
*
* // Async tracking tooling will identify this as 'Q'.
* const ee1 = new EventEmitterAsyncResource({ name: 'Q' });
*
* // 'foo' listeners will run in the EventEmitters async context.
* ee1.on('foo', () => {
* strictEqual(executionAsyncId(), ee1.asyncId);
* strictEqual(triggerAsyncId(), ee1.triggerAsyncId);
* });
*
* const ee2 = new EventEmitter();
*
* // 'foo' listeners on ordinary EventEmitters that do not track async
* // context, however, run in the same async context as the emit().
* ee2.on('foo', () => {
* notStrictEqual(executionAsyncId(), ee2.asyncId);
* notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId);
* });
*
* Promise.resolve().then(() => {
* ee1.emit('foo');
* ee2.emit('foo');
* });
* ```
*
* The `EventEmitterAsyncResource` class has the same methods and takes the
* same options as `EventEmitter` and `AsyncResource` themselves.
* @since v17.4.0, v16.14.0

@@ -489,13 +517,20 @@ */

/**
* Call all destroy hooks. This should only ever be called once. An
* error will be thrown if it is called more than once. This must be
* manually called. If the resource is left to be collected by the GC then
* the destroy hooks will never be called.
* Call all `destroy` hooks. This should only ever be called once. An error will
* be thrown if it is called more than once. This **must** be manually called. If
* the resource is left to be collected by the GC then the `destroy` hooks will
* never be called.
*/
emitDestroy(): void;
/** The unique asyncId assigned to the resource. */
/**
* The unique `asyncId` assigned to the resource.
*/
readonly asyncId: number;
/** The same triggerAsyncId that is passed to the AsyncResource constructor. */
/**
* The same triggerAsyncId that is passed to the AsyncResource constructor.
*/
readonly triggerAsyncId: number;
/** The underlying AsyncResource */
/**
* The returned `AsyncResource` object has an additional `eventEmitter` property
* that provides a reference to this `EventEmitterAsyncResource`.
*/
readonly asyncResource: EventEmitterReferencingAsyncResource;

@@ -502,0 +537,0 @@ }

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

highWaterMark?: number | undefined;
flush?: boolean | undefined;
}

@@ -111,3 +112,6 @@ interface ReadableWebStreamOptions {

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
options?:
| (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined })
| BufferEncoding
| null,
): Promise<void>;

@@ -371,3 +375,3 @@ /**

/**
* Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
* Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success.
* @since v10.0.0

@@ -380,3 +384,3 @@ */

* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
* The promise is resolved with no arguments upon success.
* The promise is fulfilled with no arguments upon success.
*

@@ -388,3 +392,3 @@ * If `options` is a string, then it specifies the `encoding`.

* It is unsafe to use `filehandle.writeFile()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected).
* without waiting for the promise to be fulfilled (or rejected).
*

@@ -398,3 +402,6 @@ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null,
options?:
| (ObjectEncodingOptions & FlagAndOpenMode & Abortable & { flush?: boolean | undefined })
| BufferEncoding
| null,
): Promise<void>;

@@ -404,6 +411,6 @@ /**

*
* The promise is resolved with an object containing two properties:
* The promise is fulfilled with an object containing two properties:
*
* It is unsafe to use `filehandle.write()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected). For this
* without waiting for the promise to be fulfilled (or rejected). For this
* scenario, use `filehandle.createWriteStream()`.

@@ -440,6 +447,6 @@ *

*
* The promise is resolved with an object containing a two properties:
* The promise is fulfilled with an object containing a two properties:
*
* It is unsafe to call `writev()` multiple times on the same file without waiting
* for the promise to be resolved (or rejected).
* for the promise to be fulfilled (or rejected).
*

@@ -453,3 +460,3 @@ * On Linux, positional writes don't work when the file is opened in append mode.

*/
writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
/**

@@ -461,3 +468,3 @@ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s

*/
readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
/**

@@ -495,3 +502,3 @@ * Closes the file handle after waiting for any pending operation on the handle to

*
* If the accessibility check is successful, the promise is resolved with no
* If the accessibility check is successful, the promise is fulfilled with no
* value. If any of the accessibility checks fail, the promise is rejected

@@ -659,3 +666,3 @@ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and

*
* If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
* If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects.
*

@@ -730,3 +737,3 @@ * ```js

* Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
* resolved with the`linkString` upon success.
* fulfilled with the`linkString` upon success.
*

@@ -1038,3 +1045,3 @@ * The optional `options` argument can be a string specifying an encoding, or an

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
): Promise<void>;

@@ -1041,0 +1048,0 @@ /**

@@ -1,381 +0,385 @@

// Declare "static" methods in Error
interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
export {}; // Make this a module
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
// #region Fetch and friends
// Conditional type aliases, used at the end of this file.
// Will either be empty if lib-dom is included, or the undici version otherwise.
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").ResponseInit;
type _File = typeof globalThis extends { onmessage: any } ? {} : import("node:buffer").File;
// #endregion Fetch and friends
stackTraceLimit: number;
}
declare global {
// Declare "static" methods in Error
interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
/*-----------------------------------------------*
* *
* GLOBAL *
* *
------------------------------------------------*/
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
// For backwards compability
interface NodeRequire extends NodeJS.Require {}
interface RequireResolve extends NodeJS.RequireResolve {}
interface NodeModule extends NodeJS.Module {}
stackTraceLimit: number;
}
declare var process: NodeJS.Process;
declare var console: Console;
/*-----------------------------------------------*
* *
* GLOBAL *
* *
------------------------------------------------*/
declare var __filename: string;
declare var __dirname: string;
// For backwards compability
interface NodeRequire extends NodeJS.Require {}
interface RequireResolve extends NodeJS.RequireResolve {}
interface NodeModule extends NodeJS.Module {}
declare var require: NodeRequire;
declare var module: NodeModule;
var process: NodeJS.Process;
var console: Console;
// Same as module.exports
declare var exports: any;
var __filename: string;
var __dirname: string;
/**
* Only available if `--expose-gc` is passed to the process.
*/
declare var gc: undefined | (() => void);
var require: NodeRequire;
var module: NodeModule;
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
interface AbortController {
/**
* Returns the AbortSignal object associated with this object.
*/
// Same as module.exports
var exports: any;
readonly signal: AbortSignal;
/**
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
* Only available if `--expose-gc` is passed to the process.
*/
abort(reason?: any): void;
}
var gc: undefined | (() => void);
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
/**
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
readonly aborted: boolean;
readonly reason: any;
onabort: null | ((this: AbortSignal, event: Event) => any);
throwIfAborted(): void;
}
declare var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
: {
prototype: AbortController;
new(): AbortController;
};
declare var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
timeout(milliseconds: number): AbortSignal;
};
// #endregion borrowed
// #region Disposable
interface SymbolConstructor {
/**
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
readonly dispose: unique symbol;
/**
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
readonly asyncDispose: unique symbol;
}
interface Disposable {
[Symbol.dispose](): void;
}
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
// #endregion Disposable
// #region ArrayLike.at()
interface RelativeIndexable<T> {
/**
* Takes an integer value and returns the item at that index,
* allowing for positive and negative integers.
* Negative integers count back from the last item in the array.
*/
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> {}
// #endregion ArrayLike.at() end
/**
* @since v17.0.0
*
* Creates a deep clone of an object.
*/
declare function structuredClone<T>(
value: T,
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
): T;
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
* *
*-----------------------------------------------*/
declare namespace NodeJS {
interface CallSite {
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
interface AbortController {
/**
* Value of "this"
* Returns the AbortSignal object associated with this object.
*/
getThis(): unknown;
readonly signal: AbortSignal;
/**
* Type of "this" as a string.
* This is the name of the function stored in the constructor field of
* "this", if available. Otherwise the object's [[Class]] internal
* property.
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
*/
getTypeName(): string | null;
abort(reason?: any): void;
}
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
/**
* Current function
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
getFunction(): Function | undefined;
readonly aborted: boolean;
readonly reason: any;
onabort: null | ((this: AbortSignal, event: Event) => any);
throwIfAborted(): void;
}
/**
* Name of the current function, typically its name property.
* If a name property is not available an attempt will be made to try
* to infer a name from the function's context.
*/
getFunctionName(): string | null;
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
: {
prototype: AbortController;
new(): AbortController;
};
/**
* Name of the property [of "this" or one of its prototypes] that holds
* the current function
*/
getMethodName(): string | null;
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
timeout(milliseconds: number): AbortSignal;
};
// #endregion borrowed
// #region Disposable
interface SymbolConstructor {
/**
* Name of the script [if this function was defined in a script]
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
getFileName(): string | undefined;
readonly dispose: unique symbol;
/**
* Current line number [if this function was defined in a script]
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
getLineNumber(): number | null;
readonly asyncDispose: unique symbol;
}
/**
* Current column number [if this function was defined in a script]
*/
getColumnNumber(): number | null;
interface Disposable {
[Symbol.dispose](): void;
}
/**
* A call site object representing the location where eval was called
* [if this function was created using a call to eval]
*/
getEvalOrigin(): string | undefined;
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
// #endregion Disposable
// #region ArrayLike.at()
interface RelativeIndexable<T> {
/**
* Is this a toplevel invocation, that is, is "this" the global object?
* Takes an integer value and returns the item at that index,
* allowing for positive and negative integers.
* Negative integers count back from the last item in the array.
*/
isToplevel(): boolean;
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> {}
// #endregion ArrayLike.at() end
/**
* Does this call take place in code defined by a call to eval?
*/
isEval(): boolean;
/**
* @since v17.0.0
*
* Creates a deep clone of an object.
*/
function structuredClone<T>(
value: T,
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
): T;
/**
* Is this call in native V8 code?
*/
isNative(): boolean;
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
* *
*-----------------------------------------------*/
namespace NodeJS {
interface CallSite {
/**
* Value of "this"
*/
getThis(): unknown;
/**
* Is this a constructor call?
*/
isConstructor(): boolean;
}
/**
* Type of "this" as a string.
* This is the name of the function stored in the constructor field of
* "this", if available. Otherwise the object's [[Class]] internal
* property.
*/
getTypeName(): string | null;
interface ErrnoException extends Error {
errno?: number | undefined;
code?: string | undefined;
path?: string | undefined;
syscall?: string | undefined;
}
/**
* Current function
*/
getFunction(): Function | undefined;
interface ReadableStream extends EventEmitter {
readable: boolean;
read(size?: number): string | Buffer;
setEncoding(encoding: BufferEncoding): this;
pause(): this;
resume(): this;
isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
wrap(oldStream: ReadableStream): this;
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
}
/**
* Name of the current function, typically its name property.
* If a name property is not available an attempt will be made to try
* to infer a name from the function's context.
*/
getFunctionName(): string | null;
interface WritableStream extends EventEmitter {
writable: boolean;
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
end(cb?: () => void): this;
end(data: string | Uint8Array, cb?: () => void): this;
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
}
/**
* Name of the property [of "this" or one of its prototypes] that holds
* the current function
*/
getMethodName(): string | null;
interface ReadWriteStream extends ReadableStream, WritableStream {}
/**
* Name of the script [if this function was defined in a script]
*/
getFileName(): string | undefined;
interface RefCounted {
ref(): this;
unref(): this;
}
/**
* Current line number [if this function was defined in a script]
*/
getLineNumber(): number | null;
type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| BigUint64Array
| BigInt64Array
| Float32Array
| Float64Array;
type ArrayBufferView = TypedArray | DataView;
/**
* Current column number [if this function was defined in a script]
*/
getColumnNumber(): number | null;
interface Require {
(id: string): any;
resolve: RequireResolve;
cache: Dict<NodeModule>;
/**
* @deprecated
*/
extensions: RequireExtensions;
main: Module | undefined;
}
/**
* A call site object representing the location where eval was called
* [if this function was created using a call to eval]
*/
getEvalOrigin(): string | undefined;
interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;
}
/**
* Is this a toplevel invocation, that is, is "this" the global object?
*/
isToplevel(): boolean;
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}
interface Module {
/**
* `true` if the module is running during the Node.js preload
*/
isPreloading: boolean;
exports: any;
require: Require;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
parent: Module | null | undefined;
children: Module[];
/**
* @since v11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
/**
* Does this call take place in code defined by a call to eval?
*/
isEval(): boolean;
interface Dict<T> {
[key: string]: T | undefined;
}
/**
* Is this call in native V8 code?
*/
isNative(): boolean;
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
/**
* Is this a constructor call?
*/
isConstructor(): boolean;
}
namespace fetch {
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type Request = globalThis.Request;
type Response = globalThis.Response;
type Headers = globalThis.Headers;
type FormData = globalThis.FormData;
type RequestInit = globalThis.RequestInit;
type RequestInfo = import("undici-types").RequestInfo;
type HeadersInit = import("undici-types").HeadersInit;
type BodyInit = import("undici-types").BodyInit;
type RequestRedirect = import("undici-types").RequestRedirect;
type RequestCredentials = import("undici-types").RequestCredentials;
type RequestMode = import("undici-types").RequestMode;
type ReferrerPolicy = import("undici-types").ReferrerPolicy;
type Dispatcher = import("undici-types").Dispatcher;
type RequestDuplex = import("undici-types").RequestDuplex;
interface ErrnoException extends Error {
errno?: number | undefined;
code?: string | undefined;
path?: string | undefined;
syscall?: string | undefined;
}
interface ReadableStream extends EventEmitter {
readable: boolean;
read(size?: number): string | Buffer;
setEncoding(encoding: BufferEncoding): this;
pause(): this;
resume(): this;
isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
wrap(oldStream: ReadableStream): this;
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
}
interface WritableStream extends EventEmitter {
writable: boolean;
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
end(cb?: () => void): this;
end(data: string | Uint8Array, cb?: () => void): this;
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
}
interface ReadWriteStream extends ReadableStream, WritableStream {}
interface RefCounted {
ref(): this;
unref(): this;
}
type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| BigUint64Array
| BigInt64Array
| Float32Array
| Float64Array;
type ArrayBufferView = TypedArray | DataView;
interface Require {
(id: string): any;
resolve: RequireResolve;
cache: Dict<NodeModule>;
/**
* @deprecated
*/
extensions: RequireExtensions;
main: Module | undefined;
}
interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;
}
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}
interface Module {
/**
* `true` if the module is running during the Node.js preload
*/
isPreloading: boolean;
exports: any;
require: Require;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
parent: Module | null | undefined;
children: Module[];
/**
* @since v11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
interface Dict<T> {
[key: string]: T | undefined;
}
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
}
}
interface RequestInit extends NodeJS.fetch._RequestInit {}
interface RequestInit extends _RequestInit {}
declare function fetch(
input: NodeJS.fetch.RequestInfo,
init?: RequestInit,
): Promise<Response>;
function fetch(
input: string | URL | globalThis.Request,
init?: RequestInit,
): Promise<Response>;
interface Request extends NodeJS.fetch._Request {}
declare var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Request extends _Request {}
var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Response extends NodeJS.fetch._Response {}
declare var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface ResponseInit extends _ResponseInit {}
interface FormData extends NodeJS.fetch._FormData {}
declare var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Response extends _Response {}
var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface Headers extends NodeJS.fetch._Headers {}
declare var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;
interface FormData extends _FormData {}
var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Headers extends _Headers {}
var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;
interface File extends _File {}
var File: typeof globalThis extends {
onmessage: any;
File: infer T;
} ? T
: typeof import("node:buffer").File;
}

@@ -125,3 +125,5 @@ /**

}
interface ImportAssertions extends NodeJS.Dict<string> {
/** @deprecated Use `ImportAttributes` instead */
interface ImportAssertions extends ImportAttributes {}
interface ImportAttributes extends NodeJS.Dict<string> {
type?: string | undefined;

@@ -159,5 +161,9 @@ }

/**
* @deprecated Use `importAttributes` instead
*/
importAssertions: ImportAttributes;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAssertions: ImportAssertions;
importAttributes: ImportAttributes;
/**

@@ -174,6 +180,10 @@ * The module importing this one, or undefined if this is the Node.js entry point

/**
* The import assertions to use when caching the module (optional; if excluded the input will be used)
* @deprecated Use `importAttributes` instead
*/
importAssertions?: ImportAssertions | undefined;
importAssertions?: ImportAttributes | undefined;
/**
* The import attributes to use when caching the module (optional; if excluded the input will be used)
*/
importAttributes?: ImportAttributes | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.

@@ -215,5 +225,9 @@ * @default false

/**
* @deprecated Use `importAttributes` instead
*/
importAssertions: ImportAttributes;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAssertions: ImportAssertions;
importAttributes: ImportAttributes;
}

@@ -220,0 +234,0 @@ interface LoadFnOutput {

@@ -403,3 +403,4 @@ /**

* Returns the operating system CPU architecture for which the Node.js binary was
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
* and `'x64'`.
*

@@ -406,0 +407,0 @@ * The return value is equivalent to `process.arch`.

{
"name": "@types/node",
"version": "20.9.2",
"version": "20.10.4",
"description": "TypeScript definitions for node",

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

},
"typesPublisherContentHash": "24437ac82ce1804878c3e265b2d5ef55f5f475c0333622a181647c43bd4d835e",
"typeScriptVersion": "4.5",
"typesPublisherContentHash": "70306276c79ea3801d82ca605703455f07ca61a9ef7d05f547ee2671f6bc5712",
"typeScriptVersion": "4.6",
"nonNpm": true
}

@@ -463,3 +463,3 @@ /**

| {
entryTypes: ReadonlyArray<EntryType>;
entryTypes: readonly EntryType[];
buffered?: boolean | undefined;

@@ -466,0 +466,0 @@ }

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

*/
encode(codePoints: ReadonlyArray<number>): string;
encode(codePoints: readonly number[]): string;
}

@@ -107,0 +107,0 @@ /**

@@ -28,5 +28,5 @@ /**

| boolean
| ReadonlyArray<string>
| ReadonlyArray<number>
| ReadonlyArray<boolean>
| readonly string[]
| readonly number[]
| readonly boolean[]
| null

@@ -33,0 +33,0 @@ >

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

### Additional Details
* Last updated: Sat, 18 Nov 2023 20:07:14 GMT
* Last updated: Thu, 07 Dec 2023 07:07:09 GMT
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)

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

@@ -21,3 +21,3 @@ /**

* and is considered passing otherwise.
* 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` resolves.
* 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` fulfills.
* 3. A function that receives a callback function. If the callback receives any

@@ -44,3 +44,3 @@ * truthy value as its first argument, the test is considered failing. If a

* // This test passes because the Promise returned by the async
* // function is not rejected.
* // function is settled and not rejected.
* assert.strictEqual(1, 1);

@@ -109,4 +109,4 @@ * });

*
* `test()` returns a `Promise` that resolves once the test completes.
* if `test()` is called within a `describe()` block, it resolve immediately.
* `test()` returns a `Promise` that fulfills once the test completes.
* if `test()` is called within a `describe()` block, it fulfills immediately.
* The return value can usually be discarded for top level tests.

@@ -138,3 +138,3 @@ * However, the return value from subtests should be used to prevent the parent

* second argument.
* @return Resolved with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
* @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
*/

@@ -141,0 +141,0 @@ function test(name?: string, fn?: TestFn): Promise<void>;

@@ -158,3 +158,3 @@ /**

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;

@@ -191,3 +191,3 @@ namespace setTimeout {

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;

@@ -226,3 +226,3 @@ namespace setInterval {

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setImmediate(callback: (args: void) => void): NodeJS.Immediate;

@@ -229,0 +229,0 @@ namespace setImmediate {

@@ -1206,3 +1206,3 @@ /**

*/
const rootCertificates: ReadonlyArray<string>;
const rootCertificates: readonly string[];
}

@@ -1209,0 +1209,0 @@ declare module "node:tls" {

@@ -48,3 +48,3 @@ /**

/** If provided, the generated stack trace omits frames before this function. */
// tslint:disable-next-line:ban-types
// eslint-disable-next-line @typescript-eslint/ban-types
stackStartFn?: Function | undefined;

@@ -232,3 +232,3 @@ });

operator?: string,
// tslint:disable-next-line:ban-types
// eslint-disable-next-line @typescript-eslint/ban-types
stackStartFn?: Function,

@@ -235,0 +235,0 @@ ): never;

@@ -253,3 +253,3 @@ /**

*/
table(tabularData: any, properties?: ReadonlyArray<string>): void;
table(tabularData: any, properties?: readonly string[]): void;
/**

@@ -256,0 +256,0 @@ * Starts a timer that can be used to compute the duration of an operation. Timers

@@ -345,3 +345,3 @@ /**

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
port?: number,

@@ -352,3 +352,3 @@ address?: string,

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
port?: number,

@@ -358,3 +358,3 @@ callback?: (error: Error | null, bytes: number) => void,

send(
msg: string | Uint8Array | ReadonlyArray<any>,
msg: string | Uint8Array | readonly any[],
callback?: (error: Error | null, bytes: number) => void,

@@ -507,3 +507,3 @@ ): void;

*
* Calling `socket.unref()` multiple times will have no addition effect.
* Calling `socket.unref()` multiple times will have no additional effect.
*

@@ -510,0 +510,0 @@ * The `socket.unref()` method returns a reference to the socket so calls can be

@@ -664,3 +664,3 @@ /**

*/
export function setServers(servers: ReadonlyArray<string>): void;
export function setServers(servers: readonly string[]): void;
/**

@@ -667,0 +667,0 @@ * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),

@@ -311,2 +311,10 @@ /**

/**
* Get the default value for `verbatim` in {@link lookup} and `dnsPromises.lookup()`. The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* @since v20.1.0
*/
function getDefaultResultOrder(): "ipv4first" | "verbatim";
/**
* Sets the IP address and port of servers to be used when performing DNS

@@ -337,3 +345,3 @@ * resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted

*/
function setServers(servers: ReadonlyArray<string>): void;
function setServers(servers: readonly string[]): void;
/**

@@ -340,0 +348,0 @@ * Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:

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

declare module "events" {
import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
// NOTE: This class is in the docs but is **not actually exported** by Node.

@@ -111,2 +112,5 @@ // If https://github.com/nodejs/node/issues/39903 gets resolved and Node

constructor(options?: EventEmitterOptions);
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
/**

@@ -383,3 +387,3 @@ * Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given

* @experimental
* @return that removes the `abort` listener.
* @return Disposable that removes the `abort` listener.
*/

@@ -457,2 +461,80 @@ static addAbortListener(signal: AbortSignal, resource: (event: Event) => void): Disposable;

}
export interface EventEmitterReferencingAsyncResource extends AsyncResource {
readonly eventEmitter: EventEmitterAsyncResource;
}
export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
/**
* The type of async event, this is required when instantiating `EventEmitterAsyncResource`
* directly rather than as a child class.
* @default new.target.name if instantiated as a child class.
*/
name?: string;
}
/**
* Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that
* require manual async tracking. Specifically, all events emitted by instances
* of `events.EventEmitterAsyncResource` will run within its `async context`.
*
* ```js
* import { EventEmitterAsyncResource, EventEmitter } from 'node:events';
* import { notStrictEqual, strictEqual } from 'node:assert';
* import { executionAsyncId, triggerAsyncId } from 'node:async_hooks';
*
* // Async tracking tooling will identify this as 'Q'.
* const ee1 = new EventEmitterAsyncResource({ name: 'Q' });
*
* // 'foo' listeners will run in the EventEmitters async context.
* ee1.on('foo', () => {
* strictEqual(executionAsyncId(), ee1.asyncId);
* strictEqual(triggerAsyncId(), ee1.triggerAsyncId);
* });
*
* const ee2 = new EventEmitter();
*
* // 'foo' listeners on ordinary EventEmitters that do not track async
* // context, however, run in the same async context as the emit().
* ee2.on('foo', () => {
* notStrictEqual(executionAsyncId(), ee2.asyncId);
* notStrictEqual(triggerAsyncId(), ee2.triggerAsyncId);
* });
*
* Promise.resolve().then(() => {
* ee1.emit('foo');
* ee2.emit('foo');
* });
* ```
*
* The `EventEmitterAsyncResource` class has the same methods and takes the
* same options as `EventEmitter` and `AsyncResource` themselves.
* @since v17.4.0, v16.14.0
*/
export class EventEmitterAsyncResource extends EventEmitter {
/**
* @param options Only optional in child class.
*/
constructor(options?: EventEmitterAsyncResourceOptions);
/**
* Call all `destroy` hooks. This should only ever be called once. An error will
* be thrown if it is called more than once. This **must** be manually called. If
* the resource is left to be collected by the GC then the `destroy` hooks will
* never be called.
*/
emitDestroy(): void;
/**
* The unique `asyncId` assigned to the resource.
*/
readonly asyncId: number;
/**
* The same triggerAsyncId that is passed to the AsyncResource constructor.
*/
readonly triggerAsyncId: number;
/**
* The returned `AsyncResource` object has an additional `eventEmitter` property
* that provides a reference to this `EventEmitterAsyncResource`.
*/
readonly asyncResource: EventEmitterReferencingAsyncResource;
}
}

@@ -462,2 +544,3 @@ global {

interface EventEmitter {
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
/**

@@ -464,0 +547,0 @@ * Alias for `emitter.on(eventName, listener)`.

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

highWaterMark?: number | undefined;
flush?: boolean | undefined;
}

@@ -111,3 +112,6 @@ interface ReadableWebStreamOptions {

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
options?:
| (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined })
| BufferEncoding
| null,
): Promise<void>;

@@ -371,3 +375,3 @@ /**

/**
* Change the file system timestamps of the object referenced by the `FileHandle` then resolves the promise with no arguments upon success.
* Change the file system timestamps of the object referenced by the `FileHandle` then fulfills the promise with no arguments upon success.
* @since v10.0.0

@@ -380,3 +384,3 @@ */

* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.
* The promise is resolved with no arguments upon success.
* The promise is fulfilled with no arguments upon success.
*

@@ -388,3 +392,3 @@ * If `options` is a string, then it specifies the `encoding`.

* It is unsafe to use `filehandle.writeFile()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected).
* without waiting for the promise to be fulfilled (or rejected).
*

@@ -398,3 +402,6 @@ * If one or more `filehandle.write()` calls are made on a file handle and then a`filehandle.writeFile()` call is made, the data will be written from the

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode & Abortable) | BufferEncoding | null,
options?:
| (ObjectEncodingOptions & FlagAndOpenMode & Abortable & { flush?: boolean | undefined })
| BufferEncoding
| null,
): Promise<void>;

@@ -404,6 +411,6 @@ /**

*
* The promise is resolved with an object containing two properties:
* The promise is fulfilled with an object containing two properties:
*
* It is unsafe to use `filehandle.write()` multiple times on the same file
* without waiting for the promise to be resolved (or rejected). For this
* without waiting for the promise to be fulfilled (or rejected). For this
* scenario, use `filehandle.createWriteStream()`.

@@ -440,6 +447,6 @@ *

*
* The promise is resolved with an object containing a two properties:
* The promise is fulfilled with an object containing a two properties:
*
* It is unsafe to call `writev()` multiple times on the same file without waiting
* for the promise to be resolved (or rejected).
* for the promise to be fulfilled (or rejected).
*

@@ -453,3 +460,3 @@ * On Linux, positional writes don't work when the file is opened in append mode.

*/
writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
writev(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
/**

@@ -461,3 +468,3 @@ * Read from a file and write to an array of [ArrayBufferView](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView) s

*/
readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
readv(buffers: readonly NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
/**

@@ -495,3 +502,3 @@ * Closes the file handle after waiting for any pending operation on the handle to

*
* If the accessibility check is successful, the promise is resolved with no
* If the accessibility check is successful, the promise is fulfilled with no
* value. If any of the accessibility checks fail, the promise is rejected

@@ -659,3 +666,3 @@ * with an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) object. The following example checks if the file`/etc/passwd` can be read and

*
* If `options.withFileTypes` is set to `true`, the resolved array will contain `fs.Dirent` objects.
* If `options.withFileTypes` is set to `true`, the returned array will contain `fs.Dirent` objects.
*

@@ -730,3 +737,3 @@ * ```js

* Reads the contents of the symbolic link referred to by `path`. See the POSIX [`readlink(2)`](http://man7.org/linux/man-pages/man2/readlink.2.html) documentation for more detail. The promise is
* resolved with the`linkString` upon success.
* fulfilled with the`linkString` upon success.
*

@@ -1038,3 +1045,3 @@ * The optional `options` argument can be a string specifying an encoding, or an

data: string | Uint8Array,
options?: (ObjectEncodingOptions & FlagAndOpenMode) | BufferEncoding | null,
options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
): Promise<void>;

@@ -1041,0 +1048,0 @@ /**

@@ -1,381 +0,385 @@

// Declare "static" methods in Error
interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
export {}; // Make this a module
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
// #region Fetch and friends
// Conditional type aliases, used at the end of this file.
// Will either be empty if lib-dom is included, or the undici version otherwise.
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type _ResponseInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").ResponseInit;
type _File = typeof globalThis extends { onmessage: any } ? {} : import("node:buffer").File;
// #endregion Fetch and friends
stackTraceLimit: number;
}
declare global {
// Declare "static" methods in Error
interface ErrorConstructor {
/** Create .stack property on a target object */
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
/*-----------------------------------------------*
* *
* GLOBAL *
* *
------------------------------------------------*/
/**
* Optional override for formatting stack traces
*
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
*/
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
// For backwards compability
interface NodeRequire extends NodeJS.Require {}
interface RequireResolve extends NodeJS.RequireResolve {}
interface NodeModule extends NodeJS.Module {}
stackTraceLimit: number;
}
declare var process: NodeJS.Process;
declare var console: Console;
/*-----------------------------------------------*
* *
* GLOBAL *
* *
------------------------------------------------*/
declare var __filename: string;
declare var __dirname: string;
// For backwards compability
interface NodeRequire extends NodeJS.Require {}
interface RequireResolve extends NodeJS.RequireResolve {}
interface NodeModule extends NodeJS.Module {}
declare var require: NodeRequire;
declare var module: NodeModule;
var process: NodeJS.Process;
var console: Console;
// Same as module.exports
declare var exports: any;
var __filename: string;
var __dirname: string;
/**
* Only available if `--expose-gc` is passed to the process.
*/
declare var gc: undefined | (() => void);
var require: NodeRequire;
var module: NodeModule;
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
interface AbortController {
/**
* Returns the AbortSignal object associated with this object.
*/
// Same as module.exports
var exports: any;
readonly signal: AbortSignal;
/**
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
* Only available if `--expose-gc` is passed to the process.
*/
abort(reason?: any): void;
}
var gc: undefined | (() => void);
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
/**
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
readonly aborted: boolean;
readonly reason: any;
onabort: null | ((this: AbortSignal, event: Event) => any);
throwIfAborted(): void;
}
declare var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
: {
prototype: AbortController;
new(): AbortController;
};
declare var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
timeout(milliseconds: number): AbortSignal;
};
// #endregion borrowed
// #region Disposable
interface SymbolConstructor {
/**
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
readonly dispose: unique symbol;
/**
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
readonly asyncDispose: unique symbol;
}
interface Disposable {
[Symbol.dispose](): void;
}
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
// #endregion Disposable
// #region ArrayLike.at()
interface RelativeIndexable<T> {
/**
* Takes an integer value and returns the item at that index,
* allowing for positive and negative integers.
* Negative integers count back from the last item in the array.
*/
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> {}
// #endregion ArrayLike.at() end
/**
* @since v17.0.0
*
* Creates a deep clone of an object.
*/
declare function structuredClone<T>(
value: T,
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
): T;
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
* *
*-----------------------------------------------*/
declare namespace NodeJS {
interface CallSite {
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
/** A controller object that allows you to abort one or more DOM requests as and when desired. */
interface AbortController {
/**
* Value of "this"
* Returns the AbortSignal object associated with this object.
*/
getThis(): unknown;
readonly signal: AbortSignal;
/**
* Type of "this" as a string.
* This is the name of the function stored in the constructor field of
* "this", if available. Otherwise the object's [[Class]] internal
* property.
* Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
*/
getTypeName(): string | null;
abort(reason?: any): void;
}
/** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
interface AbortSignal extends EventTarget {
/**
* Current function
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
*/
getFunction(): Function | undefined;
readonly aborted: boolean;
readonly reason: any;
onabort: null | ((this: AbortSignal, event: Event) => any);
throwIfAborted(): void;
}
/**
* Name of the current function, typically its name property.
* If a name property is not available an attempt will be made to try
* to infer a name from the function's context.
*/
getFunctionName(): string | null;
var AbortController: typeof globalThis extends { onmessage: any; AbortController: infer T } ? T
: {
prototype: AbortController;
new(): AbortController;
};
/**
* Name of the property [of "this" or one of its prototypes] that holds
* the current function
*/
getMethodName(): string | null;
var AbortSignal: typeof globalThis extends { onmessage: any; AbortSignal: infer T } ? T
: {
prototype: AbortSignal;
new(): AbortSignal;
abort(reason?: any): AbortSignal;
timeout(milliseconds: number): AbortSignal;
};
// #endregion borrowed
// #region Disposable
interface SymbolConstructor {
/**
* Name of the script [if this function was defined in a script]
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
*/
getFileName(): string | undefined;
readonly dispose: unique symbol;
/**
* Current line number [if this function was defined in a script]
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
*/
getLineNumber(): number | null;
readonly asyncDispose: unique symbol;
}
/**
* Current column number [if this function was defined in a script]
*/
getColumnNumber(): number | null;
interface Disposable {
[Symbol.dispose](): void;
}
/**
* A call site object representing the location where eval was called
* [if this function was created using a call to eval]
*/
getEvalOrigin(): string | undefined;
interface AsyncDisposable {
[Symbol.asyncDispose](): PromiseLike<void>;
}
// #endregion Disposable
// #region ArrayLike.at()
interface RelativeIndexable<T> {
/**
* Is this a toplevel invocation, that is, is "this" the global object?
* Takes an integer value and returns the item at that index,
* allowing for positive and negative integers.
* Negative integers count back from the last item in the array.
*/
isToplevel(): boolean;
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> {}
// #endregion ArrayLike.at() end
/**
* Does this call take place in code defined by a call to eval?
*/
isEval(): boolean;
/**
* @since v17.0.0
*
* Creates a deep clone of an object.
*/
function structuredClone<T>(
value: T,
transfer?: { transfer: ReadonlyArray<import("worker_threads").TransferListItem> },
): T;
/**
* Is this call in native V8 code?
*/
isNative(): boolean;
/*----------------------------------------------*
* *
* GLOBAL INTERFACES *
* *
*-----------------------------------------------*/
namespace NodeJS {
interface CallSite {
/**
* Value of "this"
*/
getThis(): unknown;
/**
* Is this a constructor call?
*/
isConstructor(): boolean;
}
/**
* Type of "this" as a string.
* This is the name of the function stored in the constructor field of
* "this", if available. Otherwise the object's [[Class]] internal
* property.
*/
getTypeName(): string | null;
interface ErrnoException extends Error {
errno?: number | undefined;
code?: string | undefined;
path?: string | undefined;
syscall?: string | undefined;
}
/**
* Current function
*/
getFunction(): Function | undefined;
interface ReadableStream extends EventEmitter {
readable: boolean;
read(size?: number): string | Buffer;
setEncoding(encoding: BufferEncoding): this;
pause(): this;
resume(): this;
isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
wrap(oldStream: ReadableStream): this;
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
}
/**
* Name of the current function, typically its name property.
* If a name property is not available an attempt will be made to try
* to infer a name from the function's context.
*/
getFunctionName(): string | null;
interface WritableStream extends EventEmitter {
writable: boolean;
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
end(cb?: () => void): this;
end(data: string | Uint8Array, cb?: () => void): this;
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
}
/**
* Name of the property [of "this" or one of its prototypes] that holds
* the current function
*/
getMethodName(): string | null;
interface ReadWriteStream extends ReadableStream, WritableStream {}
/**
* Name of the script [if this function was defined in a script]
*/
getFileName(): string | undefined;
interface RefCounted {
ref(): this;
unref(): this;
}
/**
* Current line number [if this function was defined in a script]
*/
getLineNumber(): number | null;
type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| BigUint64Array
| BigInt64Array
| Float32Array
| Float64Array;
type ArrayBufferView = TypedArray | DataView;
/**
* Current column number [if this function was defined in a script]
*/
getColumnNumber(): number | null;
interface Require {
(id: string): any;
resolve: RequireResolve;
cache: Dict<NodeModule>;
/**
* @deprecated
*/
extensions: RequireExtensions;
main: Module | undefined;
}
/**
* A call site object representing the location where eval was called
* [if this function was created using a call to eval]
*/
getEvalOrigin(): string | undefined;
interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;
}
/**
* Is this a toplevel invocation, that is, is "this" the global object?
*/
isToplevel(): boolean;
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}
interface Module {
/**
* `true` if the module is running during the Node.js preload
*/
isPreloading: boolean;
exports: any;
require: Require;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
parent: Module | null | undefined;
children: Module[];
/**
* @since v11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
/**
* Does this call take place in code defined by a call to eval?
*/
isEval(): boolean;
interface Dict<T> {
[key: string]: T | undefined;
}
/**
* Is this call in native V8 code?
*/
isNative(): boolean;
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
/**
* Is this a constructor call?
*/
isConstructor(): boolean;
}
namespace fetch {
type _Request = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Request;
type _Response = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Response;
type _FormData = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").FormData;
type _Headers = typeof globalThis extends { onmessage: any } ? {} : import("undici-types").Headers;
type _RequestInit = typeof globalThis extends { onmessage: any } ? {}
: import("undici-types").RequestInit;
type Request = globalThis.Request;
type Response = globalThis.Response;
type Headers = globalThis.Headers;
type FormData = globalThis.FormData;
type RequestInit = globalThis.RequestInit;
type RequestInfo = import("undici-types").RequestInfo;
type HeadersInit = import("undici-types").HeadersInit;
type BodyInit = import("undici-types").BodyInit;
type RequestRedirect = import("undici-types").RequestRedirect;
type RequestCredentials = import("undici-types").RequestCredentials;
type RequestMode = import("undici-types").RequestMode;
type ReferrerPolicy = import("undici-types").ReferrerPolicy;
type Dispatcher = import("undici-types").Dispatcher;
type RequestDuplex = import("undici-types").RequestDuplex;
interface ErrnoException extends Error {
errno?: number | undefined;
code?: string | undefined;
path?: string | undefined;
syscall?: string | undefined;
}
interface ReadableStream extends EventEmitter {
readable: boolean;
read(size?: number): string | Buffer;
setEncoding(encoding: BufferEncoding): this;
pause(): this;
resume(): this;
isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
wrap(oldStream: ReadableStream): this;
[Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
}
interface WritableStream extends EventEmitter {
writable: boolean;
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
end(cb?: () => void): this;
end(data: string | Uint8Array, cb?: () => void): this;
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
}
interface ReadWriteStream extends ReadableStream, WritableStream {}
interface RefCounted {
ref(): this;
unref(): this;
}
type TypedArray =
| Uint8Array
| Uint8ClampedArray
| Uint16Array
| Uint32Array
| Int8Array
| Int16Array
| Int32Array
| BigUint64Array
| BigInt64Array
| Float32Array
| Float64Array;
type ArrayBufferView = TypedArray | DataView;
interface Require {
(id: string): any;
resolve: RequireResolve;
cache: Dict<NodeModule>;
/**
* @deprecated
*/
extensions: RequireExtensions;
main: Module | undefined;
}
interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;
}
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}
interface Module {
/**
* `true` if the module is running during the Node.js preload
*/
isPreloading: boolean;
exports: any;
require: Require;
id: string;
filename: string;
loaded: boolean;
/** @deprecated since v14.6.0 Please use `require.main` and `module.children` instead. */
parent: Module | null | undefined;
children: Module[];
/**
* @since v11.14.0
*
* The directory name of the module. This is usually the same as the path.dirname() of the module.id.
*/
path: string;
paths: string[];
}
interface Dict<T> {
[key: string]: T | undefined;
}
interface ReadOnlyDict<T> {
readonly [key: string]: T | undefined;
}
}
}
interface RequestInit extends NodeJS.fetch._RequestInit {}
interface RequestInit extends _RequestInit {}
declare function fetch(
input: NodeJS.fetch.RequestInfo,
init?: RequestInit,
): Promise<Response>;
function fetch(
input: string | URL | globalThis.Request,
init?: RequestInit,
): Promise<Response>;
interface Request extends NodeJS.fetch._Request {}
declare var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Request extends _Request {}
var Request: typeof globalThis extends {
onmessage: any;
Request: infer T;
} ? T
: typeof import("undici-types").Request;
interface Response extends NodeJS.fetch._Response {}
declare var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface ResponseInit extends _ResponseInit {}
interface FormData extends NodeJS.fetch._FormData {}
declare var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Response extends _Response {}
var Response: typeof globalThis extends {
onmessage: any;
Response: infer T;
} ? T
: typeof import("undici-types").Response;
interface Headers extends NodeJS.fetch._Headers {}
declare var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;
interface FormData extends _FormData {}
var FormData: typeof globalThis extends {
onmessage: any;
FormData: infer T;
} ? T
: typeof import("undici-types").FormData;
interface Headers extends _Headers {}
var Headers: typeof globalThis extends {
onmessage: any;
Headers: infer T;
} ? T
: typeof import("undici-types").Headers;
interface File extends _File {}
var File: typeof globalThis extends {
onmessage: any;
File: infer T;
} ? T
: typeof import("node:buffer").File;
}

@@ -125,3 +125,5 @@ /**

}
interface ImportAssertions extends NodeJS.Dict<string> {
/** @deprecated Use `ImportAttributes` instead */
interface ImportAssertions extends ImportAttributes {}
interface ImportAttributes extends NodeJS.Dict<string> {
type?: string | undefined;

@@ -159,5 +161,9 @@ }

/**
* @deprecated Use `importAttributes` instead
*/
importAssertions: ImportAttributes;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAssertions: ImportAssertions;
importAttributes: ImportAttributes;
/**

@@ -174,6 +180,10 @@ * The module importing this one, or undefined if this is the Node.js entry point

/**
* The import assertions to use when caching the module (optional; if excluded the input will be used)
* @deprecated Use `importAttributes` instead
*/
importAssertions?: ImportAssertions | undefined;
importAssertions?: ImportAttributes | undefined;
/**
* The import attributes to use when caching the module (optional; if excluded the input will be used)
*/
importAttributes?: ImportAttributes | undefined;
/**
* A signal that this hook intends to terminate the chain of `resolve` hooks.

@@ -215,5 +225,9 @@ * @default false

/**
* @deprecated Use `importAttributes` instead
*/
importAssertions: ImportAttributes;
/**
* An object whose key-value pairs represent the assertions for the module to import
*/
importAssertions: ImportAssertions;
importAttributes: ImportAttributes;
}

@@ -220,0 +234,0 @@ interface LoadFnOutput {

@@ -403,3 +403,4 @@ /**

* Returns the operating system CPU architecture for which the Node.js binary was
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
* compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'loong64'`,`'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`,
* and `'x64'`.
*

@@ -406,0 +407,0 @@ * The return value is equivalent to `process.arch`.

@@ -463,3 +463,3 @@ /**

| {
entryTypes: ReadonlyArray<EntryType>;
entryTypes: readonly EntryType[];
buffered?: boolean | undefined;

@@ -466,0 +466,0 @@ }

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

*/
encode(codePoints: ReadonlyArray<number>): string;
encode(codePoints: readonly number[]): string;
}

@@ -107,0 +107,0 @@ /**

@@ -28,5 +28,5 @@ /**

| boolean
| ReadonlyArray<string>
| ReadonlyArray<number>
| ReadonlyArray<boolean>
| readonly string[]
| readonly number[]
| readonly boolean[]
| null

@@ -33,0 +33,0 @@ >

@@ -21,3 +21,3 @@ /**

* and is considered passing otherwise.
* 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` resolves.
* 2. A function that returns a `Promise` that is considered failing if the`Promise` rejects, and is considered passing if the `Promise` fulfills.
* 3. A function that receives a callback function. If the callback receives any

@@ -44,3 +44,3 @@ * truthy value as its first argument, the test is considered failing. If a

* // This test passes because the Promise returned by the async
* // function is not rejected.
* // function is settled and not rejected.
* assert.strictEqual(1, 1);

@@ -109,4 +109,4 @@ * });

*
* `test()` returns a `Promise` that resolves once the test completes.
* if `test()` is called within a `describe()` block, it resolve immediately.
* `test()` returns a `Promise` that fulfills once the test completes.
* if `test()` is called within a `describe()` block, it fulfills immediately.
* The return value can usually be discarded for top level tests.

@@ -138,3 +138,3 @@ * However, the return value from subtests should be used to prevent the parent

* second argument.
* @return Resolved with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
* @return Fulfilled with `undefined` once the test completes, or immediately if the test runs within {@link describe}.
*/

@@ -141,0 +141,0 @@ function test(name?: string, fn?: TestFn): Promise<void>;

@@ -158,3 +158,3 @@ /**

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setTimeout(callback: (args: void) => void, ms?: number): NodeJS.Timeout;

@@ -191,3 +191,3 @@ namespace setTimeout {

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setInterval(callback: (args: void) => void, ms?: number): NodeJS.Timeout;

@@ -226,3 +226,3 @@ namespace setInterval {

// util.promisify no rest args compability
// tslint:disable-next-line void-return
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
function setImmediate(callback: (args: void) => void): NodeJS.Immediate;

@@ -229,0 +229,0 @@ namespace setImmediate {

@@ -1206,3 +1206,3 @@ /**

*/
const rootCertificates: ReadonlyArray<string>;
const rootCertificates: readonly string[];
}

@@ -1209,0 +1209,0 @@ declare module "node:tls" {

@@ -767,3 +767,3 @@ /**

| string
| Record<string, string | ReadonlyArray<string>>
| Record<string, string | readonly string[]>
| Iterable<[string, string]>

@@ -770,0 +770,0 @@ | ReadonlyArray<[string, string]>,

@@ -40,3 +40,3 @@ /**

declare module "vm" {
import { ImportAssertions } from "node:module";
import { ImportAttributes } from "node:module";
interface Context extends NodeJS.Dict<any> {}

@@ -72,3 +72,3 @@ interface BaseOptions {

importModuleDynamically?:
| ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module)
| ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module)
| undefined;

@@ -527,3 +527,3 @@ }

code: string,
params?: ReadonlyArray<string>,
params?: readonly string[],
options?: CompileFunctionOptions,

@@ -599,3 +599,5 @@ ): Function & {

extra: {
assert: Object;
/** @deprecated Use `attributes` instead */
assert: ImportAttributes;
attributes: ImportAttributes;
},

@@ -609,4 +611,4 @@ ) => Module | Promise<Module>;

* The `vm.Module` class provides a low-level interface for using
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
* s as defined in the ECMAScript
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://262.ecma-international.org/14.0/#sec-abstract-module-records) s as
* defined in the ECMAScript
* specification.

@@ -613,0 +615,0 @@ *

@@ -136,3 +136,3 @@ /**

*/
start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
/**

@@ -139,0 +139,0 @@ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.

@@ -176,3 +176,3 @@ /**

*/
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
postMessage(value: any, transferList?: readonly TransferListItem[]): void;
/**

@@ -409,3 +409,3 @@ * 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

*/
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
postMessage(value: any, transferList?: readonly TransferListItem[]): void;
/**

@@ -412,0 +412,0 @@ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default

@@ -767,3 +767,3 @@ /**

| string
| Record<string, string | ReadonlyArray<string>>
| Record<string, string | readonly string[]>
| Iterable<[string, string]>

@@ -770,0 +770,0 @@ | ReadonlyArray<[string, string]>,

@@ -40,3 +40,3 @@ /**

declare module "vm" {
import { ImportAssertions } from "node:module";
import { ImportAttributes } from "node:module";
interface Context extends NodeJS.Dict<any> {}

@@ -72,3 +72,3 @@ interface BaseOptions {

importModuleDynamically?:
| ((specifier: string, script: Script, importAssertions: ImportAssertions) => Module)
| ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module)
| undefined;

@@ -527,3 +527,3 @@ }

code: string,
params?: ReadonlyArray<string>,
params?: readonly string[],
options?: CompileFunctionOptions,

@@ -599,3 +599,5 @@ ): Function & {

extra: {
assert: Object;
/** @deprecated Use `attributes` instead */
assert: ImportAttributes;
attributes: ImportAttributes;
},

@@ -609,4 +611,4 @@ ) => Module | Promise<Module>;

* The `vm.Module` class provides a low-level interface for using
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
* s as defined in the ECMAScript
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://262.ecma-international.org/14.0/#sec-abstract-module-records) s as
* defined in the ECMAScript
* specification.

@@ -613,0 +615,0 @@ *

@@ -136,3 +136,3 @@ /**

*/
start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
/**

@@ -139,0 +139,0 @@ * Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.

@@ -176,3 +176,3 @@ /**

*/
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
postMessage(value: any, transferList?: readonly TransferListItem[]): void;
/**

@@ -409,3 +409,3 @@ * 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

*/
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
postMessage(value: any, transferList?: readonly TransferListItem[]): void;
/**

@@ -412,0 +412,0 @@ * Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc