Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1938
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 14.18.62 to 14.18.63

64

node v14.18/assert.d.ts

@@ -1,2 +0,2 @@

declare module 'assert' {
declare module "assert" {
/** An alias of `assert.ok()`. */

@@ -10,3 +10,3 @@ function assert(value: any, message?: string | Error): asserts value;

generatedMessage: boolean;
code: 'ERR_ASSERTION';
code: "ERR_ASSERTION";

@@ -46,3 +46,3 @@ constructor(options?: {

type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;

@@ -96,29 +96,31 @@ function fail(message?: string | Error): never;

const strict: Omit<
typeof assert,
| 'equal'
| 'notEqual'
| 'deepEqual'
| 'notDeepEqual'
| 'ok'
| 'strictEqual'
| 'deepStrictEqual'
| 'ifError'
| 'strict'
> & {
(value: any, message?: string | Error): asserts value;
equal: typeof strictEqual;
notEqual: typeof notStrictEqual;
deepEqual: typeof deepStrictEqual;
notDeepEqual: typeof notDeepStrictEqual;
const strict:
& Omit<
typeof assert,
| "equal"
| "notEqual"
| "deepEqual"
| "notDeepEqual"
| "ok"
| "strictEqual"
| "deepStrictEqual"
| "ifError"
| "strict"
>
& {
(value: any, message?: string | Error): asserts value;
equal: typeof strictEqual;
notEqual: typeof notStrictEqual;
deepEqual: typeof deepStrictEqual;
notDeepEqual: typeof notDeepStrictEqual;
// Mapped types and assertion functions are incompatible?
// TS2775: Assertions require every name in the call target
// to be declared with an explicit type annotation.
ok: typeof ok;
strictEqual: typeof strictEqual;
deepStrictEqual: typeof deepStrictEqual;
ifError: typeof ifError;
strict: typeof strict;
};
// Mapped types and assertion functions are incompatible?
// TS2775: Assertions require every name in the call target
// to be declared with an explicit type annotation.
ok: typeof ok;
strictEqual: typeof strictEqual;
deepStrictEqual: typeof deepStrictEqual;
ifError: typeof ifError;
strict: typeof strict;
};
}

@@ -128,5 +130,5 @@

}
declare module 'node:assert' {
import assert = require('assert');
declare module "node:assert" {
import assert = require("assert");
export = assert;
}
/**
* Async Hooks module: https://nodejs.org/api/async_hooks.html
*/
declare module 'async_hooks' {
declare module "async_hooks" {
/**

@@ -86,16 +86,16 @@ * Returns the asyncId of the current execution context.

interface AsyncResourceOptions {
/**
* The ID of the execution context that created this async event.
* @default executionAsyncId()
*/
triggerAsyncId?: number | undefined;
/**
* The ID of the execution context that created this async event.
* @default executionAsyncId()
*/
triggerAsyncId?: number | undefined;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* @default false
*/
requireManualDestroy?: boolean | undefined;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* @default false
*/
requireManualDestroy?: boolean | undefined;
}

@@ -117,3 +117,3 @@

*/
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);

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

*/
static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
static bind<Func extends (...args: any[]) => any>(
fn: Func,
type?: string,
): Func & { asyncResource: AsyncResource };

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

*/
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
runInAsyncScope<This, Result>(
fn: (this: This, ...args: any[]) => Result,
thisArg?: This,
...args: any[]
): Result;

@@ -232,4 +239,4 @@ /**

}
declare module 'node:async_hooks' {
export * from 'async_hooks';
declare module "node:async_hooks" {
export * from "async_hooks";
}

@@ -1,3 +0,3 @@

declare module 'buffer' {
import { BinaryLike } from 'node:crypto';
declare module "buffer" {
import { BinaryLike } from "node:crypto";
export const INSPECT_MAX_BYTES: number;

@@ -87,4 +87,4 @@ export const kMaxLength: number;

}
declare module 'node:buffer' {
export * from 'buffer';
declare module "node:buffer" {
export * from "buffer";
}

@@ -1,6 +0,6 @@

declare module 'child_process' {
import { BaseEncodingOptions } from 'fs';
import * as events from 'events';
import * as net from 'net';
import { Writable, Readable, Stream, Pipe } from 'stream';
declare module "child_process" {
import { BaseEncodingOptions } from "fs";
import * as events from "events";
import * as net from "net";
import { Pipe, Readable, Stream, Writable } from "stream";

@@ -20,3 +20,3 @@ type Serializable = string | object | number | boolean;

Readable | Writable | null | undefined, // extra
Readable | Writable | null | undefined // extra
Readable | Writable | null | undefined, // extra
];

@@ -33,3 +33,8 @@ readonly killed: boolean;

send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
send(
message: Serializable,
sendHandle?: SendHandle,
options?: MessageOptions,
callback?: (error: Error | null) => void,
): boolean;
disconnect(): void;

@@ -84,6 +89,12 @@ unref(): void;

prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
prependOnceListener(
event: "close",
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
): this;
prependOnceListener(event: "disconnect", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
prependOnceListener(
event: "exit",
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
): this;
prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;

@@ -102,3 +113,3 @@ }

Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
Readable | Writable | null | undefined, // extra, no modification
];

@@ -121,3 +132,3 @@ }

Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
Readable | Writable | null | undefined, // extra, no modification
];

@@ -130,5 +141,9 @@ }

type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
type StdioOptions =
| "pipe"
| "ignore"
| "inherit"
| Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
type SerializationType = 'json' | 'advanced';
type SerializationType = "json" | "advanced";

@@ -182,7 +197,7 @@ interface MessagingOptions {

interface SpawnOptionsWithoutStdio extends SpawnOptions {
stdio?: 'pipe' | Array<null | undefined | 'pipe'> | undefined;
stdio?: "pipe" | Array<null | undefined | "pipe"> | undefined;
}
type StdioNull = 'inherit' | 'ignore' | Stream;
type StdioPipe = undefined | null | 'pipe';
type StdioNull = "inherit" | "ignore" | Stream;
type StdioPipe = undefined | null | "pipe";

@@ -236,3 +251,7 @@ interface SpawnOptionsWithStdioTuple<

// overloads of spawn with 'args'
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
function spawn(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnOptionsWithoutStdio,
): ChildProcessWithoutNullStreams;

@@ -304,9 +323,20 @@ function spawn(

// no `options` definitely means stdout/stderr are `string`.
function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
function exec(
command: string,
options: { encoding: "buffer" | null } & ExecOptions,
callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
): ChildProcess;
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
options: { encoding: BufferEncoding } & ExecOptions,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -322,3 +352,7 @@ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.

// `options` without an `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
options: ExecOptions,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -338,7 +372,19 @@ // fallback if nothing else matches. Worst case is always `string | Buffer`.

namespace exec {
function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(command: string): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options: { encoding: "buffer" | null } & ExecOptions,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
command: string,
options: { encoding: BufferEncoding } & ExecOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options: ExecOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options?: (BaseEncodingOptions & ExecOptions) | null,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
}

@@ -356,3 +402,3 @@

interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
encoding: 'buffer' | null;
encoding: "buffer" | null;
}

@@ -363,4 +409,4 @@ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {

type ExecFileException =
& Omit<ExecException, 'code'>
& Omit<NodeJS.ErrnoException, 'code'>
& Omit<ExecException, "code">
& Omit<NodeJS.ErrnoException, "code">
& { code?: string | number | undefined | null };

@@ -371,12 +417,27 @@

function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): ChildProcess;
// no `options` definitely means stdout/stderr are `string`.
function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptionsWithBufferEncoding,
callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,

@@ -388,5 +449,9 @@ options: ExecFileOptionsWithBufferEncoding,

// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptionsWithStringEncoding,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,

@@ -412,8 +477,12 @@ options: ExecFileOptionsWithStringEncoding,

// `options` without an `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptions,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptions,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -425,3 +494,6 @@

options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
callback:
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
| undefined
| null,
): ChildProcess;

@@ -432,3 +504,6 @@ function execFile(

options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
callback:
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
| undefined
| null,
): ChildProcess;

@@ -438,22 +513,52 @@

namespace execFile {
function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithBufferEncoding,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithBufferEncoding,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithStringEncoding,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithStringEncoding,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithOtherEncoding,
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithOtherEncoding,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
options: ExecFileOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
}

@@ -485,3 +590,3 @@

maxBuffer?: number | undefined;
encoding?: BufferEncoding | 'buffer' | null | undefined;
encoding?: BufferEncoding | "buffer" | null | undefined;
}

@@ -492,3 +597,3 @@ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {

interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
encoding?: 'buffer' | null | undefined;
encoding?: "buffer" | null | undefined;
}

@@ -508,5 +613,17 @@ interface SpawnSyncReturns<T> {

function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptionsWithStringEncoding,
): SpawnSyncReturns<string>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptionsWithBufferEncoding,
): SpawnSyncReturns<Buffer>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptions,
): SpawnSyncReturns<string | Buffer>;

@@ -528,3 +645,3 @@ interface ExecSyncOptions extends CommonOptions {

maxBuffer?: number | undefined;
encoding?: BufferEncoding | 'buffer' | null | undefined;
encoding?: BufferEncoding | "buffer" | null | undefined;
}

@@ -535,3 +652,3 @@ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {

interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
encoding?: 'buffer' | null | undefined;
encoding?: "buffer" | null | undefined;
}

@@ -571,8 +688,20 @@ function execSync(command: string): Buffer;

function execFileSync(command: string, args: ReadonlyArray<string>): Buffer;
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
function execFileSync(
command: string,
args: ReadonlyArray<string>,
options: ExecFileSyncOptionsWithStringEncoding,
): string;
function execFileSync(
command: string,
args: ReadonlyArray<string>,
options: ExecFileSyncOptionsWithBufferEncoding,
): Buffer;
function execFileSync(
command: string,
args?: ReadonlyArray<string>,
options?: ExecFileSyncOptions,
): string | Buffer;
}
declare module 'node:child_process' {
export * from 'child_process';
declare module "node:child_process" {
export * from "child_process";
}

@@ -1,8 +0,8 @@

declare module 'cluster' {
import * as child from 'child_process';
import EventEmitter = require('events');
import * as net from 'net';
declare module "cluster" {
import * as child from "child_process";
import EventEmitter = require("events");
import * as net from "net";
// interfaces
type SerializationType = 'json' | 'advanced';
type SerializationType = "json" | "advanced";
interface ClusterSettings {

@@ -25,3 +25,3 @@ execArgv?: string[] | undefined; // default: process.execArgv

port: number;
addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
}

@@ -32,3 +32,7 @@

process: child.ChildProcess;
send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(
message: child.Serializable,
sendHandle?: child.SendHandle,
callback?: (error: Error | null) => void,
): boolean;
kill(signal?: string): void;

@@ -55,3 +59,3 @@ destroy(signal?: string): void;

addListener(event: "listening", listener: (address: Address) => void): this;
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: () => void): this;

@@ -72,3 +76,3 @@

on(event: "listening", listener: (address: Address) => void): this;
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: () => void): this;

@@ -81,3 +85,3 @@

once(event: "listening", listener: (address: Address) => void): this;
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: () => void): this;

@@ -90,3 +94,3 @@

prependListener(event: "listening", listener: (address: Address) => void): this;
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: () => void): this;

@@ -99,3 +103,3 @@

prependOnceListener(event: "listening", listener: (address: Address) => void): this;
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "online", listener: () => void): this;

@@ -134,3 +138,6 @@ }

addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: (worker: Worker) => void): this;

@@ -153,3 +160,3 @@ addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: (worker: Worker) => void): this;

@@ -163,3 +170,3 @@ on(event: "setup", listener: (settings: ClusterSettings) => void): this;

once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: (worker: Worker) => void): this;

@@ -173,3 +180,6 @@ once(event: "setup", listener: (settings: ClusterSettings) => void): this;

prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: (worker: Worker) => void): this;

@@ -184,3 +194,6 @@ prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

// the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
prependOnceListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this;
prependOnceListener(event: "online", listener: (worker: Worker) => void): this;

@@ -218,4 +231,7 @@ prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function addListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function addListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -238,3 +254,6 @@ function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function on(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function on(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -248,3 +267,6 @@ function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function once(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function once(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -265,4 +287,7 @@ function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -273,7 +298,13 @@ function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function prependOnceListener(
event: "exit",
listener: (worker: Worker, code: number, signal: string) => void,
): Cluster;
function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependOnceListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -284,4 +315,4 @@ function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

}
declare module 'node:cluster' {
export * from 'cluster';
declare module "node:cluster" {
export * from "cluster";
}

@@ -1,7 +0,7 @@

declare module 'console' {
import console = require('node:console');
declare module "console" {
import console = require("node:console");
export = console;
}
declare module 'node:console' {
import { InspectOptions } from 'util';
declare module "node:console" {
import { InspectOptions } from "util";

@@ -120,3 +120,3 @@ global {

ignoreErrors?: boolean | undefined;
colorMode?: boolean | 'auto' | undefined;
colorMode?: boolean | "auto" | undefined;
inspectOptions?: InspectOptions | undefined;

@@ -127,3 +127,3 @@ /**

*/
groupIndentation?: number | undefined;
groupIndentation?: number | undefined;
}

@@ -130,0 +130,0 @@

/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'constants' {
import { constants as osConstants, SignalConstants } from 'os';
import { constants as cryptoConstants } from 'crypto';
import { constants as fsConstants } from 'fs';
declare module "constants" {
import { constants as osConstants, SignalConstants } from "os";
import { constants as cryptoConstants } from "crypto";
import { constants as fsConstants } from "fs";
const exp: typeof osConstants.errno &
typeof osConstants.priority &
SignalConstants &
typeof cryptoConstants &
typeof fsConstants;
const exp:
& typeof osConstants.errno
& typeof osConstants.priority
& SignalConstants
& typeof cryptoConstants
& typeof fsConstants;
export = exp;
}
declare module 'node:constants' {
import constants = require('constants');
declare module "node:constants" {
import constants = require("constants");
export = constants;
}

@@ -1,3 +0,3 @@

declare module 'crypto' {
import * as stream from 'stream';
declare module "crypto" {
import * as stream from "stream";

@@ -27,3 +27,3 @@ interface Certificate {

/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
new (): Certificate;
new(): Certificate;
/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */

@@ -144,9 +144,9 @@ (): Certificate;

// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
type BinaryToTextEncoding = "base64" | "base64url" | "hex";
type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "latin1";
type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";

@@ -169,6 +169,6 @@ class Hash extends stream.Transform {

type KeyObjectType = 'secret' | 'public' | 'private';
type KeyObjectType = "secret" | "public" | "private";
interface KeyExportOptions<T extends KeyFormat> {
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
type: "pkcs1" | "spki" | "pkcs8" | "sec1";
format: T;

@@ -187,4 +187,4 @@ cipher?: string | undefined;

asymmetricKeySize?: number | undefined;
export(options: KeyExportOptions<'pem'>): string | Buffer;
export(options?: KeyExportOptions<'der'>): Buffer;
export(options: KeyExportOptions<"pem">): string | Buffer;
export(options?: KeyExportOptions<"der">): Buffer;
symmetricKeySize?: number | undefined;

@@ -194,5 +194,5 @@ type: KeyObjectType;

type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305";
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";

@@ -328,3 +328,3 @@ type BinaryLike = string | NodeJS.ArrayBufferView;

format?: KeyFormat | undefined;
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
type?: "pkcs1" | "pkcs8" | "sec1" | undefined;
passphrase?: string | Buffer | undefined;

@@ -336,3 +336,3 @@ }

format?: KeyFormat | undefined;
type?: 'pkcs1' | 'spki' | undefined;
type?: "pkcs1" | "spki" | undefined;
}

@@ -346,3 +346,3 @@

type DSAEncoding = 'der' | 'ieee-p1363';
type DSAEncoding = "der" | "ieee-p1363";

@@ -419,4 +419,8 @@ interface SigningOptions {

computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
computeSecret(
otherPublicKey: NodeJS.ArrayBufferView,
inputEncoding: null,
outputEncoding: BinaryToTextEncoding,
): string;
computeSecret(
other_public_key: string,

@@ -469,3 +473,3 @@ input_encoding: BinaryToTextEncoding,

}
type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
type DiffieHellmanGroup = Omit<DiffieHellman, "setPublicKey" | "setPrivateKey">;
function getDiffieHellman(groupName: string): DiffieHellmanGroup;

@@ -592,4 +596,4 @@ /**

inputEncoding?: BinaryToTextEncoding,
outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
format?: 'uncompressed' | 'compressed' | 'hybrid',
outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
format?: "uncompressed" | "compressed" | "hybrid",
): Buffer | string;

@@ -618,4 +622,4 @@ generateKeys(): Buffer;

type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
type KeyFormat = 'pem' | 'der';
type KeyType = "rsa" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448";
type KeyFormat = "pem" | "der";

@@ -699,7 +703,7 @@ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {

publicKeyEncoding: {
type: 'pkcs1' | 'spki';
type: "pkcs1" | "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs1' | 'pkcs8';
type: "pkcs1" | "pkcs8";
};

@@ -719,7 +723,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -735,7 +739,7 @@ }

publicKeyEncoding: {
type: 'pkcs1' | 'spki';
type: "pkcs1" | "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'sec1' | 'pkcs8';
type: "sec1" | "pkcs8";
};

@@ -746,7 +750,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -757,7 +761,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -768,7 +772,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -779,7 +783,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -794,149 +798,149 @@ }

function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'rsa',
type: "rsa",
options: RSAKeyPairKeyObjectOptions,

@@ -947,23 +951,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'dsa',
type: "dsa",
options: DSAKeyPairKeyObjectOptions,

@@ -974,23 +978,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ec',
type: "ec",
options: ECKeyPairKeyObjectOptions,

@@ -1001,23 +1005,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed25519',
type: "ed25519",
options: ED25519KeyPairKeyObjectOptions | undefined,

@@ -1028,23 +1032,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed448',
type: "ed448",
options: ED448KeyPairKeyObjectOptions | undefined,

@@ -1055,23 +1059,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x25519',
type: "x25519",
options: X25519KeyPairKeyObjectOptions | undefined,

@@ -1082,23 +1086,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x448',
type: "x448",
options: X448KeyPairKeyObjectOptions | undefined,

@@ -1110,73 +1114,73 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(
type: 'ed25519',
type: "ed25519",
options?: ED25519KeyPairKeyObjectOptions,

@@ -1186,37 +1190,37 @@ ): Promise<KeyPairKeyObjectResult>;

function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(
type: 'x25519',
type: "x25519",
options?: X25519KeyPairKeyObjectOptions,

@@ -1226,18 +1230,18 @@ ): Promise<KeyPairKeyObjectResult>;

function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
}

@@ -1310,4 +1314,4 @@

}
declare module 'node:crypto' {
export * from 'crypto';
declare module "node:crypto" {
export * from "crypto";
}

@@ -1,9 +0,9 @@

declare module 'dgram' {
import { AddressInfo } from 'net';
import * as dns from 'dns';
import EventEmitter = require('events');
declare module "dgram" {
import { AddressInfo } from "net";
import * as dns from "dns";
import EventEmitter = require("events");
interface RemoteInfo {
address: string;
family: 'IPv4' | 'IPv6';
family: "IPv4" | "IPv6";
port: number;

@@ -31,3 +31,9 @@ size: number;

sendBufferSize?: number | undefined;
lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
lookup?:
| ((
hostname: string,
options: dns.LookupOneOptions,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
) => void)
| undefined;
}

@@ -54,8 +60,38 @@

remoteAddress(): AddressInfo;
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
setBroadcast(flag: boolean): void;

@@ -144,4 +180,4 @@ setMulticastInterface(multicastInterface: string): void;

}
declare module 'node:dgram' {
export * from 'dgram';
declare module "node:dgram" {
export * from "dgram";
}

@@ -1,2 +0,2 @@

declare module 'dns' {
declare module "dns" {
// Supported getaddrinfo flags.

@@ -31,7 +31,26 @@ const ADDRCONFIG: number;

function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(
hostname: string,
family: number,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
function lookup(
hostname: string,
options: LookupOneOptions,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
function lookup(
hostname: string,
options: LookupAllOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
): void;
function lookup(
hostname: string,
options: LookupOptions,
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
): void;
function lookup(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;

@@ -45,6 +64,10 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
function lookupService(
address: string,
port: number,
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
): void;
namespace lookupService {
function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
function __promisify__(address: string, port: number): Promise<{ hostname: string; service: string }>;
}

@@ -143,29 +166,80 @@

type AnyRecord = AnyARecord |
AnyAaaaRecord |
AnyCnameRecord |
AnyMxRecord |
AnyNaptrRecord |
AnyNsRecord |
AnyPtrRecord |
AnySoaRecord |
AnySrvRecord |
AnyTxtRecord;
type AnyRecord =
| AnyARecord
| AnyAaaaRecord
| AnyCnameRecord
| AnyMxRecord
| AnyNaptrRecord
| AnyNsRecord
| AnyPtrRecord
| AnySoaRecord
| AnySrvRecord
| AnyTxtRecord;
function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
function resolve(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "A",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "AAAA",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "ANY",
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "CNAME",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "MX",
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "NAPTR",
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "NS",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "PTR",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "SOA",
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
): void;
function resolve(
hostname: string,
rrtype: "SRV",
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "TXT",
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
function resolve(
hostname: string,
rrtype: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
callback: (
err: NodeJS.ErrnoException | null,
addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
) => void,
): void;

@@ -182,8 +256,22 @@

function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
function __promisify__(
hostname: string,
rrtype: string,
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
}
function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
function resolve4(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve4(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
function resolve4(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;

@@ -197,5 +285,16 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
function resolve6(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve6(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
function resolve6(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;

@@ -209,3 +308,6 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolveCname(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolveCname {

@@ -215,3 +317,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
function resolveMx(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
namespace resolveMx {

@@ -221,3 +326,6 @@ function __promisify__(hostname: string): Promise<MxRecord[]>;

function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
function resolveNaptr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
namespace resolveNaptr {

@@ -227,3 +335,6 @@ function __promisify__(hostname: string): Promise<NaptrRecord[]>;

function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolveNs(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolveNs {

@@ -233,3 +344,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolvePtr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolvePtr {

@@ -239,3 +353,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
function resolveSoa(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
): void;
namespace resolveSoa {

@@ -245,3 +362,6 @@ function __promisify__(hostname: string): Promise<SoaRecord>;

function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
function resolveSrv(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
namespace resolveSrv {

@@ -251,3 +371,6 @@ function __promisify__(hostname: string): Promise<SrvRecord[]>;

function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
function resolveTxt(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
namespace resolveTxt {

@@ -257,3 +380,6 @@ function __promisify__(hostname: string): Promise<string[][]>;

function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
function resolveAny(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
namespace resolveAny {

@@ -267,3 +393,3 @@ function __promisify__(hostname: string): Promise<AnyRecord[]>;

function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;

@@ -330,3 +456,3 @@ // Error codes

function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
function lookupService(address: string, port: number): Promise<{ hostname: string; service: string }>;

@@ -345,3 +471,6 @@ function resolve(hostname: string): Promise<string[]>;

function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
function resolve(
hostname: string,
rrtype: string,
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;

@@ -378,3 +507,3 @@ function resolve4(hostname: string): Promise<string[]>;

function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;

@@ -403,4 +532,4 @@ class Resolver {

}
declare module 'node:dns' {
export * from 'dns';
declare module "node:dns" {
export * from "dns";
}

@@ -1,3 +0,3 @@

declare module 'domain' {
import EventEmitter = require('events');
declare module "domain" {
import EventEmitter = require("events");

@@ -25,4 +25,4 @@ global {

}
declare module 'node:domain' {
export * from 'domain';
declare module "node:domain" {
export * from "domain";
}

@@ -1,2 +0,2 @@

declare module 'events' {
declare module "events" {
interface EventEmitterOptions {

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

import internal = require('events');
import internal = require("events");
namespace EventEmitter {

@@ -80,5 +80,5 @@ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4

}
declare module 'node:events' {
import events = require('events');
declare module "node:events" {
import events = require("events");
export = events;
}

@@ -1,2 +0,2 @@

declare module 'fs/promises' {
declare module "fs/promises" {
import {

@@ -20,3 +20,3 @@ BaseEncodingOptions,

WriteVResult,
} from 'fs';
} from "fs";

@@ -39,3 +39,9 @@ interface FileHandle {

*/
appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null): Promise<void>;
appendFile(
data: string | Uint8Array,
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

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

*/
read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
read<TBuffer extends Uint8Array>(
buffer: TBuffer,
offset?: number | null,
length?: number | null,
position?: number | null,
): Promise<{ bytesRead: number; buffer: TBuffer }>;

@@ -80,3 +91,3 @@ /**

*/
readFile(options?: { encoding?: null | undefined, flag?: OpenMode | undefined } | null): Promise<Buffer>;
readFile(options?: { encoding?: null | undefined; flag?: OpenMode | undefined } | null): Promise<Buffer>;

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

*/
readFile(options: { encoding: BufferEncoding, flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;
readFile(options: { encoding: BufferEncoding; flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;

@@ -98,3 +109,5 @@ /**

*/
readFile(options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
readFile(
options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null,
): Promise<string | Buffer>;

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

*/
write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
write<TBuffer extends Uint8Array>(
buffer: TBuffer,
offset?: number | null,
length?: number | null,
position?: number | null,
): Promise<{ bytesWritten: number; buffer: TBuffer }>;

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

*/
write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
write(
data: string | Uint8Array,
position?: number | null,
encoding?: BufferEncoding | null,
): Promise<{ bytesWritten: number; buffer: string }>;

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

*/
writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null): Promise<void>;
writeFile(
data: string | Uint8Array,
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -220,3 +248,3 @@ /**

position?: number | null,
): Promise<{ bytesRead: number, buffer: TBuffer }>;
): Promise<{ bytesRead: number; buffer: TBuffer }>;

@@ -237,3 +265,5 @@ /**

offset?: number | null,
length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
length?: number | null,
position?: number | null,
): Promise<{ bytesWritten: number; buffer: TBuffer }>;

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

*/
function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
function write(
handle: FileHandle,
string: string,
position?: number | null,
encoding?: BufferEncoding | null,
): Promise<{ bytesWritten: number; buffer: string }>;

@@ -304,3 +339,3 @@ /**

*/
function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }): Promise<string | undefined>;

@@ -313,3 +348,6 @@ /**

*/
function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false | undefined; }) | null): Promise<void>;
function mkdir(
path: PathLike,
options?: Mode | (MakeDirectoryOptions & { recursive?: false | undefined }) | null,
): Promise<void>;

@@ -329,3 +367,6 @@ /**

*/
function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null): Promise<string[]>;
function readdir(
path: PathLike,
options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null,
): Promise<string[]>;

@@ -337,3 +378,6 @@ /**

*/
function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false | undefined } | "buffer"): Promise<Buffer[]>;
function readdir(
path: PathLike,
options: { encoding: "buffer"; withFileTypes?: false | undefined } | "buffer",
): Promise<Buffer[]>;

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

*/
function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null): Promise<string[] | Buffer[]>;
function readdir(
path: PathLike,
options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null,
): Promise<string[] | Buffer[]>;

@@ -537,3 +584,6 @@ /**

data: string | Uint8Array,
options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -556,3 +606,6 @@

data: string | Uint8Array,
options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -567,3 +620,6 @@

*/
function readFile(path: PathLike | FileHandle, options?: { encoding?: null | undefined, flag?: OpenMode | undefined } | null): Promise<Buffer>;
function readFile(
path: PathLike | FileHandle,
options?: { encoding?: null | undefined; flag?: OpenMode | undefined } | null,
): Promise<Buffer>;

@@ -577,3 +633,6 @@ /**

*/
function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;
function readFile(
path: PathLike | FileHandle,
options: { encoding: BufferEncoding; flag?: OpenMode | undefined } | BufferEncoding,
): Promise<string>;

@@ -587,8 +646,11 @@ /**

*/
function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
function readFile(
path: PathLike | FileHandle,
options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null,
): Promise<string | Buffer>;
function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
}
declare module 'node:fs/promises' {
export * from 'fs/promises';
declare module "node:fs/promises" {
export * from "fs/promises";
}

@@ -74,7 +74,18 @@ // Declare "static" methods in Error

// Buffer class
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
type BufferEncoding =
| "ascii"
| "utf8"
| "utf-8"
| "utf16le"
| "ucs2"
| "ucs-2"
| "base64"
| "base64url"
| "latin1"
| "binary"
| "hex";
type WithImplicitCoercion<T> = T | { valueOf(): T };
//#region borrowed
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib

@@ -122,3 +133,3 @@ /**

};
//#endregion borrowed
// #endregion borrowed

@@ -157,3 +168,2 @@ /**

*
*
* @param arrayBuffer The ArrayBuffer with which to share memory.

@@ -185,3 +195,7 @@ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.

*/
static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
static from(
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
byteOffset?: number,
length?: number,
): Buffer;
/**

@@ -198,3 +212,6 @@ * Creates a new Buffer using the passed {data}

*/
static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
static from(
str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string },
encoding?: BufferEncoding,
): Buffer;
/**

@@ -227,3 +244,3 @@ * Creates a new Buffer using the passed {data}

string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
encoding?: BufferEncoding
encoding?: BufferEncoding,
): number;

@@ -278,3 +295,3 @@ /**

toString(encoding?: BufferEncoding, start?: number, end?: number): string;
toJSON(): { type: 'Buffer'; data: number[] };
toJSON(): { type: "Buffer"; data: number[] };
equals(otherBuffer: Uint8Array): boolean;

@@ -286,3 +303,3 @@ compare(

sourceStart?: number,
sourceEnd?: number
sourceEnd?: number,
): number;

@@ -472,3 +489,3 @@ copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;

*/
getters?: 'get' | 'set' | boolean | undefined;
getters?: "get" | "set" | boolean | undefined;
showHidden?: boolean | undefined;

@@ -593,3 +610,3 @@ /**

isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;

@@ -610,3 +627,3 @@ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;

interface ReadWriteStream extends ReadableStream, WritableStream { }
interface ReadWriteStream extends ReadableStream, WritableStream {}

@@ -725,3 +742,3 @@ interface Global {

interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined; }): string;
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;

@@ -731,5 +748,5 @@ }

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;
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}

@@ -736,0 +753,0 @@ interface Module {

@@ -1,72 +0,72 @@

declare module 'http' {
import * as stream from 'stream';
import { URL } from 'url';
import { EventEmitter } from 'events';
import { Socket, Server as NetServer, LookupFunction } from 'net';
declare module "http" {
import * as stream from "stream";
import { URL } from "url";
import { EventEmitter } from "events";
import { LookupFunction, Server as NetServer, Socket } from "net";
// incoming headers will never contain number
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
'accept'?: string | undefined;
'accept-language'?: string | undefined;
'accept-patch'?: string | undefined;
'accept-ranges'?: string | undefined;
'access-control-allow-credentials'?: string | undefined;
'access-control-allow-headers'?: string | undefined;
'access-control-allow-methods'?: string | undefined;
'access-control-allow-origin'?: string | undefined;
'access-control-expose-headers'?: string | undefined;
'access-control-max-age'?: string | undefined;
'access-control-request-headers'?: string | undefined;
'access-control-request-method'?: string | undefined;
'age'?: string | undefined;
'allow'?: string | undefined;
'alt-svc'?: string | undefined;
'authorization'?: string | undefined;
'cache-control'?: string | undefined;
'connection'?: string | undefined;
'content-disposition'?: string | undefined;
'content-encoding'?: string | undefined;
'content-language'?: string | undefined;
'content-length'?: string | undefined;
'content-location'?: string | undefined;
'content-range'?: string | undefined;
'content-type'?: string | undefined;
'cookie'?: string | undefined;
'date'?: string | undefined;
'etag'?: string | undefined;
'expect'?: string | undefined;
'expires'?: string | undefined;
'forwarded'?: string | undefined;
'from'?: string | undefined;
'host'?: string | undefined;
'if-match'?: string | undefined;
'if-modified-since'?: string | undefined;
'if-none-match'?: string | undefined;
'if-unmodified-since'?: string | undefined;
'last-modified'?: string | undefined;
'location'?: string | undefined;
'origin'?: string | undefined;
'pragma'?: string | undefined;
'proxy-authenticate'?: string | undefined;
'proxy-authorization'?: string | undefined;
'public-key-pins'?: string | undefined;
'range'?: string | undefined;
'referer'?: string | undefined;
'retry-after'?: string | undefined;
'sec-websocket-accept'?: string | undefined;
'sec-websocket-extensions'?: string | undefined;
'sec-websocket-key'?: string | undefined;
'sec-websocket-protocol'?: string | undefined;
'sec-websocket-version'?: string | undefined;
'set-cookie'?: string[] | undefined;
'strict-transport-security'?: string | undefined;
'tk'?: string | undefined;
'trailer'?: string | undefined;
'transfer-encoding'?: string | undefined;
'upgrade'?: string | undefined;
'user-agent'?: string | undefined;
'vary'?: string | undefined;
'via'?: string | undefined;
'warning'?: string | undefined;
'www-authenticate'?: string | undefined;
"accept"?: string | undefined;
"accept-language"?: string | undefined;
"accept-patch"?: string | undefined;
"accept-ranges"?: string | undefined;
"access-control-allow-credentials"?: string | undefined;
"access-control-allow-headers"?: string | undefined;
"access-control-allow-methods"?: string | undefined;
"access-control-allow-origin"?: string | undefined;
"access-control-expose-headers"?: string | undefined;
"access-control-max-age"?: string | undefined;
"access-control-request-headers"?: string | undefined;
"access-control-request-method"?: string | undefined;
"age"?: string | undefined;
"allow"?: string | undefined;
"alt-svc"?: string | undefined;
"authorization"?: string | undefined;
"cache-control"?: string | undefined;
"connection"?: string | undefined;
"content-disposition"?: string | undefined;
"content-encoding"?: string | undefined;
"content-language"?: string | undefined;
"content-length"?: string | undefined;
"content-location"?: string | undefined;
"content-range"?: string | undefined;
"content-type"?: string | undefined;
"cookie"?: string | undefined;
"date"?: string | undefined;
"etag"?: string | undefined;
"expect"?: string | undefined;
"expires"?: string | undefined;
"forwarded"?: string | undefined;
"from"?: string | undefined;
"host"?: string | undefined;
"if-match"?: string | undefined;
"if-modified-since"?: string | undefined;
"if-none-match"?: string | undefined;
"if-unmodified-since"?: string | undefined;
"last-modified"?: string | undefined;
"location"?: string | undefined;
"origin"?: string | undefined;
"pragma"?: string | undefined;
"proxy-authenticate"?: string | undefined;
"proxy-authorization"?: string | undefined;
"public-key-pins"?: string | undefined;
"range"?: string | undefined;
"referer"?: string | undefined;
"retry-after"?: string | undefined;
"sec-websocket-accept"?: string | undefined;
"sec-websocket-extensions"?: string | undefined;
"sec-websocket-key"?: string | undefined;
"sec-websocket-protocol"?: string | undefined;
"sec-websocket-version"?: string | undefined;
"set-cookie"?: string[] | undefined;
"strict-transport-security"?: string | undefined;
"tk"?: string | undefined;
"trailer"?: string | undefined;
"transfer-encoding"?: string | undefined;
"upgrade"?: string | undefined;
"user-agent"?: string | undefined;
"vary"?: string | undefined;
"via"?: string | undefined;
"warning"?: string | undefined;
"www-authenticate"?: string | undefined;
}

@@ -163,89 +163,89 @@

addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Socket) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "connection", listener: (socket: Socket) => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
addListener(event: 'request', listener: RequestListener<Request, Response>): this;
addListener(event: "request", listener: RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Socket): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(event: 'checkContinue', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'checkExpectation', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: 'request', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: "close"): boolean;
emit(event: "connection", socket: Socket): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(event: "checkContinue", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "checkExpectation", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "clientError", err: Error, socket: stream.Duplex): boolean;
emit(event: "connect", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: "request", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "upgrade", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Socket) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: 'request', listener: RequestListener<Request, Response>): this;
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: "close", listener: () => void): this;
on(event: "connection", listener: (socket: Socket) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "checkContinue", listener: RequestListener<Request, Response>): this;
on(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
on(event: "connect", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: "request", listener: RequestListener<Request, Response>): this;
on(event: "upgrade", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Socket) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
once(event: "close", listener: () => void): this;
once(event: "connection", listener: (socket: Socket) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
once(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
once(event: 'request', listener: RequestListener<Request, Response>): this;
once(event: "request", listener: RequestListener<Request, Response>): this;
once(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Socket) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "connection", listener: (socket: Socket) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
prependListener(event: "request", listener: RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,

@@ -336,98 +336,98 @@ ): this;

addListener(event: 'abort', listener: () => void): this;
addListener(event: "abort", listener: () => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
addListener(event: 'continue', listener: () => void): this;
addListener(event: 'information', listener: (info: InformationEvent) => void): this;
addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
addListener(event: 'socket', listener: (socket: Socket) => void): this;
addListener(event: 'timeout', listener: () => void): this;
addListener(event: "continue", listener: () => void): this;
addListener(event: "information", listener: (info: InformationEvent) => void): this;
addListener(event: "response", listener: (response: IncomingMessage) => void): this;
addListener(event: "socket", listener: (socket: Socket) => void): this;
addListener(event: "timeout", listener: () => void): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'drain', listener: () => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'finish', listener: () => void): this;
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "drain", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "finish", listener: () => void): this;
addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
on(event: 'abort', listener: () => void): this;
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'continue', listener: () => void): this;
on(event: 'information', listener: (info: InformationEvent) => void): this;
on(event: 'response', listener: (response: IncomingMessage) => void): this;
on(event: 'socket', listener: (socket: Socket) => void): this;
on(event: 'timeout', listener: () => void): this;
on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'drain', listener: () => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'finish', listener: () => void): this;
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
on(event: "abort", listener: () => void): this;
on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: "continue", listener: () => void): this;
on(event: "information", listener: (info: InformationEvent) => void): this;
on(event: "response", listener: (response: IncomingMessage) => void): this;
on(event: "socket", listener: (socket: Socket) => void): this;
on(event: "timeout", listener: () => void): this;
on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: "close", listener: () => void): this;
on(event: "drain", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "finish", listener: () => void): this;
on(event: "pipe", listener: (src: stream.Readable) => void): this;
on(event: "unpipe", listener: (src: stream.Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: 'abort', listener: () => void): this;
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'continue', listener: () => void): this;
once(event: 'information', listener: (info: InformationEvent) => void): this;
once(event: 'response', listener: (response: IncomingMessage) => void): this;
once(event: 'socket', listener: (socket: Socket) => void): this;
once(event: 'timeout', listener: () => void): this;
once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'drain', listener: () => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'finish', listener: () => void): this;
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
once(event: "abort", listener: () => void): this;
once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: "continue", listener: () => void): this;
once(event: "information", listener: (info: InformationEvent) => void): this;
once(event: "response", listener: (response: IncomingMessage) => void): this;
once(event: "socket", listener: (socket: Socket) => void): this;
once(event: "timeout", listener: () => void): this;
once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: "close", listener: () => void): this;
once(event: "drain", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "finish", listener: () => void): this;
once(event: "pipe", listener: (src: stream.Readable) => void): this;
once(event: "unpipe", listener: (src: stream.Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: 'abort', listener: () => void): this;
prependListener(event: "abort", listener: () => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependListener(event: 'continue', listener: () => void): this;
prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
prependListener(event: 'socket', listener: (socket: Socket) => void): this;
prependListener(event: 'timeout', listener: () => void): this;
prependListener(event: "continue", listener: () => void): this;
prependListener(event: "information", listener: (info: InformationEvent) => void): this;
prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
prependListener(event: "socket", listener: (socket: Socket) => void): this;
prependListener(event: "timeout", listener: () => void): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'drain', listener: () => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'finish', listener: () => void): this;
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "drain", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "finish", listener: () => void): this;
prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'abort', listener: () => void): this;
prependOnceListener(event: "abort", listener: () => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependOnceListener(event: 'continue', listener: () => void): this;
prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
prependOnceListener(event: 'timeout', listener: () => void): this;
prependOnceListener(event: "continue", listener: () => void): this;
prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
prependOnceListener(event: "timeout", listener: () => void): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'drain', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'finish', listener: () => void): this;
prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "drain", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "finish", listener: () => void): this;
prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -502,3 +502,3 @@ }

*/
scheduling?: 'fifo' | 'lifo' | undefined;
scheduling?: "fifo" | "lifo" | undefined;
}

@@ -582,4 +582,4 @@

}
declare module 'node:http' {
export * from 'http';
declare module "node:http" {
export * from "http";
}

@@ -1,16 +0,16 @@

declare module 'http2' {
import EventEmitter = require('events');
import * as fs from 'fs';
import * as net from 'net';
import * as stream from 'stream';
import * as tls from 'tls';
import * as url from 'url';
declare module "http2" {
import EventEmitter = require("events");
import * as fs from "fs";
import * as net from "net";
import * as stream from "stream";
import * as tls from "tls";
import * as url from "url";
import {
IncomingHttpHeaders as Http1IncomingHttpHeaders,
IncomingMessage,
OutgoingHttpHeaders,
IncomingMessage,
ServerResponse,
} from 'http';
export { OutgoingHttpHeaders } from 'http';
} from "http";
export { OutgoingHttpHeaders } from "http";

@@ -190,5 +190,11 @@ export interface IncomingHttpStatusHeader {

addListener(event: "continue", listener: () => {}): this;
addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -203,23 +209,47 @@

on(event: "continue", listener: () => {}): this;
on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "continue", listener: () => {}): this;
once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "continue", listener: () => {}): this;
prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "continue", listener: () => {}): this;
prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -232,7 +262,22 @@ }

additionalHeaders(headers: OutgoingHttpHeaders): void;
pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
pushStream(
headers: OutgoingHttpHeaders,
callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
): void;
pushStream(
headers: OutgoingHttpHeaders,
options?: StreamPriorityOptions,
callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
): void;
respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
respondWithFD(
fd: number | fs.promises.FileHandle,
headers?: OutgoingHttpHeaders,
options?: ServerStreamFileResponseOptions,
): void;
respondWithFile(
path: string,
headers?: OutgoingHttpHeaders,
options?: ServerStreamFileResponseOptionsWithError,
): void;
}

@@ -291,7 +336,13 @@

ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
ping(
payload: NodeJS.ArrayBufferView,
callback: (err: Error | null, duration: number, payload: Buffer) => void,
): boolean;
ref(): void;
setLocalWindowSize(windowSize: number): void;
setTimeout(msecs: number, callback?: () => void): void;
settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
settings(
settings: Settings,
callback?: (err: Error | null, settings: Settings, duration: number) => void,
): void;
unref(): void;

@@ -301,4 +352,10 @@

addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
addListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
addListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
addListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -342,4 +399,10 @@ addListener(event: "ping", listener: () => void): this;

prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
prependListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
prependListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
prependListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -353,4 +416,10 @@ prependListener(event: "ping", listener: () => void): this;

prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
prependOnceListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
prependOnceListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -368,4 +437,14 @@ prependOnceListener(event: "ping", listener: () => void): this;

addListener(event: "origin", listener: (origins: string[]) => void): this;
addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
addListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -376,3 +455,8 @@

emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
emit(
event: "stream",
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
): boolean;
emit(event: string | symbol, ...args: any[]): boolean;

@@ -383,3 +467,10 @@

on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -389,4 +480,14 @@

once(event: "origin", listener: (origins: string[]) => void): this;
once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
once(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -396,4 +497,14 @@

prependListener(event: "origin", listener: (origins: string[]) => void): this;
prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -403,4 +514,14 @@

prependOnceListener(event: "origin", listener: (origins: string[]) => void): this;
prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependOnceListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -419,4 +540,10 @@ }

addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -429,15 +556,36 @@

on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -464,3 +612,3 @@ }

createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
protocol?: 'http:' | 'https:' | undefined;
protocol?: "http:" | "https:" | undefined;
}

@@ -475,6 +623,6 @@

export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
export interface ServerOptions extends ServerSessionOptions { }
export interface ServerOptions extends ServerSessionOptions {}

@@ -487,7 +635,16 @@ export interface SecureServerOptions extends SecureServerSessionOptions {

export interface Http2Server extends net.Server {
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
addListener(event: "sessionError", listener: (err: Error) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: "timeout", listener: () => void): this;

@@ -504,31 +661,61 @@ addListener(event: string | symbol, listener: (...args: any[]) => void): this;

on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(event: "session", listener: (session: ServerHttp2Session) => void): this;
on(event: "sessionError", listener: (err: Error) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: "timeout", listener: () => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(event: "session", listener: (session: ServerHttp2Session) => void): this;
once(event: "sessionError", listener: (err: Error) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: "timeout", listener: () => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependListener(event: "sessionError", listener: (err: Error) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: "timeout", listener: () => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: "timeout", listener: () => void): this;

@@ -541,7 +728,16 @@ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

export interface Http2SecureServer extends tls.Server {
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
addListener(event: "sessionError", listener: (err: Error) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: "timeout", listener: () => void): this;

@@ -560,7 +756,13 @@ addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(event: "session", listener: (session: ServerHttp2Session) => void): this;
on(event: "sessionError", listener: (err: Error) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: "timeout", listener: () => void): this;

@@ -570,7 +772,13 @@ on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(event: "session", listener: (session: ServerHttp2Session) => void): this;
once(event: "sessionError", listener: (err: Error) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: "timeout", listener: () => void): this;

@@ -580,7 +788,16 @@ once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependListener(event: "sessionError", listener: (err: Error) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: "timeout", listener: () => void): this;

@@ -590,7 +807,16 @@ prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: "timeout", listener: () => void): this;

@@ -604,3 +830,8 @@ prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

export class Http2ServerRequest extends stream.Readable {
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
constructor(
stream: ServerHttp2Stream,
headers: IncomingHttpHeaders,
options: stream.ReadableOptions,
rawHeaders: ReadonlyArray<string>,
);

@@ -686,3 +917,3 @@ readonly aborted: boolean;

statusCode: number;
statusMessage: '';
statusMessage: "";
addTrailers(trailers: OutgoingHttpHeaders): void;

@@ -704,3 +935,6 @@ end(callback?: () => void): this;

writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
createPushResponse(
headers: OutgoingHttpHeaders,
callback: (err: Error | null, res: Http2ServerResponse) => void,
): void;

@@ -973,17 +1207,30 @@ addListener(event: "close", listener: () => void): this;

export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
export function createServer(
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2Server;
export function createServer(
options: ServerOptions,
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2Server;
export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
export function createSecureServer(
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2SecureServer;
export function createSecureServer(
options: SecureServerOptions,
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2SecureServer;
export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
export function connect(
authority: string | url.URL,
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): ClientHttp2Session;
export function connect(
authority: string | url.URL,
options?: ClientSessionOptions | SecureClientSessionOptions,
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): ClientHttp2Session;
}
declare module 'node:http2' {
export * from 'http2';
declare module "node:http2" {
export * from "http2";
}

@@ -1,6 +0,6 @@

declare module 'https' {
import { Duplex } from 'stream';
import * as tls from 'tls';
import * as http from 'http';
import { URL } from 'url';
declare module "https" {
import { Duplex } from "stream";
import * as tls from "tls";
import * as http from "http";
import { URL } from "url";

@@ -12,4 +12,6 @@ type ServerOptions<

type RequestOptions = http.RequestOptions &
tls.SecureContextOptions & {
type RequestOptions =
& http.RequestOptions
& tls.SecureContextOptions
& {
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;

@@ -44,9 +46,9 @@ rejectUnauthorized?: boolean | undefined; // Defaults to true

addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
addListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -59,27 +61,27 @@ certificate: Buffer,

addListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "connection", listener: (socket: Duplex) => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(event: "keylog", line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(
event: 'newSession',
event: "newSession",
sessionId: Buffer,

@@ -90,3 +92,3 @@ sessionData: Buffer,

emit(
event: 'OCSPRequest',
event: "OCSPRequest",
certificate: Buffer,

@@ -96,23 +98,23 @@ issuer: Buffer,

): boolean;
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Duplex): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(event: 'checkContinue', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'checkExpectation', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: 'request', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: "close"): boolean;
emit(event: "connection", socket: Duplex): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(event: "checkContinue", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "checkExpectation", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "clientError", err: Error, socket: Duplex): boolean;
emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: "request", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
on(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -125,25 +127,25 @@ certificate: Buffer,

on(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Duplex) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: 'request', listener: http.RequestListener<Request, Response>): this;
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: "close", listener: () => void): this;
on(event: "connection", listener: (socket: Duplex) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
on(event: "connect", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: "request", listener: http.RequestListener<Request, Response>): this;
on(event: "upgrade", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
once(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -156,25 +158,25 @@ certificate: Buffer,

once(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Duplex) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: 'request', listener: http.RequestListener<Request, Response>): this;
once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: "close", listener: () => void): this;
once(event: "connection", listener: (socket: Duplex) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
once(event: "connect", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: "request", listener: http.RequestListener<Request, Response>): this;
once(event: "upgrade", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -187,31 +189,31 @@ certificate: Buffer,

prependListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "connection", listener: (socket: Duplex) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependOnceListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -224,21 +226,21 @@ certificate: Buffer,

prependOnceListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,

@@ -279,4 +281,4 @@ ): this;

}
declare module 'node:https' {
export * from 'https';
declare module "node:https" {
export * from "https";
}

@@ -1,3 +0,3 @@

declare module 'module' {
import { URL } from 'url';
declare module "module" {
import { URL } from "url";
namespace Module {

@@ -53,5 +53,5 @@ /**

}
declare module 'node:module' {
import module = require('module');
declare module "node:module" {
import module = require("module");
export = module;
}

@@ -1,5 +0,5 @@

declare module 'net' {
import * as stream from 'stream';
import EventEmitter = require('events');
import * as dns from 'dns';
declare module "net" {
import * as stream from "stream";
import EventEmitter = require("events");
import * as dns from "dns";

@@ -59,3 +59,3 @@ type LookupFunction = (

type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";

@@ -131,3 +131,6 @@ class Socket extends stream.Duplex {

addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
addListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
addListener(event: "ready", listener: () => void): this;

@@ -154,3 +157,6 @@ addListener(event: "timeout", listener: () => void): this;

on(event: "error", listener: (err: Error) => void): this;
on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
on(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
on(event: "ready", listener: () => void): this;

@@ -166,3 +172,6 @@ on(event: "timeout", listener: () => void): this;

once(event: "error", listener: (err: Error) => void): this;
once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
once(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
once(event: "ready", listener: () => void): this;

@@ -178,3 +187,6 @@ once(event: "timeout", listener: () => void): this;

prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
prependListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
prependListener(event: "ready", listener: () => void): this;

@@ -190,3 +202,6 @@ prependListener(event: "timeout", listener: () => void): this;

prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
prependOnceListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
prependOnceListener(event: "ready", listener: () => void): this;

@@ -313,4 +328,4 @@ prependOnceListener(event: "timeout", listener: () => void): this;

}
declare module 'node:net' {
export * from 'net';
declare module "node:net" {
export * from "net";
}

@@ -1,2 +0,2 @@

declare module 'os' {
declare module "os" {
interface CpuInfo {

@@ -52,3 +52,3 @@ model: string;

function homedir(): string;
function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;

@@ -242,4 +242,4 @@

}
declare module 'node:os' {
export * from 'os';
declare module "node:os" {
export * from "os";
}
{
"name": "@types/node",
"version": "14.18.62",
"version": "14.18.63",
"description": "TypeScript definitions for Node.js",

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

"dependencies": {},
"typesPublisherContentHash": "c7386a216f81a553af784fdd661aa84c62d3c4108df36f16948cbee358706157",
"typesPublisherContentHash": "094b5f53a7bae39684ec23bea14130aaf2772995fa789fc757b734b2f16b28f0",
"typeScriptVersion": "4.5"
}

@@ -1,2 +0,2 @@

declare module 'path' {
declare module "path" {
namespace path {

@@ -125,7 +125,7 @@ /**

*/
readonly sep: '\\' | '/';
readonly sep: "\\" | "/";
/**
* The platform-specific file delimiter. ';' or ':'.
*/
readonly delimiter: ';' | ':';
readonly delimiter: ";" | ":";
/**

@@ -166,5 +166,5 @@ * Returns an object from a path string - the opposite of format().

}
declare module 'node:path' {
import path = require('path');
declare module "node:path" {
import path = require("path");
export = path;
}

@@ -1,5 +0,5 @@

declare module 'perf_hooks' {
import { AsyncResource } from 'async_hooks';
declare module "perf_hooks" {
import { AsyncResource } from "async_hooks";
type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http";

@@ -272,4 +272,4 @@ interface PerformanceEntry {

}
declare module 'node:perf_hooks' {
export * from 'perf_hooks';
declare module "node:perf_hooks" {
export * from "perf_hooks";
}

@@ -1,3 +0,3 @@

declare module 'process' {
import * as tty from 'tty';
declare module "process" {
import * as tty from "tty";

@@ -46,21 +46,55 @@ global {

type Platform = 'aix'
| 'android'
| 'darwin'
| 'freebsd'
| 'linux'
| 'openbsd'
| 'sunos'
| 'win32'
| 'cygwin'
| 'netbsd';
type Platform =
| "aix"
| "android"
| "darwin"
| "freebsd"
| "linux"
| "openbsd"
| "sunos"
| "win32"
| "cygwin"
| "netbsd";
type Signals =
"SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
"SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
"SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
"SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
| "SIGABRT"
| "SIGALRM"
| "SIGBUS"
| "SIGCHLD"
| "SIGCONT"
| "SIGFPE"
| "SIGHUP"
| "SIGILL"
| "SIGINT"
| "SIGIO"
| "SIGIOT"
| "SIGKILL"
| "SIGPIPE"
| "SIGPOLL"
| "SIGPROF"
| "SIGPWR"
| "SIGQUIT"
| "SIGSEGV"
| "SIGSTKFLT"
| "SIGSTOP"
| "SIGSYS"
| "SIGTERM"
| "SIGTRAP"
| "SIGTSTP"
| "SIGTTIN"
| "SIGTTOU"
| "SIGUNUSED"
| "SIGURG"
| "SIGUSR1"
| "SIGUSR2"
| "SIGVTALRM"
| "SIGWINCH"
| "SIGXCPU"
| "SIGXFSZ"
| "SIGBREAK"
| "SIGLOST"
| "SIGINFO";
type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
type MultipleResolveType = 'resolve' | 'reject';
type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
type MultipleResolveType = "resolve" | "reject";

@@ -282,3 +316,8 @@ type BeforeExitListener = (code: number) => void;

// Worker
send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean | undefined}, callback?: (error: Error | null) => void): boolean;
send?(
message: any,
sendHandle?: any,
options?: { swallowErrors?: boolean | undefined },
callback?: (error: Error | null) => void,
): boolean;
disconnect(): void;

@@ -412,5 +451,5 @@ connected: boolean;

}
declare module 'node:process' {
import process = require('process');
declare module "node:process" {
import process = require("process");
export = process;
}

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

*/
declare module 'punycode' {
declare module "punycode" {
/**

@@ -77,4 +77,4 @@ * @deprecated since v7.0.0

}
declare module 'node:punycode' {
export * from 'punycode';
declare module "node:punycode" {
export * from "punycode";
}

@@ -1,2 +0,2 @@

declare module 'querystring' {
declare module "querystring" {
interface StringifyOptions {

@@ -11,5 +11,15 @@ encodeURIComponent?: ((str: string) => string) | undefined;

interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
interface ParsedUrlQueryInput extends
NodeJS.Dict<
| string
| number
| boolean
| ReadonlyArray<string>
| ReadonlyArray<number>
| ReadonlyArray<boolean>
| null
>
{
}

@@ -30,4 +40,4 @@

}
declare module 'node:querystring' {
export * from 'querystring';
declare module "node:querystring" {
export * from "querystring";
}

@@ -1,3 +0,3 @@

declare module 'readline' {
import EventEmitter = require('events');
declare module "readline" {
import EventEmitter = require("events");

@@ -30,3 +30,8 @@ interface Key {

*/
protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
protected constructor(
input: NodeJS.ReadableStream,
output?: NodeJS.WritableStream,
completer?: Completer | AsyncCompleter,
terminal?: boolean,
);
/**

@@ -145,3 +150,8 @@ * NOTE: According to the documentation:

function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
function createInterface(
input: NodeJS.ReadableStream,
output?: NodeJS.WritableStream,
completer?: Completer | AsyncCompleter,
terminal?: boolean,
): Interface;
function createInterface(options: ReadLineOptions): Interface;

@@ -174,4 +184,4 @@ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;

}
declare module 'node:readline' {
export * from 'readline';
declare module "node:readline" {
export * from "readline";
}

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

### Additional Details
* Last updated: Wed, 20 Sep 2023 03:06:41 GMT
* Last updated: Sat, 23 Sep 2023 20:38:33 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`

@@ -1,5 +0,5 @@

declare module 'repl' {
import { Interface, Completer, AsyncCompleter } from 'readline';
import { Context } from 'vm';
import { InspectOptions } from 'util';
declare module "repl" {
import { AsyncCompleter, Completer, Interface } from "readline";
import { Context } from "vm";
import { InspectOptions } from "util";

@@ -94,3 +94,9 @@ interface ReplOptions {

type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
type REPLEval = (
this: REPLServer,
evalCmd: string,
context: Context,
file: string,
cb: (err: Error | null, result: any) => void,
) => void;
type REPLWriter = (this: REPLServer, obj: any) => string;

@@ -397,4 +403,4 @@

}
declare module 'node:repl' {
export * from 'repl';
declare module "node:repl" {
export * from "repl";
}

@@ -1,6 +0,6 @@

declare module 'stream' {
import EventEmitter = require('events');
declare module "stream" {
import EventEmitter = require("events");
class internal extends EventEmitter {
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
}

@@ -133,4 +133,13 @@

emitClose?: boolean | undefined;
write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
write?(
this: Writable,
chunk: any,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
): void;
writev?(
this: Writable,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;

@@ -152,3 +161,6 @@ final?(this: Writable, callback: (error?: Error | null) => void): void;

_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
_writev?(
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;

@@ -242,3 +254,7 @@ _final(callback: (error?: Error | null) => void): void;

write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
writev?(
this: Duplex,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
final?(this: Duplex, callback: (error?: Error | null) => void): void;

@@ -260,3 +276,6 @@ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;

_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
_writev?(
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
_destroy(error: Error | null, callback: (error: Error | null) => void): void;

@@ -287,85 +306,85 @@ _final(callback: (error?: Error | null) => void): void;

*/
addListener(event: 'close', listener: () => void): this;
addListener(event: 'data', listener: (chunk: any) => void): this;
addListener(event: 'drain', listener: () => void): this;
addListener(event: 'end', listener: () => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'finish', listener: () => void): this;
addListener(event: 'pause', listener: () => void): this;
addListener(event: 'pipe', listener: (src: Readable) => void): this;
addListener(event: 'readable', listener: () => void): this;
addListener(event: 'resume', listener: () => void): this;
addListener(event: 'unpipe', listener: (src: Readable) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "data", listener: (chunk: any) => void): this;
addListener(event: "drain", listener: () => void): this;
addListener(event: "end", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "finish", listener: () => void): this;
addListener(event: "pause", listener: () => void): this;
addListener(event: "pipe", listener: (src: Readable) => void): this;
addListener(event: "readable", listener: () => void): this;
addListener(event: "resume", listener: () => void): this;
addListener(event: "unpipe", listener: (src: Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
emit(event: 'close'): boolean;
emit(event: 'data', chunk: any): boolean;
emit(event: 'drain'): boolean;
emit(event: 'end'): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'finish'): boolean;
emit(event: 'pause'): boolean;
emit(event: 'pipe', src: Readable): boolean;
emit(event: 'readable'): boolean;
emit(event: 'resume'): boolean;
emit(event: 'unpipe', src: Readable): boolean;
emit(event: "close"): boolean;
emit(event: "data", chunk: any): boolean;
emit(event: "drain"): boolean;
emit(event: "end"): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "finish"): boolean;
emit(event: "pause"): boolean;
emit(event: "pipe", src: Readable): boolean;
emit(event: "readable"): boolean;
emit(event: "resume"): boolean;
emit(event: "unpipe", src: Readable): boolean;
emit(event: string | symbol, ...args: any[]): boolean;
on(event: 'close', listener: () => void): this;
on(event: 'data', listener: (chunk: any) => void): this;
on(event: 'drain', listener: () => void): this;
on(event: 'end', listener: () => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'finish', listener: () => void): this;
on(event: 'pause', listener: () => void): this;
on(event: 'pipe', listener: (src: Readable) => void): this;
on(event: 'readable', listener: () => void): this;
on(event: 'resume', listener: () => void): this;
on(event: 'unpipe', listener: (src: Readable) => void): this;
on(event: "close", listener: () => void): this;
on(event: "data", listener: (chunk: any) => void): this;
on(event: "drain", listener: () => void): this;
on(event: "end", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "finish", listener: () => void): this;
on(event: "pause", listener: () => void): this;
on(event: "pipe", listener: (src: Readable) => void): this;
on(event: "readable", listener: () => void): this;
on(event: "resume", listener: () => void): this;
on(event: "unpipe", listener: (src: Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'data', listener: (chunk: any) => void): this;
once(event: 'drain', listener: () => void): this;
once(event: 'end', listener: () => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'finish', listener: () => void): this;
once(event: 'pause', listener: () => void): this;
once(event: 'pipe', listener: (src: Readable) => void): this;
once(event: 'readable', listener: () => void): this;
once(event: 'resume', listener: () => void): this;
once(event: 'unpipe', listener: (src: Readable) => void): this;
once(event: "close", listener: () => void): this;
once(event: "data", listener: (chunk: any) => void): this;
once(event: "drain", listener: () => void): this;
once(event: "end", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "finish", listener: () => void): this;
once(event: "pause", listener: () => void): this;
once(event: "pipe", listener: (src: Readable) => void): this;
once(event: "readable", listener: () => void): this;
once(event: "resume", listener: () => void): this;
once(event: "unpipe", listener: (src: Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'data', listener: (chunk: any) => void): this;
prependListener(event: 'drain', listener: () => void): this;
prependListener(event: 'end', listener: () => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'finish', listener: () => void): this;
prependListener(event: 'pause', listener: () => void): this;
prependListener(event: 'pipe', listener: (src: Readable) => void): this;
prependListener(event: 'readable', listener: () => void): this;
prependListener(event: 'resume', listener: () => void): this;
prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "data", listener: (chunk: any) => void): this;
prependListener(event: "drain", listener: () => void): this;
prependListener(event: "end", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "finish", listener: () => void): this;
prependListener(event: "pause", listener: () => void): this;
prependListener(event: "pipe", listener: (src: Readable) => void): this;
prependListener(event: "readable", listener: () => void): this;
prependListener(event: "resume", listener: () => void): this;
prependListener(event: "unpipe", listener: (src: Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
prependOnceListener(event: 'drain', listener: () => void): this;
prependOnceListener(event: 'end', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'finish', listener: () => void): this;
prependOnceListener(event: 'pause', listener: () => void): this;
prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
prependOnceListener(event: 'readable', listener: () => void): this;
prependOnceListener(event: 'resume', listener: () => void): this;
prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
prependOnceListener(event: "drain", listener: () => void): this;
prependOnceListener(event: "end", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "finish", listener: () => void): this;
prependOnceListener(event: "pause", listener: () => void): this;
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
prependOnceListener(event: "readable", listener: () => void): this;
prependOnceListener(event: "resume", listener: () => void): this;
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: 'close', listener: () => void): this;
removeListener(event: 'data', listener: (chunk: any) => void): this;
removeListener(event: 'drain', listener: () => void): this;
removeListener(event: 'end', listener: () => void): this;
removeListener(event: 'error', listener: (err: Error) => void): this;
removeListener(event: 'finish', listener: () => void): this;
removeListener(event: 'pause', listener: () => void): this;
removeListener(event: 'pipe', listener: (src: Readable) => void): this;
removeListener(event: 'readable', listener: () => void): this;
removeListener(event: 'resume', listener: () => void): this;
removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
removeListener(event: "close", listener: () => void): this;
removeListener(event: "data", listener: (chunk: any) => void): this;
removeListener(event: "drain", listener: () => void): this;
removeListener(event: "end", listener: () => void): this;
removeListener(event: "error", listener: (err: Error) => void): this;
removeListener(event: "finish", listener: () => void): this;
removeListener(event: "pause", listener: () => void): this;
removeListener(event: "pipe", listener: (src: Readable) => void): this;
removeListener(event: "readable", listener: () => void): this;
removeListener(event: "resume", listener: () => void): this;
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -378,4 +397,13 @@ }

read?(this: Transform, size: number): void;
write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
write?(
this: Transform,
chunk: any,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
): void;
writev?(
this: Transform,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
final?(this: Transform, callback: (error?: Error | null) => void): void;

@@ -393,3 +421,3 @@ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;

class PassThrough extends Transform { }
class PassThrough extends Transform {}

@@ -401,13 +429,32 @@ interface FinishedOptions {

}
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
function finished(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
options: FinishedOptions,
callback: (err?: NodeJS.ErrnoException | null) => void,
): () => void;
function finished(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
callback: (err?: NodeJS.ErrnoException | null) => void,
): () => void;
namespace finished {
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
function __promisify__(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
options?: FinishedOptions,
): Promise<void>;
}
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: T,
callback?: (err: NodeJS.ErrnoException | null) => void,
): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: T,
callback?: (err: NodeJS.ErrnoException | null) => void,
): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,

@@ -432,20 +479,33 @@ stream4: T,

stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
...streams: Array<
NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)
>
): NodeJS.WritableStream;
namespace pipeline {
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise<void>;
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,
stream4: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,
stream4: NodeJS.ReadWriteStream,
stream5: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
function __promisify__(
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>
): Promise<void>;

@@ -464,5 +524,5 @@ }

}
declare module 'node:stream' {
import stream = require('stream');
declare module "node:stream" {
import stream = require("stream");
export = stream;
}

@@ -1,2 +0,2 @@

declare module 'string_decoder' {
declare module "string_decoder" {
class StringDecoder {

@@ -8,4 +8,4 @@ constructor(encoding?: BufferEncoding);

}
declare module 'node:string_decoder' {
export * from 'string_decoder';
declare module "node:string_decoder" {
export * from "string_decoder";
}

@@ -1,2 +0,2 @@

declare module 'timers' {
declare module "timers" {
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;

@@ -17,4 +17,4 @@ namespace setTimeout {

}
declare module 'node:timers' {
export * from 'timers';
declare module "node:timers" {
export * from "timers";
}

@@ -1,4 +0,4 @@

declare module 'tls' {
import * as net from 'net';
import * as stream from 'stream';
declare module "tls" {
import * as net from "net";
import * as stream from "stream";

@@ -269,3 +269,6 @@ const CLIENT_RENEG_LIMIT: number;

*/
renegotiate(options: { rejectUnauthorized?: boolean | undefined, requestCert?: boolean | undefined }, callback: (err: Error | null) => void): undefined | boolean;
renegotiate(
options: { rejectUnauthorized?: boolean | undefined; requestCert?: boolean | undefined },
callback: (err: Error | null) => void,
): undefined | boolean;
/**

@@ -408,3 +411,2 @@ * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).

/**
*
* @param socket

@@ -489,3 +491,2 @@ * @param identity identity parameter sent from the client.

/**
*
* The server.setSecureContext() method replaces the

@@ -514,5 +515,18 @@ * secure context of an existing server. Existing connections to the

addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
addListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
addListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
addListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -524,4 +538,13 @@ addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
emit(
event: "OCSPRequest",
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
): boolean;
emit(
event: "resumeSession",
sessionId: Buffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
): boolean;
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;

@@ -533,4 +556,14 @@ emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;

on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
on(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
on(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -541,5 +574,18 @@ on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
once(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
once(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
once(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -550,5 +596,18 @@ once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
prependListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
prependListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -559,5 +618,18 @@ prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
prependOnceListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
prependOnceListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependOnceListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -572,3 +644,3 @@ prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";

@@ -749,3 +821,8 @@ interface SecureContextOptions {

function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
function connect(
port: number,
host?: string,
options?: ConnectionOptions,
secureConnectListener?: () => void,
): TLSSocket;
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;

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

*/
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
function createSecurePair(
credentials?: SecureContext,
isServer?: boolean,
requestCert?: boolean,
rejectUnauthorized?: boolean,
): SecurePair;
function createSecureContext(options?: SecureContextOptions): SecureContext;

@@ -794,4 +876,4 @@ function getCiphers(): string[];

}
declare module 'node:tls' {
export * from 'tls';
declare module "node:tls" {
export * from "tls";
}

@@ -1,2 +0,2 @@

declare module 'trace_events' {
declare module "trace_events" {
/**

@@ -62,4 +62,4 @@ * The `Tracing` object is used to enable or disable tracing for sets of

}
declare module 'node:trace_events' {
export * from 'trace_events';
declare module "node:trace_events" {
export * from "trace_events";
}

@@ -1,2 +0,2 @@

declare module 'assert' {
declare module "assert" {
/** An alias of `assert.ok()`. */

@@ -10,3 +10,3 @@ function assert(value: any, message?: string | Error): asserts value;

generatedMessage: boolean;
code: 'ERR_ASSERTION';
code: "ERR_ASSERTION";

@@ -46,3 +46,3 @@ constructor(options?: {

type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;

@@ -96,29 +96,31 @@ function fail(message?: string | Error): never;

const strict: Omit<
typeof assert,
| 'equal'
| 'notEqual'
| 'deepEqual'
| 'notDeepEqual'
| 'ok'
| 'strictEqual'
| 'deepStrictEqual'
| 'ifError'
| 'strict'
> & {
(value: any, message?: string | Error): asserts value;
equal: typeof strictEqual;
notEqual: typeof notStrictEqual;
deepEqual: typeof deepStrictEqual;
notDeepEqual: typeof notDeepStrictEqual;
const strict:
& Omit<
typeof assert,
| "equal"
| "notEqual"
| "deepEqual"
| "notDeepEqual"
| "ok"
| "strictEqual"
| "deepStrictEqual"
| "ifError"
| "strict"
>
& {
(value: any, message?: string | Error): asserts value;
equal: typeof strictEqual;
notEqual: typeof notStrictEqual;
deepEqual: typeof deepStrictEqual;
notDeepEqual: typeof notDeepStrictEqual;
// Mapped types and assertion functions are incompatible?
// TS2775: Assertions require every name in the call target
// to be declared with an explicit type annotation.
ok: typeof ok;
strictEqual: typeof strictEqual;
deepStrictEqual: typeof deepStrictEqual;
ifError: typeof ifError;
strict: typeof strict;
};
// Mapped types and assertion functions are incompatible?
// TS2775: Assertions require every name in the call target
// to be declared with an explicit type annotation.
ok: typeof ok;
strictEqual: typeof strictEqual;
deepStrictEqual: typeof deepStrictEqual;
ifError: typeof ifError;
strict: typeof strict;
};
}

@@ -128,5 +130,5 @@

}
declare module 'node:assert' {
import assert = require('assert');
declare module "node:assert" {
import assert = require("assert");
export = assert;
}
/**
* Async Hooks module: https://nodejs.org/api/async_hooks.html
*/
declare module 'async_hooks' {
declare module "async_hooks" {
/**

@@ -86,16 +86,16 @@ * Returns the asyncId of the current execution context.

interface AsyncResourceOptions {
/**
* The ID of the execution context that created this async event.
* @default executionAsyncId()
*/
triggerAsyncId?: number | undefined;
/**
* The ID of the execution context that created this async event.
* @default executionAsyncId()
*/
triggerAsyncId?: number | undefined;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* @default false
*/
requireManualDestroy?: boolean | undefined;
/**
* Disables automatic `emitDestroy` when the object is garbage collected.
* This usually does not need to be set (even if `emitDestroy` is called
* manually), unless the resource's `asyncId` is retrieved and the
* sensitive API's `emitDestroy` is called with it.
* @default false
*/
requireManualDestroy?: boolean | undefined;
}

@@ -117,3 +117,3 @@

*/
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);

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

*/
static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
static bind<Func extends (...args: any[]) => any>(
fn: Func,
type?: string,
): Func & { asyncResource: AsyncResource };

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

*/
runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
runInAsyncScope<This, Result>(
fn: (this: This, ...args: any[]) => Result,
thisArg?: This,
...args: any[]
): Result;

@@ -232,4 +239,4 @@ /**

}
declare module 'node:async_hooks' {
export * from 'async_hooks';
declare module "node:async_hooks" {
export * from "async_hooks";
}

@@ -1,3 +0,3 @@

declare module 'buffer' {
import { BinaryLike } from 'node:crypto';
declare module "buffer" {
import { BinaryLike } from "node:crypto";
export const INSPECT_MAX_BYTES: number;

@@ -87,4 +87,4 @@ export const kMaxLength: number;

}
declare module 'node:buffer' {
export * from 'buffer';
declare module "node:buffer" {
export * from "buffer";
}

@@ -1,6 +0,6 @@

declare module 'child_process' {
import { BaseEncodingOptions } from 'fs';
import * as events from 'events';
import * as net from 'net';
import { Writable, Readable, Stream, Pipe } from 'stream';
declare module "child_process" {
import { BaseEncodingOptions } from "fs";
import * as events from "events";
import * as net from "net";
import { Pipe, Readable, Stream, Writable } from "stream";

@@ -20,3 +20,3 @@ type Serializable = string | object | number | boolean;

Readable | Writable | null | undefined, // extra
Readable | Writable | null | undefined // extra
Readable | Writable | null | undefined, // extra
];

@@ -33,3 +33,8 @@ readonly killed: boolean;

send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
send(
message: Serializable,
sendHandle?: SendHandle,
options?: MessageOptions,
callback?: (error: Error | null) => void,
): boolean;
disconnect(): void;

@@ -84,6 +89,12 @@ unref(): void;

prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
prependOnceListener(
event: "close",
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
): this;
prependOnceListener(event: "disconnect", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
prependOnceListener(
event: "exit",
listener: (code: number | null, signal: NodeJS.Signals | null) => void,
): this;
prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;

@@ -102,3 +113,3 @@ }

Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
Readable | Writable | null | undefined, // extra, no modification
];

@@ -121,3 +132,3 @@ }

Readable | Writable | null | undefined, // extra, no modification
Readable | Writable | null | undefined // extra, no modification
Readable | Writable | null | undefined, // extra, no modification
];

@@ -130,5 +141,9 @@ }

type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
type StdioOptions =
| "pipe"
| "ignore"
| "inherit"
| Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
type SerializationType = 'json' | 'advanced';
type SerializationType = "json" | "advanced";

@@ -182,7 +197,7 @@ interface MessagingOptions {

interface SpawnOptionsWithoutStdio extends SpawnOptions {
stdio?: 'pipe' | Array<null | undefined | 'pipe'> | undefined;
stdio?: "pipe" | Array<null | undefined | "pipe"> | undefined;
}
type StdioNull = 'inherit' | 'ignore' | Stream;
type StdioPipe = undefined | null | 'pipe';
type StdioNull = "inherit" | "ignore" | Stream;
type StdioPipe = undefined | null | "pipe";

@@ -236,3 +251,7 @@ interface SpawnOptionsWithStdioTuple<

// overloads of spawn with 'args'
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
function spawn(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnOptionsWithoutStdio,
): ChildProcessWithoutNullStreams;

@@ -304,9 +323,20 @@ function spawn(

// no `options` definitely means stdout/stderr are `string`.
function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
function exec(
command: string,
options: { encoding: "buffer" | null } & ExecOptions,
callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
): ChildProcess;
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
options: { encoding: BufferEncoding } & ExecOptions,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -322,3 +352,7 @@ // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.

// `options` without an `encoding` means stdout/stderr are definitely `string`.
function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
function exec(
command: string,
options: ExecOptions,
callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -338,7 +372,19 @@ // fallback if nothing else matches. Worst case is always `string | Buffer`.

namespace exec {
function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(command: string): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options: { encoding: "buffer" | null } & ExecOptions,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
command: string,
options: { encoding: BufferEncoding } & ExecOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options: ExecOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
command: string,
options?: (BaseEncodingOptions & ExecOptions) | null,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
}

@@ -356,3 +402,3 @@

interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
encoding: 'buffer' | null;
encoding: "buffer" | null;
}

@@ -363,4 +409,4 @@ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {

type ExecFileException =
& Omit<ExecException, 'code'>
& Omit<NodeJS.ErrnoException, 'code'>
& Omit<ExecException, "code">
& Omit<NodeJS.ErrnoException, "code">
& { code?: string | number | undefined | null };

@@ -371,12 +417,27 @@

function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): ChildProcess;
// no `options` definitely means stdout/stderr are `string`.
function execFile(file: string, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptionsWithBufferEncoding,
callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,

@@ -388,5 +449,9 @@ options: ExecFileOptionsWithBufferEncoding,

// `options` with well known `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptionsWithStringEncoding,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,

@@ -412,8 +477,12 @@ options: ExecFileOptionsWithStringEncoding,

// `options` without an `encoding` means stdout/stderr are definitely `string`.
function execFile(file: string, options: ExecFileOptions, callback: (error: ExecFileException | null, stdout: string, stderr: string) => void): ChildProcess;
function execFile(
file: string,
options: ExecFileOptions,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;
function execFile(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptions,
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void
callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
): ChildProcess;

@@ -425,3 +494,6 @@

options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
callback:
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
| undefined
| null,
): ChildProcess;

@@ -432,3 +504,6 @@ function execFile(

options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
callback: ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
callback:
| ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
| undefined
| null,
): ChildProcess;

@@ -438,22 +513,52 @@

namespace execFile {
function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithBufferEncoding,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithBufferEncoding,
): PromiseWithChild<{ stdout: Buffer; stderr: Buffer }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithStringEncoding,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithStringEncoding,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: ExecFileOptionsWithOtherEncoding,
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptionsWithOtherEncoding,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
options: ExecFileOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: ExecFileOptions,
): PromiseWithChild<{ stdout: string; stderr: string }>;
function __promisify__(
file: string,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
function __promisify__(
file: string,
args: ReadonlyArray<string> | undefined | null,
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
): PromiseWithChild<{ stdout: string | Buffer; stderr: string | Buffer }>;
}

@@ -485,3 +590,3 @@

maxBuffer?: number | undefined;
encoding?: BufferEncoding | 'buffer' | null | undefined;
encoding?: BufferEncoding | "buffer" | null | undefined;
}

@@ -492,3 +597,3 @@ interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {

interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
encoding?: 'buffer' | null | undefined;
encoding?: "buffer" | null | undefined;
}

@@ -508,5 +613,17 @@ interface SpawnSyncReturns<T> {

function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptionsWithStringEncoding,
): SpawnSyncReturns<string>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptionsWithBufferEncoding,
): SpawnSyncReturns<Buffer>;
function spawnSync(
command: string,
args?: ReadonlyArray<string>,
options?: SpawnSyncOptions,
): SpawnSyncReturns<string | Buffer>;

@@ -528,3 +645,3 @@ interface ExecSyncOptions extends CommonOptions {

maxBuffer?: number | undefined;
encoding?: BufferEncoding | 'buffer' | null | undefined;
encoding?: BufferEncoding | "buffer" | null | undefined;
}

@@ -535,3 +652,3 @@ interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {

interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
encoding?: 'buffer' | null | undefined;
encoding?: "buffer" | null | undefined;
}

@@ -571,8 +688,20 @@ function execSync(command: string): Buffer;

function execFileSync(command: string, args: ReadonlyArray<string>): Buffer;
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
function execFileSync(command: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
function execFileSync(
command: string,
args: ReadonlyArray<string>,
options: ExecFileSyncOptionsWithStringEncoding,
): string;
function execFileSync(
command: string,
args: ReadonlyArray<string>,
options: ExecFileSyncOptionsWithBufferEncoding,
): Buffer;
function execFileSync(
command: string,
args?: ReadonlyArray<string>,
options?: ExecFileSyncOptions,
): string | Buffer;
}
declare module 'node:child_process' {
export * from 'child_process';
declare module "node:child_process" {
export * from "child_process";
}

@@ -1,8 +0,8 @@

declare module 'cluster' {
import * as child from 'child_process';
import EventEmitter = require('events');
import * as net from 'net';
declare module "cluster" {
import * as child from "child_process";
import EventEmitter = require("events");
import * as net from "net";
// interfaces
type SerializationType = 'json' | 'advanced';
type SerializationType = "json" | "advanced";
interface ClusterSettings {

@@ -25,3 +25,3 @@ execArgv?: string[] | undefined; // default: process.execArgv

port: number;
addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
}

@@ -32,3 +32,7 @@

process: child.ChildProcess;
send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
send(
message: child.Serializable,
sendHandle?: child.SendHandle,
callback?: (error: Error | null) => void,
): boolean;
kill(signal?: string): void;

@@ -55,3 +59,3 @@ destroy(signal?: string): void;

addListener(event: "listening", listener: (address: Address) => void): this;
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: () => void): this;

@@ -72,3 +76,3 @@

on(event: "listening", listener: (address: Address) => void): this;
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: () => void): this;

@@ -81,3 +85,3 @@

once(event: "listening", listener: (address: Address) => void): this;
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: () => void): this;

@@ -90,3 +94,3 @@

prependListener(event: "listening", listener: (address: Address) => void): this;
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: () => void): this;

@@ -99,3 +103,3 @@

prependOnceListener(event: "listening", listener: (address: Address) => void): this;
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "message", listener: (message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "online", listener: () => void): this;

@@ -134,3 +138,6 @@ }

addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this; // the handle is a net.Socket or net.Server object, or undefined.
addListener(event: "online", listener: (worker: Worker) => void): this;

@@ -153,3 +160,3 @@ addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
on(event: "online", listener: (worker: Worker) => void): this;

@@ -163,3 +170,3 @@ on(event: "setup", listener: (settings: ClusterSettings) => void): this;

once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
once(event: "online", listener: (worker: Worker) => void): this;

@@ -173,3 +180,6 @@ once(event: "setup", listener: (settings: ClusterSettings) => void): this;

prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this; // the handle is a net.Socket or net.Server object, or undefined.
prependListener(event: "online", listener: (worker: Worker) => void): this;

@@ -184,3 +194,6 @@ prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

// the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
prependOnceListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): this;
prependOnceListener(event: "online", listener: (worker: Worker) => void): this;

@@ -218,4 +231,7 @@ prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;

function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function addListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function addListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -238,3 +254,6 @@ function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function on(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function on(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function on(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -248,3 +267,6 @@ function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
function once(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function once(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster; // the handle is a net.Socket or net.Server object, or undefined.
function once(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -265,4 +287,7 @@ function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -273,7 +298,13 @@ function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
function prependOnceListener(
event: "exit",
listener: (worker: Worker, code: number, signal: string) => void,
): Cluster;
function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
// the handle is a net.Socket or net.Server object, or undefined.
function prependOnceListener(
event: "message",
listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void,
): Cluster;
function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;

@@ -284,4 +315,4 @@ function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;

}
declare module 'node:cluster' {
export * from 'cluster';
declare module "node:cluster" {
export * from "cluster";
}

@@ -1,7 +0,7 @@

declare module 'console' {
import console = require('node:console');
declare module "console" {
import console = require("node:console");
export = console;
}
declare module 'node:console' {
import { InspectOptions } from 'util';
declare module "node:console" {
import { InspectOptions } from "util";

@@ -120,3 +120,3 @@ global {

ignoreErrors?: boolean | undefined;
colorMode?: boolean | 'auto' | undefined;
colorMode?: boolean | "auto" | undefined;
inspectOptions?: InspectOptions | undefined;

@@ -127,3 +127,3 @@ /**

*/
groupIndentation?: number | undefined;
groupIndentation?: number | undefined;
}

@@ -130,0 +130,0 @@

/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
declare module 'constants' {
import { constants as osConstants, SignalConstants } from 'os';
import { constants as cryptoConstants } from 'crypto';
import { constants as fsConstants } from 'fs';
declare module "constants" {
import { constants as osConstants, SignalConstants } from "os";
import { constants as cryptoConstants } from "crypto";
import { constants as fsConstants } from "fs";
const exp: typeof osConstants.errno &
typeof osConstants.priority &
SignalConstants &
typeof cryptoConstants &
typeof fsConstants;
const exp:
& typeof osConstants.errno
& typeof osConstants.priority
& SignalConstants
& typeof cryptoConstants
& typeof fsConstants;
export = exp;
}
declare module 'node:constants' {
import constants = require('constants');
declare module "node:constants" {
import constants = require("constants");
export = constants;
}

@@ -1,3 +0,3 @@

declare module 'crypto' {
import * as stream from 'stream';
declare module "crypto" {
import * as stream from "stream";

@@ -27,3 +27,3 @@ interface Certificate {

/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
new (): Certificate;
new(): Certificate;
/** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */

@@ -144,9 +144,9 @@ (): Certificate;

// https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
type BinaryToTextEncoding = "base64" | "base64url" | "hex";
type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "latin1";
type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";

@@ -169,6 +169,6 @@ class Hash extends stream.Transform {

type KeyObjectType = 'secret' | 'public' | 'private';
type KeyObjectType = "secret" | "public" | "private";
interface KeyExportOptions<T extends KeyFormat> {
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
type: "pkcs1" | "spki" | "pkcs8" | "sec1";
format: T;

@@ -187,4 +187,4 @@ cipher?: string | undefined;

asymmetricKeySize?: number | undefined;
export(options: KeyExportOptions<'pem'>): string | Buffer;
export(options?: KeyExportOptions<'der'>): Buffer;
export(options: KeyExportOptions<"pem">): string | Buffer;
export(options?: KeyExportOptions<"der">): Buffer;
symmetricKeySize?: number | undefined;

@@ -194,5 +194,5 @@ type: KeyObjectType;

type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305";
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";

@@ -328,3 +328,3 @@ type BinaryLike = string | NodeJS.ArrayBufferView;

format?: KeyFormat | undefined;
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
type?: "pkcs1" | "pkcs8" | "sec1" | undefined;
passphrase?: string | Buffer | undefined;

@@ -336,3 +336,3 @@ }

format?: KeyFormat | undefined;
type?: 'pkcs1' | 'spki' | undefined;
type?: "pkcs1" | "spki" | undefined;
}

@@ -346,3 +346,3 @@

type DSAEncoding = 'der' | 'ieee-p1363';
type DSAEncoding = "der" | "ieee-p1363";

@@ -419,4 +419,8 @@ interface SigningOptions {

computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
computeSecret(
otherPublicKey: NodeJS.ArrayBufferView,
inputEncoding: null,
outputEncoding: BinaryToTextEncoding,
): string;
computeSecret(
other_public_key: string,

@@ -469,3 +473,3 @@ input_encoding: BinaryToTextEncoding,

}
type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
type DiffieHellmanGroup = Omit<DiffieHellman, "setPublicKey" | "setPrivateKey">;
function getDiffieHellman(groupName: string): DiffieHellmanGroup;

@@ -592,4 +596,4 @@ /**

inputEncoding?: BinaryToTextEncoding,
outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
format?: 'uncompressed' | 'compressed' | 'hybrid',
outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
format?: "uncompressed" | "compressed" | "hybrid",
): Buffer | string;

@@ -618,4 +622,4 @@ generateKeys(): Buffer;

type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
type KeyFormat = 'pem' | 'der';
type KeyType = "rsa" | "dsa" | "ec" | "ed25519" | "ed448" | "x25519" | "x448";
type KeyFormat = "pem" | "der";

@@ -699,7 +703,7 @@ interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {

publicKeyEncoding: {
type: 'pkcs1' | 'spki';
type: "pkcs1" | "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs1' | 'pkcs8';
type: "pkcs1" | "pkcs8";
};

@@ -719,7 +723,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -735,7 +739,7 @@ }

publicKeyEncoding: {
type: 'pkcs1' | 'spki';
type: "pkcs1" | "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'sec1' | 'pkcs8';
type: "sec1" | "pkcs8";
};

@@ -746,7 +750,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -757,7 +761,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -768,7 +772,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -779,7 +783,7 @@ }

publicKeyEncoding: {
type: 'spki';
type: "spki";
format: PubF;
};
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
type: 'pkcs8';
type: "pkcs8";
};

@@ -794,149 +798,149 @@ }

function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
): KeyPairSyncResult<string, string>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
): KeyPairSyncResult<string, Buffer>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
): KeyPairSyncResult<Buffer, string>;
function generateKeyPairSync(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
): KeyPairSyncResult<Buffer, Buffer>;
function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'rsa',
type: "rsa",
options: RSAKeyPairKeyObjectOptions,

@@ -947,23 +951,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'dsa',
type: "dsa",
options: DSAKeyPairKeyObjectOptions,

@@ -974,23 +978,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ec',
type: "ec",
options: ECKeyPairKeyObjectOptions,

@@ -1001,23 +1005,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed25519',
type: "ed25519",
options: ED25519KeyPairKeyObjectOptions | undefined,

@@ -1028,23 +1032,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'ed448',
type: "ed448",
options: ED448KeyPairKeyObjectOptions | undefined,

@@ -1055,23 +1059,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x25519',
type: "x25519",
options: X25519KeyPairKeyObjectOptions | undefined,

@@ -1082,23 +1086,23 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
): void;
function generateKeyPair(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
): void;
function generateKeyPair(
type: 'x448',
type: "x448",
options: X448KeyPairKeyObjectOptions | undefined,

@@ -1110,73 +1114,73 @@ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,

function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'pem', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'pem'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'rsa',
options: RSAKeyPairOptions<'der', 'der'>,
type: "rsa",
options: RSAKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'pem', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'pem'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'dsa',
options: DSAKeyPairOptions<'der', 'der'>,
type: "dsa",
options: DSAKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'pem', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'pem', 'der'>,
type: "ec",
options: ECKeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'der', 'pem'>,
type: "ec",
options: ECKeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ec',
options: ECKeyPairOptions<'der', 'der'>,
type: "ec",
options: ECKeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'pem', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'pem'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ed25519',
options: ED25519KeyPairOptions<'der', 'der'>,
type: "ed25519",
options: ED25519KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(
type: 'ed25519',
type: "ed25519",
options?: ED25519KeyPairKeyObjectOptions,

@@ -1186,37 +1190,37 @@ ): Promise<KeyPairKeyObjectResult>;

function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'pem', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'pem'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'ed448',
options: ED448KeyPairOptions<'der', 'der'>,
type: "ed448",
options: ED448KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'pem', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'pem'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'x25519',
options: X25519KeyPairOptions<'der', 'der'>,
type: "x25519",
options: X25519KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(
type: 'x25519',
type: "x25519",
options?: X25519KeyPairKeyObjectOptions,

@@ -1226,18 +1230,18 @@ ): Promise<KeyPairKeyObjectResult>;

function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'pem', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"pem", "pem">,
): Promise<{ publicKey: string; privateKey: string }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'pem', 'der'>,
type: "x448",
options: X448KeyPairOptions<"pem", "der">,
): Promise<{ publicKey: string; privateKey: Buffer }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'der', 'pem'>,
type: "x448",
options: X448KeyPairOptions<"der", "pem">,
): Promise<{ publicKey: Buffer; privateKey: string }>;
function __promisify__(
type: 'x448',
options: X448KeyPairOptions<'der', 'der'>,
type: "x448",
options: X448KeyPairOptions<"der", "der">,
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
}

@@ -1310,4 +1314,4 @@

}
declare module 'node:crypto' {
export * from 'crypto';
declare module "node:crypto" {
export * from "crypto";
}

@@ -1,9 +0,9 @@

declare module 'dgram' {
import { AddressInfo } from 'net';
import * as dns from 'dns';
import EventEmitter = require('events');
declare module "dgram" {
import { AddressInfo } from "net";
import * as dns from "dns";
import EventEmitter = require("events");
interface RemoteInfo {
address: string;
family: 'IPv4' | 'IPv6';
family: "IPv4" | "IPv6";
port: number;

@@ -31,3 +31,9 @@ size: number;

sendBufferSize?: number | undefined;
lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
lookup?:
| ((
hostname: string,
options: dns.LookupOneOptions,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
) => void)
| undefined;
}

@@ -54,8 +60,38 @@

remoteAddress(): AddressInfo;
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array | ReadonlyArray<any>,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
port?: number,
address?: string,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
port?: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
send(
msg: string | Uint8Array,
offset: number,
length: number,
callback?: (error: Error | null, bytes: number) => void,
): void;
setBroadcast(flag: boolean): void;

@@ -144,4 +180,4 @@ setMulticastInterface(multicastInterface: string): void;

}
declare module 'node:dgram' {
export * from 'dgram';
declare module "node:dgram" {
export * from "dgram";
}

@@ -1,2 +0,2 @@

declare module 'dns' {
declare module "dns" {
// Supported getaddrinfo flags.

@@ -31,7 +31,26 @@ const ADDRCONFIG: number;

function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
function lookup(
hostname: string,
family: number,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
function lookup(
hostname: string,
options: LookupOneOptions,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;
function lookup(
hostname: string,
options: LookupAllOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void,
): void;
function lookup(
hostname: string,
options: LookupOptions,
callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void,
): void;
function lookup(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
): void;

@@ -45,6 +64,10 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
function lookupService(
address: string,
port: number,
callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void,
): void;
namespace lookupService {
function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
function __promisify__(address: string, port: number): Promise<{ hostname: string; service: string }>;
}

@@ -143,29 +166,80 @@

type AnyRecord = AnyARecord |
AnyAaaaRecord |
AnyCnameRecord |
AnyMxRecord |
AnyNaptrRecord |
AnyNsRecord |
AnyPtrRecord |
AnySoaRecord |
AnySrvRecord |
AnyTxtRecord;
type AnyRecord =
| AnyARecord
| AnyAaaaRecord
| AnyCnameRecord
| AnyMxRecord
| AnyNaptrRecord
| AnyNsRecord
| AnyPtrRecord
| AnySoaRecord
| AnySrvRecord
| AnyTxtRecord;
function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
function resolve(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "A",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "AAAA",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "ANY",
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "CNAME",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "MX",
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "NAPTR",
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "NS",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "PTR",
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "SOA",
callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void,
): void;
function resolve(
hostname: string,
rrtype: "SRV",
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
function resolve(
hostname: string,
rrtype: "TXT",
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
function resolve(
hostname: string,
rrtype: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
callback: (
err: NodeJS.ErrnoException | null,
addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[],
) => void,
): void;

@@ -182,8 +256,22 @@

function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
function __promisify__(
hostname: string,
rrtype: string,
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
}
function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
function resolve4(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve4(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
function resolve4(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;

@@ -197,5 +285,16 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
function resolve6(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
function resolve6(
hostname: string,
options: ResolveWithTtlOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void,
): void;
function resolve6(
hostname: string,
options: ResolveOptions,
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void,
): void;

@@ -209,3 +308,6 @@ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.

function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolveCname(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolveCname {

@@ -215,3 +317,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
function resolveMx(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void,
): void;
namespace resolveMx {

@@ -221,3 +326,6 @@ function __promisify__(hostname: string): Promise<MxRecord[]>;

function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
function resolveNaptr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void,
): void;
namespace resolveNaptr {

@@ -227,3 +335,6 @@ function __promisify__(hostname: string): Promise<NaptrRecord[]>;

function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolveNs(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolveNs {

@@ -233,3 +344,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
function resolvePtr(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void,
): void;
namespace resolvePtr {

@@ -239,3 +353,6 @@ function __promisify__(hostname: string): Promise<string[]>;

function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
function resolveSoa(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void,
): void;
namespace resolveSoa {

@@ -245,3 +362,6 @@ function __promisify__(hostname: string): Promise<SoaRecord>;

function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
function resolveSrv(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void,
): void;
namespace resolveSrv {

@@ -251,3 +371,6 @@ function __promisify__(hostname: string): Promise<SrvRecord[]>;

function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
function resolveTxt(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void,
): void;
namespace resolveTxt {

@@ -257,3 +380,6 @@ function __promisify__(hostname: string): Promise<string[][]>;

function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
function resolveAny(
hostname: string,
callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void,
): void;
namespace resolveAny {

@@ -267,3 +393,3 @@ function __promisify__(hostname: string): Promise<AnyRecord[]>;

function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;

@@ -330,3 +456,3 @@ // Error codes

function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
function lookupService(address: string, port: number): Promise<{ hostname: string; service: string }>;

@@ -345,3 +471,6 @@ function resolve(hostname: string): Promise<string[]>;

function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
function resolve(
hostname: string,
rrtype: string,
): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;

@@ -378,3 +507,3 @@ function resolve4(hostname: string): Promise<string[]>;

function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;

@@ -403,4 +532,4 @@ class Resolver {

}
declare module 'node:dns' {
export * from 'dns';
declare module "node:dns" {
export * from "dns";
}

@@ -1,3 +0,3 @@

declare module 'domain' {
import EventEmitter = require('events');
declare module "domain" {
import EventEmitter = require("events");

@@ -25,4 +25,4 @@ global {

}
declare module 'node:domain' {
export * from 'domain';
declare module "node:domain" {
export * from "domain";
}

@@ -1,2 +0,2 @@

declare module 'events' {
declare module "events" {
interface EventEmitterOptions {

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

import internal = require('events');
import internal = require("events");
namespace EventEmitter {

@@ -80,5 +80,5 @@ // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4

}
declare module 'node:events' {
import events = require('events');
declare module "node:events" {
import events = require("events");
export = events;
}

@@ -1,2 +0,2 @@

declare module 'fs/promises' {
declare module "fs/promises" {
import {

@@ -20,3 +20,3 @@ BaseEncodingOptions,

WriteVResult,
} from 'fs';
} from "fs";

@@ -39,3 +39,9 @@ interface FileHandle {

*/
appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null): Promise<void>;
appendFile(
data: string | Uint8Array,
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

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

*/
read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
read<TBuffer extends Uint8Array>(
buffer: TBuffer,
offset?: number | null,
length?: number | null,
position?: number | null,
): Promise<{ bytesRead: number; buffer: TBuffer }>;

@@ -80,3 +91,3 @@ /**

*/
readFile(options?: { encoding?: null | undefined, flag?: OpenMode | undefined } | null): Promise<Buffer>;
readFile(options?: { encoding?: null | undefined; flag?: OpenMode | undefined } | null): Promise<Buffer>;

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

*/
readFile(options: { encoding: BufferEncoding, flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;
readFile(options: { encoding: BufferEncoding; flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;

@@ -98,3 +109,5 @@ /**

*/
readFile(options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
readFile(
options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null,
): Promise<string | Buffer>;

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

*/
write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
write<TBuffer extends Uint8Array>(
buffer: TBuffer,
offset?: number | null,
length?: number | null,
position?: number | null,
): Promise<{ bytesWritten: number; buffer: TBuffer }>;

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

*/
write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
write(
data: string | Uint8Array,
position?: number | null,
encoding?: BufferEncoding | null,
): Promise<{ bytesWritten: number; buffer: string }>;

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

*/
writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null): Promise<void>;
writeFile(
data: string | Uint8Array,
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -220,3 +248,3 @@ /**

position?: number | null,
): Promise<{ bytesRead: number, buffer: TBuffer }>;
): Promise<{ bytesRead: number; buffer: TBuffer }>;

@@ -237,3 +265,5 @@ /**

offset?: number | null,
length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
length?: number | null,
position?: number | null,
): Promise<{ bytesWritten: number; buffer: TBuffer }>;

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

*/
function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
function write(
handle: FileHandle,
string: string,
position?: number | null,
encoding?: BufferEncoding | null,
): Promise<{ bytesWritten: number; buffer: string }>;

@@ -304,3 +339,3 @@ /**

*/
function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }): Promise<string | undefined>;

@@ -313,3 +348,6 @@ /**

*/
function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false | undefined; }) | null): Promise<void>;
function mkdir(
path: PathLike,
options?: Mode | (MakeDirectoryOptions & { recursive?: false | undefined }) | null,
): Promise<void>;

@@ -329,3 +367,6 @@ /**

*/
function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null): Promise<string[]>;
function readdir(
path: PathLike,
options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null,
): Promise<string[]>;

@@ -337,3 +378,6 @@ /**

*/
function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false | undefined } | "buffer"): Promise<Buffer[]>;
function readdir(
path: PathLike,
options: { encoding: "buffer"; withFileTypes?: false | undefined } | "buffer",
): Promise<Buffer[]>;

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

*/
function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null): Promise<string[] | Buffer[]>;
function readdir(
path: PathLike,
options?: BaseEncodingOptions & { withFileTypes?: false | undefined } | BufferEncoding | null,
): Promise<string[] | Buffer[]>;

@@ -537,3 +584,6 @@ /**

data: string | Uint8Array,
options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -556,3 +606,6 @@

data: string | Uint8Array,
options?: BaseEncodingOptions & { mode?: Mode | undefined, flag?: OpenMode | undefined } | BufferEncoding | null
options?:
| BaseEncodingOptions & { mode?: Mode | undefined; flag?: OpenMode | undefined }
| BufferEncoding
| null,
): Promise<void>;

@@ -567,3 +620,6 @@

*/
function readFile(path: PathLike | FileHandle, options?: { encoding?: null | undefined, flag?: OpenMode | undefined } | null): Promise<Buffer>;
function readFile(
path: PathLike | FileHandle,
options?: { encoding?: null | undefined; flag?: OpenMode | undefined } | null,
): Promise<Buffer>;

@@ -577,3 +633,6 @@ /**

*/
function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode | undefined } | BufferEncoding): Promise<string>;
function readFile(
path: PathLike | FileHandle,
options: { encoding: BufferEncoding; flag?: OpenMode | undefined } | BufferEncoding,
): Promise<string>;

@@ -587,8 +646,11 @@ /**

*/
function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null): Promise<string | Buffer>;
function readFile(
path: PathLike | FileHandle,
options?: BaseEncodingOptions & { flag?: OpenMode | undefined } | BufferEncoding | null,
): Promise<string | Buffer>;
function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
}
declare module 'node:fs/promises' {
export * from 'fs/promises';
declare module "node:fs/promises" {
export * from "fs/promises";
}

@@ -74,7 +74,18 @@ // Declare "static" methods in Error

// Buffer class
type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex";
type BufferEncoding =
| "ascii"
| "utf8"
| "utf-8"
| "utf16le"
| "ucs2"
| "ucs-2"
| "base64"
| "base64url"
| "latin1"
| "binary"
| "hex";
type WithImplicitCoercion<T> = T | { valueOf(): T };
//#region borrowed
// #region borrowed
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib

@@ -120,3 +131,3 @@ /**

};
//#endregion borrowed
// #endregion borrowed

@@ -155,3 +166,2 @@ /**

*
*
* @param arrayBuffer The ArrayBuffer with which to share memory.

@@ -183,3 +193,7 @@ * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.

*/
static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
static from(
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
byteOffset?: number,
length?: number,
): Buffer;
/**

@@ -196,3 +210,6 @@ * Creates a new Buffer using the passed {data}

*/
static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
static from(
str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string },
encoding?: BufferEncoding,
): Buffer;
/**

@@ -225,3 +242,3 @@ * Creates a new Buffer using the passed {data}

string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
encoding?: BufferEncoding
encoding?: BufferEncoding,
): number;

@@ -276,3 +293,3 @@ /**

toString(encoding?: BufferEncoding, start?: number, end?: number): string;
toJSON(): { type: 'Buffer'; data: number[] };
toJSON(): { type: "Buffer"; data: number[] };
equals(otherBuffer: Uint8Array): boolean;

@@ -284,3 +301,3 @@ compare(

sourceStart?: number,
sourceEnd?: number
sourceEnd?: number,
): number;

@@ -470,3 +487,3 @@ copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;

*/
getters?: 'get' | 'set' | boolean | undefined;
getters?: "get" | "set" | boolean | undefined;
showHidden?: boolean | undefined;

@@ -591,3 +608,3 @@ /**

isPaused(): boolean;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
unpipe(destination?: WritableStream): this;

@@ -608,3 +625,3 @@ unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;

interface ReadWriteStream extends ReadableStream, WritableStream { }
interface ReadWriteStream extends ReadableStream, WritableStream {}

@@ -723,3 +740,3 @@ interface Global {

interface RequireResolve {
(id: string, options?: { paths?: string[] | undefined; }): string;
(id: string, options?: { paths?: string[] | undefined }): string;
paths(request: string): string[] | null;

@@ -729,5 +746,5 @@ }

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;
".js": (m: Module, filename: string) => any;
".json": (m: Module, filename: string) => any;
".node": (m: Module, filename: string) => any;
}

@@ -734,0 +751,0 @@ interface Module {

@@ -1,71 +0,71 @@

declare module 'http' {
import * as stream from 'stream';
import { URL } from 'url';
import { Socket, Server as NetServer, LookupFunction } from 'net';
declare module "http" {
import * as stream from "stream";
import { URL } from "url";
import { LookupFunction, Server as NetServer, Socket } from "net";
// incoming headers will never contain number
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
'accept'?: string | undefined;
'accept-language'?: string | undefined;
'accept-patch'?: string | undefined;
'accept-ranges'?: string | undefined;
'access-control-allow-credentials'?: string | undefined;
'access-control-allow-headers'?: string | undefined;
'access-control-allow-methods'?: string | undefined;
'access-control-allow-origin'?: string | undefined;
'access-control-expose-headers'?: string | undefined;
'access-control-max-age'?: string | undefined;
'access-control-request-headers'?: string | undefined;
'access-control-request-method'?: string | undefined;
'age'?: string | undefined;
'allow'?: string | undefined;
'alt-svc'?: string | undefined;
'authorization'?: string | undefined;
'cache-control'?: string | undefined;
'connection'?: string | undefined;
'content-disposition'?: string | undefined;
'content-encoding'?: string | undefined;
'content-language'?: string | undefined;
'content-length'?: string | undefined;
'content-location'?: string | undefined;
'content-range'?: string | undefined;
'content-type'?: string | undefined;
'cookie'?: string | undefined;
'date'?: string | undefined;
'etag'?: string | undefined;
'expect'?: string | undefined;
'expires'?: string | undefined;
'forwarded'?: string | undefined;
'from'?: string | undefined;
'host'?: string | undefined;
'if-match'?: string | undefined;
'if-modified-since'?: string | undefined;
'if-none-match'?: string | undefined;
'if-unmodified-since'?: string | undefined;
'last-modified'?: string | undefined;
'location'?: string | undefined;
'origin'?: string | undefined;
'pragma'?: string | undefined;
'proxy-authenticate'?: string | undefined;
'proxy-authorization'?: string | undefined;
'public-key-pins'?: string | undefined;
'range'?: string | undefined;
'referer'?: string | undefined;
'retry-after'?: string | undefined;
'sec-websocket-accept'?: string | undefined;
'sec-websocket-extensions'?: string | undefined;
'sec-websocket-key'?: string | undefined;
'sec-websocket-protocol'?: string | undefined;
'sec-websocket-version'?: string | undefined;
'set-cookie'?: string[] | undefined;
'strict-transport-security'?: string | undefined;
'tk'?: string | undefined;
'trailer'?: string | undefined;
'transfer-encoding'?: string | undefined;
'upgrade'?: string | undefined;
'user-agent'?: string | undefined;
'vary'?: string | undefined;
'via'?: string | undefined;
'warning'?: string | undefined;
'www-authenticate'?: string | undefined;
"accept"?: string | undefined;
"accept-language"?: string | undefined;
"accept-patch"?: string | undefined;
"accept-ranges"?: string | undefined;
"access-control-allow-credentials"?: string | undefined;
"access-control-allow-headers"?: string | undefined;
"access-control-allow-methods"?: string | undefined;
"access-control-allow-origin"?: string | undefined;
"access-control-expose-headers"?: string | undefined;
"access-control-max-age"?: string | undefined;
"access-control-request-headers"?: string | undefined;
"access-control-request-method"?: string | undefined;
"age"?: string | undefined;
"allow"?: string | undefined;
"alt-svc"?: string | undefined;
"authorization"?: string | undefined;
"cache-control"?: string | undefined;
"connection"?: string | undefined;
"content-disposition"?: string | undefined;
"content-encoding"?: string | undefined;
"content-language"?: string | undefined;
"content-length"?: string | undefined;
"content-location"?: string | undefined;
"content-range"?: string | undefined;
"content-type"?: string | undefined;
"cookie"?: string | undefined;
"date"?: string | undefined;
"etag"?: string | undefined;
"expect"?: string | undefined;
"expires"?: string | undefined;
"forwarded"?: string | undefined;
"from"?: string | undefined;
"host"?: string | undefined;
"if-match"?: string | undefined;
"if-modified-since"?: string | undefined;
"if-none-match"?: string | undefined;
"if-unmodified-since"?: string | undefined;
"last-modified"?: string | undefined;
"location"?: string | undefined;
"origin"?: string | undefined;
"pragma"?: string | undefined;
"proxy-authenticate"?: string | undefined;
"proxy-authorization"?: string | undefined;
"public-key-pins"?: string | undefined;
"range"?: string | undefined;
"referer"?: string | undefined;
"retry-after"?: string | undefined;
"sec-websocket-accept"?: string | undefined;
"sec-websocket-extensions"?: string | undefined;
"sec-websocket-key"?: string | undefined;
"sec-websocket-protocol"?: string | undefined;
"sec-websocket-version"?: string | undefined;
"set-cookie"?: string[] | undefined;
"strict-transport-security"?: string | undefined;
"tk"?: string | undefined;
"trailer"?: string | undefined;
"transfer-encoding"?: string | undefined;
"upgrade"?: string | undefined;
"user-agent"?: string | undefined;
"vary"?: string | undefined;
"via"?: string | undefined;
"warning"?: string | undefined;
"www-authenticate"?: string | undefined;
}

@@ -162,89 +162,89 @@

addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Socket) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "connection", listener: (socket: Socket) => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
addListener(event: 'request', listener: RequestListener<Request, Response>): this;
addListener(event: "request", listener: RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Socket): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(event: 'checkContinue', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'checkExpectation', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: 'request', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'upgrade', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: "close"): boolean;
emit(event: "connection", socket: Socket): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(event: "checkContinue", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "checkExpectation", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "clientError", err: Error, socket: stream.Duplex): boolean;
emit(event: "connect", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
emit(event: "request", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "upgrade", req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Socket) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: 'request', listener: RequestListener<Request, Response>): this;
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: "close", listener: () => void): this;
on(event: "connection", listener: (socket: Socket) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "checkContinue", listener: RequestListener<Request, Response>): this;
on(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
on(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
on(event: "connect", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
on(event: "request", listener: RequestListener<Request, Response>): this;
on(event: "upgrade", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Socket) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
once(event: "close", listener: () => void): this;
once(event: "connection", listener: (socket: Socket) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
once(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
once(event: 'request', listener: RequestListener<Request, Response>): this;
once(event: "request", listener: RequestListener<Request, Response>): this;
once(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Socket) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "connection", listener: (socket: Socket) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
prependListener(event: "request", listener: RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,

@@ -335,98 +335,98 @@ ): this;

addListener(event: 'abort', listener: () => void): this;
addListener(event: "abort", listener: () => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
addListener(event: 'continue', listener: () => void): this;
addListener(event: 'information', listener: (info: InformationEvent) => void): this;
addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
addListener(event: 'socket', listener: (socket: Socket) => void): this;
addListener(event: 'timeout', listener: () => void): this;
addListener(event: "continue", listener: () => void): this;
addListener(event: "information", listener: (info: InformationEvent) => void): this;
addListener(event: "response", listener: (response: IncomingMessage) => void): this;
addListener(event: "socket", listener: (socket: Socket) => void): this;
addListener(event: "timeout", listener: () => void): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'drain', listener: () => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'finish', listener: () => void): this;
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "drain", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "finish", listener: () => void): this;
addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
on(event: 'abort', listener: () => void): this;
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'continue', listener: () => void): this;
on(event: 'information', listener: (info: InformationEvent) => void): this;
on(event: 'response', listener: (response: IncomingMessage) => void): this;
on(event: 'socket', listener: (socket: Socket) => void): this;
on(event: 'timeout', listener: () => void): this;
on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'drain', listener: () => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'finish', listener: () => void): this;
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
on(event: "abort", listener: () => void): this;
on(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: "continue", listener: () => void): this;
on(event: "information", listener: (info: InformationEvent) => void): this;
on(event: "response", listener: (response: IncomingMessage) => void): this;
on(event: "socket", listener: (socket: Socket) => void): this;
on(event: "timeout", listener: () => void): this;
on(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
on(event: "close", listener: () => void): this;
on(event: "drain", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "finish", listener: () => void): this;
on(event: "pipe", listener: (src: stream.Readable) => void): this;
on(event: "unpipe", listener: (src: stream.Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: 'abort', listener: () => void): this;
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'continue', listener: () => void): this;
once(event: 'information', listener: (info: InformationEvent) => void): this;
once(event: 'response', listener: (response: IncomingMessage) => void): this;
once(event: 'socket', listener: (socket: Socket) => void): this;
once(event: 'timeout', listener: () => void): this;
once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'drain', listener: () => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'finish', listener: () => void): this;
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
once(event: "abort", listener: () => void): this;
once(event: "connect", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: "continue", listener: () => void): this;
once(event: "information", listener: (info: InformationEvent) => void): this;
once(event: "response", listener: (response: IncomingMessage) => void): this;
once(event: "socket", listener: (socket: Socket) => void): this;
once(event: "timeout", listener: () => void): this;
once(event: "upgrade", listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
once(event: "close", listener: () => void): this;
once(event: "drain", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "finish", listener: () => void): this;
once(event: "pipe", listener: (src: stream.Readable) => void): this;
once(event: "unpipe", listener: (src: stream.Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: 'abort', listener: () => void): this;
prependListener(event: "abort", listener: () => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependListener(event: 'continue', listener: () => void): this;
prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
prependListener(event: 'socket', listener: (socket: Socket) => void): this;
prependListener(event: 'timeout', listener: () => void): this;
prependListener(event: "continue", listener: () => void): this;
prependListener(event: "information", listener: (info: InformationEvent) => void): this;
prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
prependListener(event: "socket", listener: (socket: Socket) => void): this;
prependListener(event: "timeout", listener: () => void): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'drain', listener: () => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'finish', listener: () => void): this;
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "drain", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "finish", listener: () => void): this;
prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'abort', listener: () => void): this;
prependOnceListener(event: "abort", listener: () => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependOnceListener(event: 'continue', listener: () => void): this;
prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
prependOnceListener(event: 'timeout', listener: () => void): this;
prependOnceListener(event: "continue", listener: () => void): this;
prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
prependOnceListener(event: "timeout", listener: () => void): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'drain', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'finish', listener: () => void): this;
prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "drain", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "finish", listener: () => void): this;
prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -501,3 +501,3 @@ }

*/
scheduling?: 'fifo' | 'lifo' | undefined;
scheduling?: "fifo" | "lifo" | undefined;
}

@@ -581,4 +581,4 @@

}
declare module 'node:http' {
export * from 'http';
declare module "node:http" {
export * from "http";
}

@@ -1,16 +0,16 @@

declare module 'http2' {
import EventEmitter = require('events');
import * as fs from 'fs';
import * as net from 'net';
import * as stream from 'stream';
import * as tls from 'tls';
import * as url from 'url';
declare module "http2" {
import EventEmitter = require("events");
import * as fs from "fs";
import * as net from "net";
import * as stream from "stream";
import * as tls from "tls";
import * as url from "url";
import {
IncomingHttpHeaders as Http1IncomingHttpHeaders,
IncomingMessage,
OutgoingHttpHeaders,
IncomingMessage,
ServerResponse,
} from 'http';
export { OutgoingHttpHeaders } from 'http';
} from "http";
export { OutgoingHttpHeaders } from "http";

@@ -190,5 +190,11 @@ export interface IncomingHttpStatusHeader {

addListener(event: "continue", listener: () => {}): this;
addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -203,23 +209,47 @@

on(event: "continue", listener: () => {}): this;
on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "continue", listener: () => {}): this;
once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "continue", listener: () => {}): this;
prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "continue", listener: () => {}): this;
prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "headers",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "response",
listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -232,7 +262,22 @@ }

additionalHeaders(headers: OutgoingHttpHeaders): void;
pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
pushStream(
headers: OutgoingHttpHeaders,
callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
): void;
pushStream(
headers: OutgoingHttpHeaders,
options?: StreamPriorityOptions,
callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void,
): void;
respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
respondWithFD(
fd: number | fs.promises.FileHandle,
headers?: OutgoingHttpHeaders,
options?: ServerStreamFileResponseOptions,
): void;
respondWithFile(
path: string,
headers?: OutgoingHttpHeaders,
options?: ServerStreamFileResponseOptionsWithError,
): void;
}

@@ -291,7 +336,13 @@

ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
ping(
payload: NodeJS.ArrayBufferView,
callback: (err: Error | null, duration: number, payload: Buffer) => void,
): boolean;
ref(): void;
setLocalWindowSize(windowSize: number): void;
setTimeout(msecs: number, callback?: () => void): void;
settings(settings: Settings, callback?: (err: Error | null, settings: Settings, duration: number) => void): void;
settings(
settings: Settings,
callback?: (err: Error | null, settings: Settings, duration: number) => void,
): void;
unref(): void;

@@ -301,4 +352,10 @@

addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
addListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
addListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
addListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -342,4 +399,10 @@ addListener(event: "ping", listener: () => void): this;

prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
prependListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
prependListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
prependListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -353,4 +416,10 @@ prependListener(event: "ping", listener: () => void): this;

prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
prependOnceListener(
event: "frameError",
listener: (frameType: number, errorCode: number, streamID: number) => void,
): this;
prependOnceListener(
event: "goaway",
listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void,
): this;
prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;

@@ -368,4 +437,14 @@ prependOnceListener(event: "ping", listener: () => void): this;

addListener(event: "origin", listener: (origins: string[]) => void): this;
addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
addListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
addListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -376,3 +455,8 @@

emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
emit(
event: "stream",
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
): boolean;
emit(event: string | symbol, ...args: any[]): boolean;

@@ -383,3 +467,10 @@

on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
on(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -389,4 +480,14 @@

once(event: "origin", listener: (origins: string[]) => void): this;
once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
once(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
once(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -396,4 +497,14 @@

prependListener(event: "origin", listener: (origins: string[]) => void): this;
prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -403,4 +514,14 @@

prependOnceListener(event: "origin", listener: (origins: string[]) => void): this;
prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
prependOnceListener(
event: "connect",
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependOnceListener(
event: "stream",
listener: (
stream: ClientHttp2Stream,
headers: IncomingHttpHeaders & IncomingHttpStatusHeader,
flags: number,
) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -419,4 +540,10 @@ }

addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -429,15 +556,36 @@

on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "connect",
listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -464,3 +612,3 @@ }

createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
protocol?: 'http:' | 'https:' | undefined;
protocol?: "http:" | "https:" | undefined;
}

@@ -475,6 +623,6 @@

export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions {}
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions {}
export interface ServerOptions extends ServerSessionOptions { }
export interface ServerOptions extends ServerSessionOptions {}

@@ -487,7 +635,16 @@ export interface SecureServerOptions extends SecureServerSessionOptions {

export interface Http2Server extends net.Server {
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
addListener(event: "sessionError", listener: (err: Error) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: "timeout", listener: () => void): this;

@@ -504,31 +661,61 @@ addListener(event: string | symbol, listener: (...args: any[]) => void): this;

on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(event: "session", listener: (session: ServerHttp2Session) => void): this;
on(event: "sessionError", listener: (err: Error) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: "timeout", listener: () => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(event: "session", listener: (session: ServerHttp2Session) => void): this;
once(event: "sessionError", listener: (err: Error) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: "timeout", listener: () => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependListener(event: "sessionError", listener: (err: Error) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: "timeout", listener: () => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: "timeout", listener: () => void): this;

@@ -541,7 +728,16 @@ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;

export interface Http2SecureServer extends tls.Server {
addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
addListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
addListener(event: "sessionError", listener: (err: Error) => void): this;
addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
addListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
addListener(event: "timeout", listener: () => void): this;

@@ -560,7 +756,13 @@ addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
on(event: "session", listener: (session: ServerHttp2Session) => void): this;
on(event: "sessionError", listener: (err: Error) => void): this;
on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
on(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
on(event: "timeout", listener: () => void): this;

@@ -570,7 +772,13 @@ on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
once(event: "session", listener: (session: ServerHttp2Session) => void): this;
once(event: "sessionError", listener: (err: Error) => void): this;
once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
once(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
once(event: "timeout", listener: () => void): this;

@@ -580,7 +788,16 @@ once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependListener(event: "sessionError", listener: (err: Error) => void): this;
prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependListener(event: "timeout", listener: () => void): this;

@@ -590,7 +807,16 @@ prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
prependOnceListener(
event: "checkContinue",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(
event: "request",
listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): this;
prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
prependOnceListener(
event: "stream",
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
): this;
prependOnceListener(event: "timeout", listener: () => void): this;

@@ -604,3 +830,8 @@ prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;

export class Http2ServerRequest extends stream.Readable {
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
constructor(
stream: ServerHttp2Stream,
headers: IncomingHttpHeaders,
options: stream.ReadableOptions,
rawHeaders: ReadonlyArray<string>,
);

@@ -686,3 +917,3 @@ readonly aborted: boolean;

statusCode: number;
statusMessage: '';
statusMessage: "";
addTrailers(trailers: OutgoingHttpHeaders): void;

@@ -704,3 +935,6 @@ end(callback?: () => void): this;

writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
createPushResponse(
headers: OutgoingHttpHeaders,
callback: (err: Error | null, res: Http2ServerResponse) => void,
): void;

@@ -973,17 +1207,30 @@ addListener(event: "close", listener: () => void): this;

export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
export function createServer(
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2Server;
export function createServer(
options: ServerOptions,
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2Server;
export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
export function createSecureServer(
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2SecureServer;
export function createSecureServer(
options: SecureServerOptions,
onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void,
): Http2SecureServer;
export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
export function connect(
authority: string | url.URL,
listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): ClientHttp2Session;
export function connect(
authority: string | url.URL,
options?: ClientSessionOptions | SecureClientSessionOptions,
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void,
): ClientHttp2Session;
}
declare module 'node:http2' {
export * from 'http2';
declare module "node:http2" {
export * from "http2";
}

@@ -1,6 +0,6 @@

declare module 'https' {
import { Duplex } from 'stream';
import * as tls from 'tls';
import * as http from 'http';
import { URL } from 'url';
declare module "https" {
import { Duplex } from "stream";
import * as tls from "tls";
import * as http from "http";
import { URL } from "url";

@@ -12,4 +12,6 @@ type ServerOptions<

type RequestOptions = http.RequestOptions &
tls.SecureContextOptions & {
type RequestOptions =
& http.RequestOptions
& tls.SecureContextOptions
& {
checkServerIdentity?: typeof tls.checkServerIdentity | undefined;

@@ -44,9 +46,9 @@ rejectUnauthorized?: boolean | undefined; // Defaults to true

addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
addListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -59,27 +61,27 @@ certificate: Buffer,

addListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: 'close', listener: () => void): this;
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'listening', listener: () => void): this;
addListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "connection", listener: (socket: Duplex) => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
addListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(event: "keylog", line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(
event: 'newSession',
event: "newSession",
sessionId: Buffer,

@@ -90,3 +92,3 @@ sessionData: Buffer,

emit(
event: 'OCSPRequest',
event: "OCSPRequest",
certificate: Buffer,

@@ -96,23 +98,23 @@ issuer: Buffer,

): boolean;
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: 'close'): boolean;
emit(event: 'connection', socket: Duplex): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'listening'): boolean;
emit(event: 'checkContinue', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'checkExpectation', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
emit(event: 'connect', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: 'request', req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: "close"): boolean;
emit(event: "connection", socket: Duplex): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(event: "checkContinue", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "checkExpectation", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "clientError", err: Error, socket: Duplex): boolean;
emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
emit(event: "request", req: InstanceType<Request>, res: InstanceType<Response>): boolean;
emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
on(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -125,25 +127,25 @@ certificate: Buffer,

on(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: 'close', listener: () => void): this;
on(event: 'connection', listener: (socket: Duplex) => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'listening', listener: () => void): this;
on(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
on(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
on(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: 'request', listener: http.RequestListener<Request, Response>): this;
on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: "close", listener: () => void): this;
on(event: "connection", listener: (socket: Duplex) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
on(event: "connect", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
on(event: "request", listener: http.RequestListener<Request, Response>): this;
on(event: "upgrade", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
once(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -156,25 +158,25 @@ certificate: Buffer,

once(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'connection', listener: (socket: Duplex) => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'listening', listener: () => void): this;
once(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
once(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
once(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: 'request', listener: http.RequestListener<Request, Response>): this;
once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: "close", listener: () => void): this;
once(event: "connection", listener: (socket: Duplex) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
once(event: "connect", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
once(event: "request", listener: http.RequestListener<Request, Response>): this;
once(event: "upgrade", listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -187,31 +189,31 @@ certificate: Buffer,

prependListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'listening', listener: () => void): this;
prependListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "connection", listener: (socket: Duplex) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(
event: 'newSession',
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependOnceListener(
event: 'OCSPRequest',
event: "OCSPRequest",
listener: (

@@ -224,21 +226,21 @@ certificate: Buffer,

prependOnceListener(
event: 'resumeSession',
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'listening', listener: () => void): this;
prependOnceListener(event: 'checkContinue', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(
event: 'connect',
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,

@@ -279,4 +281,4 @@ ): this;

}
declare module 'node:https' {
export * from 'https';
declare module "node:https" {
export * from "https";
}

@@ -1,3 +0,3 @@

declare module 'module' {
import { URL } from 'url';
declare module "module" {
import { URL } from "url";
namespace Module {

@@ -53,5 +53,5 @@ /**

}
declare module 'node:module' {
import module = require('module');
declare module "node:module" {
import module = require("module");
export = module;
}

@@ -1,5 +0,5 @@

declare module 'net' {
import * as stream from 'stream';
import EventEmitter = require('events');
import * as dns from 'dns';
declare module "net" {
import * as stream from "stream";
import EventEmitter = require("events");
import * as dns from "dns";

@@ -59,3 +59,3 @@ type LookupFunction = (

type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
type SocketReadyState = 'opening' | 'open' | 'readOnly' | 'writeOnly' | 'closed';
type SocketReadyState = "opening" | "open" | "readOnly" | "writeOnly" | "closed";

@@ -131,3 +131,6 @@ class Socket extends stream.Duplex {

addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
addListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
addListener(event: "ready", listener: () => void): this;

@@ -154,3 +157,6 @@ addListener(event: "timeout", listener: () => void): this;

on(event: "error", listener: (err: Error) => void): this;
on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
on(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
on(event: "ready", listener: () => void): this;

@@ -166,3 +172,6 @@ on(event: "timeout", listener: () => void): this;

once(event: "error", listener: (err: Error) => void): this;
once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
once(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
once(event: "ready", listener: () => void): this;

@@ -178,3 +187,6 @@ once(event: "timeout", listener: () => void): this;

prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
prependListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
prependListener(event: "ready", listener: () => void): this;

@@ -190,3 +202,6 @@ prependListener(event: "timeout", listener: () => void): this;

prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
prependOnceListener(
event: "lookup",
listener: (err: Error, address: string, family: string | number, host: string) => void,
): this;
prependOnceListener(event: "ready", listener: () => void): this;

@@ -313,4 +328,4 @@ prependOnceListener(event: "timeout", listener: () => void): this;

}
declare module 'node:net' {
export * from 'net';
declare module "node:net" {
export * from "net";
}

@@ -1,2 +0,2 @@

declare module 'os' {
declare module "os" {
interface CpuInfo {

@@ -52,3 +52,3 @@ model: string;

function homedir(): string;
function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
function userInfo(options: { encoding: "buffer" }): UserInfo<Buffer>;
function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;

@@ -242,4 +242,4 @@

}
declare module 'node:os' {
export * from 'os';
declare module "node:os" {
export * from "os";
}

@@ -1,2 +0,2 @@

declare module 'path' {
declare module "path" {
namespace path {

@@ -125,7 +125,7 @@ /**

*/
readonly sep: '\\' | '/';
readonly sep: "\\" | "/";
/**
* The platform-specific file delimiter. ';' or ':'.
*/
readonly delimiter: ';' | ':';
readonly delimiter: ";" | ":";
/**

@@ -166,5 +166,5 @@ * Returns an object from a path string - the opposite of format().

}
declare module 'node:path' {
import path = require('path');
declare module "node:path" {
import path = require("path");
export = path;
}

@@ -1,5 +0,5 @@

declare module 'perf_hooks' {
import { AsyncResource } from 'async_hooks';
declare module "perf_hooks" {
import { AsyncResource } from "async_hooks";
type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
type EntryType = "node" | "mark" | "measure" | "gc" | "function" | "http2" | "http";

@@ -272,4 +272,4 @@ interface PerformanceEntry {

}
declare module 'node:perf_hooks' {
export * from 'perf_hooks';
declare module "node:perf_hooks" {
export * from "perf_hooks";
}

@@ -1,3 +0,3 @@

declare module 'process' {
import * as tty from 'tty';
declare module "process" {
import * as tty from "tty";

@@ -46,21 +46,55 @@ global {

type Platform = 'aix'
| 'android'
| 'darwin'
| 'freebsd'
| 'linux'
| 'openbsd'
| 'sunos'
| 'win32'
| 'cygwin'
| 'netbsd';
type Platform =
| "aix"
| "android"
| "darwin"
| "freebsd"
| "linux"
| "openbsd"
| "sunos"
| "win32"
| "cygwin"
| "netbsd";
type Signals =
"SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
"SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
"SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
"SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
| "SIGABRT"
| "SIGALRM"
| "SIGBUS"
| "SIGCHLD"
| "SIGCONT"
| "SIGFPE"
| "SIGHUP"
| "SIGILL"
| "SIGINT"
| "SIGIO"
| "SIGIOT"
| "SIGKILL"
| "SIGPIPE"
| "SIGPOLL"
| "SIGPROF"
| "SIGPWR"
| "SIGQUIT"
| "SIGSEGV"
| "SIGSTKFLT"
| "SIGSTOP"
| "SIGSYS"
| "SIGTERM"
| "SIGTRAP"
| "SIGTSTP"
| "SIGTTIN"
| "SIGTTOU"
| "SIGUNUSED"
| "SIGURG"
| "SIGUSR1"
| "SIGUSR2"
| "SIGVTALRM"
| "SIGWINCH"
| "SIGXCPU"
| "SIGXFSZ"
| "SIGBREAK"
| "SIGLOST"
| "SIGINFO";
type UncaughtExceptionOrigin = 'uncaughtException' | 'unhandledRejection';
type MultipleResolveType = 'resolve' | 'reject';
type UncaughtExceptionOrigin = "uncaughtException" | "unhandledRejection";
type MultipleResolveType = "resolve" | "reject";

@@ -282,3 +316,8 @@ type BeforeExitListener = (code: number) => void;

// Worker
send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean | undefined}, callback?: (error: Error | null) => void): boolean;
send?(
message: any,
sendHandle?: any,
options?: { swallowErrors?: boolean | undefined },
callback?: (error: Error | null) => void,
): boolean;
disconnect(): void;

@@ -412,5 +451,5 @@ connected: boolean;

}
declare module 'node:process' {
import process = require('process');
declare module "node:process" {
import process = require("process");
export = process;
}

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

*/
declare module 'punycode' {
declare module "punycode" {
/**

@@ -77,4 +77,4 @@ * @deprecated since v7.0.0

}
declare module 'node:punycode' {
export * from 'punycode';
declare module "node:punycode" {
export * from "punycode";
}

@@ -1,2 +0,2 @@

declare module 'querystring' {
declare module "querystring" {
interface StringifyOptions {

@@ -11,5 +11,15 @@ encodeURIComponent?: ((str: string) => string) | undefined;

interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> {}
interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
interface ParsedUrlQueryInput extends
NodeJS.Dict<
| string
| number
| boolean
| ReadonlyArray<string>
| ReadonlyArray<number>
| ReadonlyArray<boolean>
| null
>
{
}

@@ -30,4 +40,4 @@

}
declare module 'node:querystring' {
export * from 'querystring';
declare module "node:querystring" {
export * from "querystring";
}

@@ -1,3 +0,3 @@

declare module 'readline' {
import EventEmitter = require('events');
declare module "readline" {
import EventEmitter = require("events");

@@ -30,3 +30,8 @@ interface Key {

*/
protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
protected constructor(
input: NodeJS.ReadableStream,
output?: NodeJS.WritableStream,
completer?: Completer | AsyncCompleter,
terminal?: boolean,
);
/**

@@ -145,3 +150,8 @@ * NOTE: According to the documentation:

function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
function createInterface(
input: NodeJS.ReadableStream,
output?: NodeJS.WritableStream,
completer?: Completer | AsyncCompleter,
terminal?: boolean,
): Interface;
function createInterface(options: ReadLineOptions): Interface;

@@ -174,4 +184,4 @@ function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;

}
declare module 'node:readline' {
export * from 'readline';
declare module "node:readline" {
export * from "readline";
}

@@ -1,5 +0,5 @@

declare module 'repl' {
import { Interface, Completer, AsyncCompleter } from 'readline';
import { Context } from 'vm';
import { InspectOptions } from 'util';
declare module "repl" {
import { AsyncCompleter, Completer, Interface } from "readline";
import { Context } from "vm";
import { InspectOptions } from "util";

@@ -94,3 +94,9 @@ interface ReplOptions {

type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
type REPLEval = (
this: REPLServer,
evalCmd: string,
context: Context,
file: string,
cb: (err: Error | null, result: any) => void,
) => void;
type REPLWriter = (this: REPLServer, obj: any) => string;

@@ -397,4 +403,4 @@

}
declare module 'node:repl' {
export * from 'repl';
declare module "node:repl" {
export * from "repl";
}

@@ -1,6 +0,6 @@

declare module 'stream' {
import EventEmitter = require('events');
declare module "stream" {
import EventEmitter = require("events");
class internal extends EventEmitter {
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
}

@@ -133,4 +133,13 @@

emitClose?: boolean | undefined;
write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
write?(
this: Writable,
chunk: any,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
): void;
writev?(
this: Writable,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;

@@ -152,3 +161,6 @@ final?(this: Writable, callback: (error?: Error | null) => void): void;

_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
_writev?(
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;

@@ -242,3 +254,7 @@ _final(callback: (error?: Error | null) => void): void;

write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
writev?(
this: Duplex,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
final?(this: Duplex, callback: (error?: Error | null) => void): void;

@@ -260,3 +276,6 @@ destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;

_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
_writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
_writev?(
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
_destroy(error: Error | null, callback: (error: Error | null) => void): void;

@@ -287,85 +306,85 @@ _final(callback: (error?: Error | null) => void): void;

*/
addListener(event: 'close', listener: () => void): this;
addListener(event: 'data', listener: (chunk: any) => void): this;
addListener(event: 'drain', listener: () => void): this;
addListener(event: 'end', listener: () => void): this;
addListener(event: 'error', listener: (err: Error) => void): this;
addListener(event: 'finish', listener: () => void): this;
addListener(event: 'pause', listener: () => void): this;
addListener(event: 'pipe', listener: (src: Readable) => void): this;
addListener(event: 'readable', listener: () => void): this;
addListener(event: 'resume', listener: () => void): this;
addListener(event: 'unpipe', listener: (src: Readable) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "data", listener: (chunk: any) => void): this;
addListener(event: "drain", listener: () => void): this;
addListener(event: "end", listener: () => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "finish", listener: () => void): this;
addListener(event: "pause", listener: () => void): this;
addListener(event: "pipe", listener: (src: Readable) => void): this;
addListener(event: "readable", listener: () => void): this;
addListener(event: "resume", listener: () => void): this;
addListener(event: "unpipe", listener: (src: Readable) => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
emit(event: 'close'): boolean;
emit(event: 'data', chunk: any): boolean;
emit(event: 'drain'): boolean;
emit(event: 'end'): boolean;
emit(event: 'error', err: Error): boolean;
emit(event: 'finish'): boolean;
emit(event: 'pause'): boolean;
emit(event: 'pipe', src: Readable): boolean;
emit(event: 'readable'): boolean;
emit(event: 'resume'): boolean;
emit(event: 'unpipe', src: Readable): boolean;
emit(event: "close"): boolean;
emit(event: "data", chunk: any): boolean;
emit(event: "drain"): boolean;
emit(event: "end"): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "finish"): boolean;
emit(event: "pause"): boolean;
emit(event: "pipe", src: Readable): boolean;
emit(event: "readable"): boolean;
emit(event: "resume"): boolean;
emit(event: "unpipe", src: Readable): boolean;
emit(event: string | symbol, ...args: any[]): boolean;
on(event: 'close', listener: () => void): this;
on(event: 'data', listener: (chunk: any) => void): this;
on(event: 'drain', listener: () => void): this;
on(event: 'end', listener: () => void): this;
on(event: 'error', listener: (err: Error) => void): this;
on(event: 'finish', listener: () => void): this;
on(event: 'pause', listener: () => void): this;
on(event: 'pipe', listener: (src: Readable) => void): this;
on(event: 'readable', listener: () => void): this;
on(event: 'resume', listener: () => void): this;
on(event: 'unpipe', listener: (src: Readable) => void): this;
on(event: "close", listener: () => void): this;
on(event: "data", listener: (chunk: any) => void): this;
on(event: "drain", listener: () => void): this;
on(event: "end", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "finish", listener: () => void): this;
on(event: "pause", listener: () => void): this;
on(event: "pipe", listener: (src: Readable) => void): this;
on(event: "readable", listener: () => void): this;
on(event: "resume", listener: () => void): this;
on(event: "unpipe", listener: (src: Readable) => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: 'close', listener: () => void): this;
once(event: 'data', listener: (chunk: any) => void): this;
once(event: 'drain', listener: () => void): this;
once(event: 'end', listener: () => void): this;
once(event: 'error', listener: (err: Error) => void): this;
once(event: 'finish', listener: () => void): this;
once(event: 'pause', listener: () => void): this;
once(event: 'pipe', listener: (src: Readable) => void): this;
once(event: 'readable', listener: () => void): this;
once(event: 'resume', listener: () => void): this;
once(event: 'unpipe', listener: (src: Readable) => void): this;
once(event: "close", listener: () => void): this;
once(event: "data", listener: (chunk: any) => void): this;
once(event: "drain", listener: () => void): this;
once(event: "end", listener: () => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "finish", listener: () => void): this;
once(event: "pause", listener: () => void): this;
once(event: "pipe", listener: (src: Readable) => void): this;
once(event: "readable", listener: () => void): this;
once(event: "resume", listener: () => void): this;
once(event: "unpipe", listener: (src: Readable) => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: 'close', listener: () => void): this;
prependListener(event: 'data', listener: (chunk: any) => void): this;
prependListener(event: 'drain', listener: () => void): this;
prependListener(event: 'end', listener: () => void): this;
prependListener(event: 'error', listener: (err: Error) => void): this;
prependListener(event: 'finish', listener: () => void): this;
prependListener(event: 'pause', listener: () => void): this;
prependListener(event: 'pipe', listener: (src: Readable) => void): this;
prependListener(event: 'readable', listener: () => void): this;
prependListener(event: 'resume', listener: () => void): this;
prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "data", listener: (chunk: any) => void): this;
prependListener(event: "drain", listener: () => void): this;
prependListener(event: "end", listener: () => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "finish", listener: () => void): this;
prependListener(event: "pause", listener: () => void): this;
prependListener(event: "pipe", listener: (src: Readable) => void): this;
prependListener(event: "readable", listener: () => void): this;
prependListener(event: "resume", listener: () => void): this;
prependListener(event: "unpipe", listener: (src: Readable) => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'close', listener: () => void): this;
prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
prependOnceListener(event: 'drain', listener: () => void): this;
prependOnceListener(event: 'end', listener: () => void): this;
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
prependOnceListener(event: 'finish', listener: () => void): this;
prependOnceListener(event: 'pause', listener: () => void): this;
prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
prependOnceListener(event: 'readable', listener: () => void): this;
prependOnceListener(event: 'resume', listener: () => void): this;
prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "data", listener: (chunk: any) => void): this;
prependOnceListener(event: "drain", listener: () => void): this;
prependOnceListener(event: "end", listener: () => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "finish", listener: () => void): this;
prependOnceListener(event: "pause", listener: () => void): this;
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
prependOnceListener(event: "readable", listener: () => void): this;
prependOnceListener(event: "resume", listener: () => void): this;
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: 'close', listener: () => void): this;
removeListener(event: 'data', listener: (chunk: any) => void): this;
removeListener(event: 'drain', listener: () => void): this;
removeListener(event: 'end', listener: () => void): this;
removeListener(event: 'error', listener: (err: Error) => void): this;
removeListener(event: 'finish', listener: () => void): this;
removeListener(event: 'pause', listener: () => void): this;
removeListener(event: 'pipe', listener: (src: Readable) => void): this;
removeListener(event: 'readable', listener: () => void): this;
removeListener(event: 'resume', listener: () => void): this;
removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
removeListener(event: "close", listener: () => void): this;
removeListener(event: "data", listener: (chunk: any) => void): this;
removeListener(event: "drain", listener: () => void): this;
removeListener(event: "end", listener: () => void): this;
removeListener(event: "error", listener: (err: Error) => void): this;
removeListener(event: "finish", listener: () => void): this;
removeListener(event: "pause", listener: () => void): this;
removeListener(event: "pipe", listener: (src: Readable) => void): this;
removeListener(event: "readable", listener: () => void): this;
removeListener(event: "resume", listener: () => void): this;
removeListener(event: "unpipe", listener: (src: Readable) => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;

@@ -378,4 +397,13 @@ }

read?(this: Transform, size: number): void;
write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
write?(
this: Transform,
chunk: any,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
): void;
writev?(
this: Transform,
chunks: Array<{ chunk: any; encoding: BufferEncoding }>,
callback: (error?: Error | null) => void,
): void;
final?(this: Transform, callback: (error?: Error | null) => void): void;

@@ -393,3 +421,3 @@ destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;

class PassThrough extends Transform { }
class PassThrough extends Transform {}

@@ -401,13 +429,32 @@ interface FinishedOptions {

}
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
function finished(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
options: FinishedOptions,
callback: (err?: NodeJS.ErrnoException | null) => void,
): () => void;
function finished(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
callback: (err?: NodeJS.ErrnoException | null) => void,
): () => void;
namespace finished {
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
function __promisify__(
stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
options?: FinishedOptions,
): Promise<void>;
}
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: T,
callback?: (err: NodeJS.ErrnoException | null) => void,
): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: T,
callback?: (err: NodeJS.ErrnoException | null) => void,
): T;
function pipeline<T extends NodeJS.WritableStream>(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,

@@ -432,20 +479,33 @@ stream4: T,

stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
...streams: Array<
NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)
>
): NodeJS.WritableStream;
namespace pipeline {
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise<void>;
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,
stream4: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream,
stream3: NodeJS.ReadWriteStream,
stream4: NodeJS.ReadWriteStream,
stream5: NodeJS.WritableStream,
): Promise<void>;
function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
function __promisify__(
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
): Promise<void>;
function __promisify__(
stream1: NodeJS.ReadableStream,
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>,
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>
): Promise<void>;

@@ -464,5 +524,5 @@ }

}
declare module 'node:stream' {
import stream = require('stream');
declare module "node:stream" {
import stream = require("stream");
export = stream;
}

@@ -1,2 +0,2 @@

declare module 'string_decoder' {
declare module "string_decoder" {
class StringDecoder {

@@ -8,4 +8,4 @@ constructor(encoding?: BufferEncoding);

}
declare module 'node:string_decoder' {
export * from 'string_decoder';
declare module "node:string_decoder" {
export * from "string_decoder";
}

@@ -1,2 +0,2 @@

declare module 'timers' {
declare module "timers" {
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;

@@ -17,4 +17,4 @@ namespace setTimeout {

}
declare module 'node:timers' {
export * from 'timers';
declare module "node:timers" {
export * from "timers";
}

@@ -1,4 +0,4 @@

declare module 'tls' {
import * as net from 'net';
import * as stream from 'stream';
declare module "tls" {
import * as net from "net";
import * as stream from "stream";

@@ -269,3 +269,6 @@ const CLIENT_RENEG_LIMIT: number;

*/
renegotiate(options: { rejectUnauthorized?: boolean | undefined, requestCert?: boolean | undefined }, callback: (err: Error | null) => void): undefined | boolean;
renegotiate(
options: { rejectUnauthorized?: boolean | undefined; requestCert?: boolean | undefined },
callback: (err: Error | null) => void,
): undefined | boolean;
/**

@@ -408,3 +411,2 @@ * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).

/**
*
* @param socket

@@ -489,3 +491,2 @@ * @param identity identity parameter sent from the client.

/**
*
* The server.setSecureContext() method replaces the

@@ -514,5 +515,18 @@ * secure context of an existing server. Existing connections to the

addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
addListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
addListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
addListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -524,4 +538,13 @@ addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void): boolean;
emit(
event: "OCSPRequest",
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
): boolean;
emit(
event: "resumeSession",
sessionId: Buffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
): boolean;
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;

@@ -533,4 +556,14 @@ emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;

on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
on(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
on(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -541,5 +574,18 @@ on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
once(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
once(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
once(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -550,5 +596,18 @@ once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
prependListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
prependListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -559,5 +618,18 @@ prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void): this;
prependOnceListener(
event: "newSession",
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
): this;
prependOnceListener(
event: "OCSPRequest",
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependOnceListener(
event: "resumeSession",
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
): this;
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;

@@ -572,3 +644,3 @@ prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;

type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";

@@ -749,3 +821,8 @@ interface SecureContextOptions {

function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
function connect(
port: number,
host?: string,
options?: ConnectionOptions,
secureConnectListener?: () => void,
): TLSSocket;
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;

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

*/
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
function createSecurePair(
credentials?: SecureContext,
isServer?: boolean,
requestCert?: boolean,
rejectUnauthorized?: boolean,
): SecurePair;
function createSecureContext(options?: SecureContextOptions): SecureContext;

@@ -794,4 +876,4 @@ function getCiphers(): string[];

}
declare module 'node:tls' {
export * from 'tls';
declare module "node:tls" {
export * from "tls";
}

@@ -1,2 +0,2 @@

declare module 'trace_events' {
declare module "trace_events" {
/**

@@ -62,4 +62,4 @@ * The `Tracing` object is used to enable or disable tracing for sets of

}
declare module 'node:trace_events' {
export * from 'trace_events';
declare module "node:trace_events" {
export * from "trace_events";
}

@@ -1,3 +0,3 @@

declare module 'tty' {
import * as net from 'net';
declare module "tty" {
import * as net from "net";

@@ -67,4 +67,4 @@ function isatty(fd: number): boolean;

}
declare module 'node:tty' {
export * from 'tty';
declare module "node:tty" {
export * from "tty";
}

@@ -1,4 +0,4 @@

declare module 'url' {
import { ClientRequestArgs } from 'node:http';
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
declare module "url" {
import { ClientRequestArgs } from "node:http";
import { ParsedUrlQuery, ParsedUrlQueryInput } from "querystring";

@@ -47,3 +47,7 @@ // Input to `url.format`

/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
function parse(
urlStr: string,
parseQueryString: false | undefined,
slashesDenoteHost?: boolean,
): UrlWithStringQuery;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */

@@ -130,3 +134,10 @@ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;

class URLSearchParams implements Iterable<[string, string]> {
constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
constructor(
init?:
| URLSearchParams
| string
| Record<string, string | ReadonlyArray<string>>
| Iterable<[string, string]>
| ReadonlyArray<[string, string]>,
);
readonly size: number;

@@ -148,3 +159,3 @@ append(name: string, value: string): void;

import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
global {

@@ -164,4 +175,3 @@ interface URLSearchParams extends _URLSearchParams {}

// For compatibility with "dom" and "webworker" URL declarations
typeof globalThis extends { onmessage: any, URL: infer URL }
? URL
typeof globalThis extends { onmessage: any; URL: infer URL } ? URL
: typeof _URL;

@@ -175,9 +185,8 @@ /**

// For compatibility with "dom" and "webworker" URLSearchParams declarations
typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
? URLSearchParams
typeof globalThis extends { onmessage: any; URLSearchParams: infer URLSearchParams } ? URLSearchParams
: typeof _URLSearchParams;
}
}
declare module 'node:url' {
export * from 'url';
declare module "node:url" {
export * from "url";
}

@@ -1,4 +0,15 @@

declare module 'util' {
interface InspectOptions extends NodeJS.InspectOptions { }
type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
declare module "util" {
interface InspectOptions extends NodeJS.InspectOptions {}
type Style =
| "special"
| "number"
| "bigint"
| "boolean"
| "undefined"
| "null"
| "string"
| "symbol"
| "date"
| "regexp"
| "module";
type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;

@@ -18,3 +29,3 @@ interface InspectOptionsStylized extends InspectOptions {

let styles: {
[K in Style]: string
[K in Style]: string;
};

@@ -69,25 +80,70 @@ let defaultOptions: InspectOptions;

function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<TResult>(
fn: () => Promise<TResult>,
): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1>(
fn: (arg1: T1) => Promise<void>,
): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, TResult>(
fn: (arg1: T1) => Promise<TResult>,
): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1, T2>(
fn: (arg1: T1, arg2: T2) => Promise<void>,
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, TResult>(
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3>(
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3, T4>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, T4, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, T4, T5, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5, T6>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
arg6: T6,
callback: (err: NodeJS.ErrnoException) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
arg6: T6,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;

@@ -107,14 +163,24 @@ interface CustomPromisifyLegacy<TCustom extends Function> extends Function {

function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
function promisify<T1, TResult>(
fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1) => Promise<TResult>;
function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
(arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
function promisify<T1, T2, TResult>(
fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2) => Promise<TResult>;
function promisify<T1, T2>(
fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2) => Promise<void>;
function promisify<T1, T2, T3, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
function promisify<T1, T2, T3>(
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
function promisify<T1, T2, T3, T4, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
function promisify<T1, T2, T3, T4>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
function promisify<T1, T2, T3, T4, T5, TResult>(

@@ -153,6 +219,4 @@ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,

object: T | {},
): object is T extends ReadonlyMap<any, any>
? unknown extends T
? never
: ReadonlyMap<any, any>
): object is T extends ReadonlyMap<any, any> ? unknown extends T ? never
: ReadonlyMap<any, any>
: Map<any, any>;

@@ -168,6 +232,4 @@ function isMapIterator(object: any): boolean;

object: T | {},
): object is T extends ReadonlySet<any>
? unknown extends T
? never
: ReadonlySet<any>
): object is T extends ReadonlySet<any> ? unknown extends T ? never
: ReadonlySet<any>
: Set<any>;

@@ -192,8 +254,8 @@ function isSetIterator(object: any): boolean;

constructor(
encoding?: string,
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
encoding?: string,
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined },
);
decode(
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
options?: { stream?: boolean | undefined }
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
options?: { stream?: boolean | undefined },
): string;

@@ -220,4 +282,4 @@ }

}
declare module 'node:util' {
export * from 'util';
declare module "node:util" {
export * from "util";
}

@@ -1,3 +0,3 @@

declare module 'v8' {
import { Readable } from 'stream';
declare module "v8" {
import { Readable } from "stream";

@@ -55,3 +55,2 @@ interface HeapSpaceInfo {

/**
*
* @param fileName The file path where the V8 heap snapshot is to be

@@ -189,4 +188,4 @@ * saved. If not specified, a file name with the pattern

}
declare module 'node:v8' {
export * from 'v8';
declare module "node:v8" {
export * from "v8";
}

@@ -1,3 +0,3 @@

declare module 'vm' {
interface Context extends NodeJS.Dict<any> { }
declare module "vm" {
interface Context extends NodeJS.Dict<any> {}
interface BaseOptions {

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

*/
microtaskMode?: 'afterEvaluate' | undefined;
microtaskMode?: "afterEvaluate" | undefined;
}

@@ -102,6 +102,6 @@ interface CompileFunctionOptions extends BaseOptions {

*/
microtaskMode?: 'afterEvaluate' | undefined;
microtaskMode?: "afterEvaluate" | undefined;
}
type MeasureMemoryMode = 'summary' | 'detailed';
type MeasureMemoryMode = "summary" | "detailed";

@@ -155,4 +155,4 @@ interface MeasureMemoryOptions {

}
declare module 'node:vm' {
export * from 'vm';
declare module "node:vm" {
export * from "vm";
}

@@ -1,2 +0,2 @@

declare module 'wasi' {
declare module "wasi" {
interface WASIOptions {

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

/**
*
* Attempt to begin execution of `instance` by invoking its `_start()` export.

@@ -88,4 +87,4 @@ * If `instance` does not contain a `_start()` export, then `start()` attempts to

}
declare module 'node:wasi' {
export * from 'wasi';
declare module "node:wasi" {
export * from "wasi";
}

@@ -1,7 +0,7 @@

declare module 'worker_threads' {
import { Context } from 'vm';
import EventEmitter = require('events');
import { Readable, Writable } from 'stream';
import { URL } from 'url';
import { FileHandle } from 'fs/promises';
declare module "worker_threads" {
import { Context } from "vm";
import EventEmitter = require("events");
import { Readable, Writable } from "stream";
import { URL } from "url";
import { FileHandle } from "fs/promises";

@@ -239,4 +239,4 @@ const isMainThread: boolean;

}
declare module 'node:worker_threads' {
export * from 'worker_threads';
declare module "node:worker_threads" {
export * from "worker_threads";
}

@@ -1,3 +0,3 @@

declare module 'zlib' {
import * as stream from 'stream';
declare module "zlib" {
import * as stream from "stream";

@@ -66,11 +66,11 @@ interface ZlibOptions {

interface BrotliCompress extends stream.Transform, Zlib { }
interface BrotliDecompress extends stream.Transform, Zlib { }
interface Gzip extends stream.Transform, Zlib { }
interface Gunzip extends stream.Transform, Zlib { }
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
interface Inflate extends stream.Transform, Zlib, ZlibReset { }
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
interface Unzip extends stream.Transform, Zlib { }
interface BrotliCompress extends stream.Transform, Zlib {}
interface BrotliDecompress extends stream.Transform, Zlib {}
interface Gzip extends stream.Transform, Zlib {}
interface Gunzip extends stream.Transform, Zlib {}
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface Inflate extends stream.Transform, Zlib, ZlibReset {}
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
interface Unzip extends stream.Transform, Zlib {}

@@ -363,4 +363,4 @@ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;

}
declare module 'node:zlib' {
export * from 'zlib';
declare module "node:zlib" {
export * from "zlib";
}

@@ -1,3 +0,3 @@

declare module 'tty' {
import * as net from 'net';
declare module "tty" {
import * as net from "net";

@@ -67,4 +67,4 @@ function isatty(fd: number): boolean;

}
declare module 'node:tty' {
export * from 'tty';
declare module "node:tty" {
export * from "tty";
}

@@ -1,4 +0,4 @@

declare module 'url' {
import { ClientRequestArgs } from 'node:http';
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
declare module "url" {
import { ClientRequestArgs } from "node:http";
import { ParsedUrlQuery, ParsedUrlQueryInput } from "querystring";

@@ -47,3 +47,7 @@ // Input to `url.format`

/** @deprecated since v11.0.0 - Use the WHATWG URL API. */
function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
function parse(
urlStr: string,
parseQueryString: false | undefined,
slashesDenoteHost?: boolean,
): UrlWithStringQuery;
/** @deprecated since v11.0.0 - Use the WHATWG URL API. */

@@ -130,3 +134,10 @@ function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;

class URLSearchParams implements Iterable<[string, string]> {
constructor(init?: URLSearchParams | string | Record<string, string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
constructor(
init?:
| URLSearchParams
| string
| Record<string, string | ReadonlyArray<string>>
| Iterable<[string, string]>
| ReadonlyArray<[string, string]>,
);
readonly size: number;

@@ -148,3 +159,3 @@ append(name: string, value: string): void;

import { URL as _URL, URLSearchParams as _URLSearchParams } from 'url';
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
global {

@@ -164,4 +175,3 @@ interface URLSearchParams extends _URLSearchParams {}

// For compatibility with "dom" and "webworker" URL declarations
typeof globalThis extends { onmessage: any, URL: infer URL }
? URL
typeof globalThis extends { onmessage: any; URL: infer URL } ? URL
: typeof _URL;

@@ -175,9 +185,8 @@ /**

// For compatibility with "dom" and "webworker" URLSearchParams declarations
typeof globalThis extends { onmessage: any, URLSearchParams: infer URLSearchParams }
? URLSearchParams
typeof globalThis extends { onmessage: any; URLSearchParams: infer URLSearchParams } ? URLSearchParams
: typeof _URLSearchParams;
}
}
declare module 'node:url' {
export * from 'url';
declare module "node:url" {
export * from "url";
}

@@ -1,4 +0,15 @@

declare module 'util' {
interface InspectOptions extends NodeJS.InspectOptions { }
type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
declare module "util" {
interface InspectOptions extends NodeJS.InspectOptions {}
type Style =
| "special"
| "number"
| "bigint"
| "boolean"
| "undefined"
| "null"
| "string"
| "symbol"
| "date"
| "regexp"
| "module";
type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;

@@ -18,3 +29,3 @@ interface InspectOptionsStylized extends InspectOptions {

let styles: {
[K in Style]: string
[K in Style]: string;
};

@@ -69,25 +80,70 @@ let defaultOptions: InspectOptions;

function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<TResult>(
fn: () => Promise<TResult>,
): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1>(
fn: (arg1: T1) => Promise<void>,
): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, TResult>(
fn: (arg1: T1) => Promise<TResult>,
): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
function callbackify<T1, T2>(
fn: (arg1: T1, arg2: T2) => Promise<void>,
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, TResult>(
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3>(
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
function callbackify<T1, T2, T3, T4>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, T4, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
function callbackify<T1, T2, T3, T4, T5, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5, T6>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
arg6: T6,
callback: (err: NodeJS.ErrnoException) => void,
) => void;
function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
): (
arg1: T1,
arg2: T2,
arg3: T3,
arg4: T4,
arg5: T5,
arg6: T6,
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
) => void;

@@ -107,14 +163,24 @@ interface CustomPromisifyLegacy<TCustom extends Function> extends Function {

function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
function promisify<T1, TResult>(
fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1) => Promise<TResult>;
function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
(arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
function promisify<T1, T2, TResult>(
fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2) => Promise<TResult>;
function promisify<T1, T2>(
fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2) => Promise<void>;
function promisify<T1, T2, T3, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
function promisify<T1, T2, T3>(
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
function promisify<T1, T2, T3, T4, TResult>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
function promisify<T1, T2, T3, T4>(
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
function promisify<T1, T2, T3, T4, T5, TResult>(

@@ -153,6 +219,4 @@ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,

object: T | {},
): object is T extends ReadonlyMap<any, any>
? unknown extends T
? never
: ReadonlyMap<any, any>
): object is T extends ReadonlyMap<any, any> ? unknown extends T ? never
: ReadonlyMap<any, any>
: Map<any, any>;

@@ -168,6 +232,4 @@ function isMapIterator(object: any): boolean;

object: T | {},
): object is T extends ReadonlySet<any>
? unknown extends T
? never
: ReadonlySet<any>
): object is T extends ReadonlySet<any> ? unknown extends T ? never
: ReadonlySet<any>
: Set<any>;

@@ -192,8 +254,8 @@ function isSetIterator(object: any): boolean;

constructor(
encoding?: string,
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
encoding?: string,
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined },
);
decode(
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
options?: { stream?: boolean | undefined }
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
options?: { stream?: boolean | undefined },
): string;

@@ -220,4 +282,4 @@ }

}
declare module 'node:util' {
export * from 'util';
declare module "node:util" {
export * from "util";
}

@@ -1,3 +0,3 @@

declare module 'v8' {
import { Readable } from 'stream';
declare module "v8" {
import { Readable } from "stream";

@@ -55,3 +55,2 @@ interface HeapSpaceInfo {

/**
*
* @param fileName The file path where the V8 heap snapshot is to be

@@ -189,4 +188,4 @@ * saved. If not specified, a file name with the pattern

}
declare module 'node:v8' {
export * from 'v8';
declare module "node:v8" {
export * from "v8";
}

@@ -1,3 +0,3 @@

declare module 'vm' {
interface Context extends NodeJS.Dict<any> { }
declare module "vm" {
interface Context extends NodeJS.Dict<any> {}
interface BaseOptions {

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

*/
microtaskMode?: 'afterEvaluate' | undefined;
microtaskMode?: "afterEvaluate" | undefined;
}

@@ -102,6 +102,6 @@ interface CompileFunctionOptions extends BaseOptions {

*/
microtaskMode?: 'afterEvaluate' | undefined;
microtaskMode?: "afterEvaluate" | undefined;
}
type MeasureMemoryMode = 'summary' | 'detailed';
type MeasureMemoryMode = "summary" | "detailed";

@@ -155,4 +155,4 @@ interface MeasureMemoryOptions {

}
declare module 'node:vm' {
export * from 'vm';
declare module "node:vm" {
export * from "vm";
}

@@ -1,2 +0,2 @@

declare module 'wasi' {
declare module "wasi" {
interface WASIOptions {

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

/**
*
* Attempt to begin execution of `instance` by invoking its `_start()` export.

@@ -88,4 +87,4 @@ * If `instance` does not contain a `_start()` export, then `start()` attempts to

}
declare module 'node:wasi' {
export * from 'wasi';
declare module "node:wasi" {
export * from "wasi";
}

@@ -1,7 +0,7 @@

declare module 'worker_threads' {
import { Context } from 'vm';
import EventEmitter = require('events');
import { Readable, Writable } from 'stream';
import { URL } from 'url';
import { FileHandle } from 'fs/promises';
declare module "worker_threads" {
import { Context } from "vm";
import EventEmitter = require("events");
import { Readable, Writable } from "stream";
import { URL } from "url";
import { FileHandle } from "fs/promises";

@@ -239,4 +239,4 @@ const isMainThread: boolean;

}
declare module 'node:worker_threads' {
export * from 'worker_threads';
declare module "node:worker_threads" {
export * from "worker_threads";
}

@@ -1,3 +0,3 @@

declare module 'zlib' {
import * as stream from 'stream';
declare module "zlib" {
import * as stream from "stream";

@@ -66,11 +66,11 @@ interface ZlibOptions {

interface BrotliCompress extends stream.Transform, Zlib { }
interface BrotliDecompress extends stream.Transform, Zlib { }
interface Gzip extends stream.Transform, Zlib { }
interface Gunzip extends stream.Transform, Zlib { }
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
interface Inflate extends stream.Transform, Zlib, ZlibReset { }
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
interface Unzip extends stream.Transform, Zlib { }
interface BrotliCompress extends stream.Transform, Zlib {}
interface BrotliDecompress extends stream.Transform, Zlib {}
interface Gzip extends stream.Transform, Zlib {}
interface Gunzip extends stream.Transform, Zlib {}
interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface Inflate extends stream.Transform, Zlib, ZlibReset {}
interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams {}
interface InflateRaw extends stream.Transform, Zlib, ZlibReset {}
interface Unzip extends stream.Transform, Zlib {}

@@ -363,4 +363,4 @@ function createBrotliCompress(options?: BrotliOptions): BrotliCompress;

}
declare module 'node:zlib' {
export * from 'zlib';
declare module "node:zlib" {
export * from "zlib";
}

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc