[upd] server:lib:node_modules
Christian Fraß

Christian Fraß commited on 2021-03-12 00:47:11
Zeige 54 geänderte Dateien mit 0 Einfügungen und 16411 Löschungen.

... ...
@@ -1,21 +0,0 @@
1
-    MIT License
2
-
3
-    Copyright (c) Microsoft Corporation.
4
-
5
-    Permission is hereby granted, free of charge, to any person obtaining a copy
6
-    of this software and associated documentation files (the "Software"), to deal
7
-    in the Software without restriction, including without limitation the rights
8
-    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
-    copies of the Software, and to permit persons to whom the Software is
10
-    furnished to do so, subject to the following conditions:
11
-
12
-    The above copyright notice and this permission notice shall be included in all
13
-    copies or substantial portions of the Software.
14
-
15
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
-    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
-    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
-    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
-    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
-    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
-    SOFTWARE
... ...
@@ -1,16 +0,0 @@
1
-# Installation
2
-> `npm install --save @types/node`
3
-
4
-# Summary
5
-This package contains type definitions for Node.js (http://nodejs.org/).
6
-
7
-# Details
8
-Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
-
10
-### Additional Details
11
- * Last updated: Fri, 19 Feb 2021 17:58:40 GMT
12
- * Dependencies: none
13
- * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
-
15
-# Credits
16
-These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
... ...
@@ -1,129 +0,0 @@
1
-declare module 'node:assert' {
2
-    import assert = require('assert');
3
-    export = assert;
4
-}
5
-
6
-declare module 'assert' {
7
-    /** An alias of `assert.ok()`. */
8
-    function assert(value: any, message?: string | Error): asserts value;
9
-    namespace assert {
10
-        class AssertionError extends Error {
11
-            actual: any;
12
-            expected: any;
13
-            operator: string;
14
-            generatedMessage: boolean;
15
-            code: 'ERR_ASSERTION';
16
-
17
-            constructor(options?: {
18
-                /** If provided, the error message is set to this value. */
19
-                message?: string;
20
-                /** The `actual` property on the error instance. */
21
-                actual?: any;
22
-                /** The `expected` property on the error instance. */
23
-                expected?: any;
24
-                /** The `operator` property on the error instance. */
25
-                operator?: string;
26
-                /** If provided, the generated stack trace omits frames before this function. */
27
-                // tslint:disable-next-line:ban-types
28
-                stackStartFn?: Function;
29
-            });
30
-        }
31
-
32
-        class CallTracker {
33
-            calls(exact?: number): () => void;
34
-            calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
35
-            report(): CallTrackerReportInformation[];
36
-            verify(): void;
37
-        }
38
-        interface CallTrackerReportInformation {
39
-            message: string;
40
-            /** The actual number of times the function was called. */
41
-            actual: number;
42
-            /** The number of times the function was expected to be called. */
43
-            expected: number;
44
-            /** The name of the function that is wrapped. */
45
-            operator: string;
46
-            /** A stack trace of the function. */
47
-            stack: object;
48
-        }
49
-
50
-        type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
51
-
52
-        function fail(message?: string | Error): never;
53
-        /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
54
-        function fail(
55
-            actual: any,
56
-            expected: any,
57
-            message?: string | Error,
58
-            operator?: string,
59
-            // tslint:disable-next-line:ban-types
60
-            stackStartFn?: Function,
61
-        ): never;
62
-        function ok(value: any, message?: string | Error): asserts value;
63
-        /** @deprecated since v9.9.0 - use strictEqual() instead. */
64
-        function equal(actual: any, expected: any, message?: string | Error): void;
65
-        /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
66
-        function notEqual(actual: any, expected: any, message?: string | Error): void;
67
-        /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
68
-        function deepEqual(actual: any, expected: any, message?: string | Error): void;
69
-        /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
70
-        function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
71
-        function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
72
-        function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
73
-        function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
74
-        function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
75
-
76
-        function throws(block: () => any, message?: string | Error): void;
77
-        function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
78
-        function doesNotThrow(block: () => any, message?: string | Error): void;
79
-        function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
80
-
81
-        function ifError(value: any): asserts value is null | undefined;
82
-
83
-        function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
84
-        function rejects(
85
-            block: (() => Promise<any>) | Promise<any>,
86
-            error: AssertPredicate,
87
-            message?: string | Error,
88
-        ): Promise<void>;
89
-        function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
90
-        function doesNotReject(
91
-            block: (() => Promise<any>) | Promise<any>,
92
-            error: AssertPredicate,
93
-            message?: string | Error,
94
-        ): Promise<void>;
95
-
96
-        function match(value: string, regExp: RegExp, message?: string | Error): void;
97
-        function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
98
-
99
-        const strict: Omit<
100
-            typeof assert,
101
-            | 'equal'
102
-            | 'notEqual'
103
-            | 'deepEqual'
104
-            | 'notDeepEqual'
105
-            | 'ok'
106
-            | 'strictEqual'
107
-            | 'deepStrictEqual'
108
-            | 'ifError'
109
-            | 'strict'
110
-        > & {
111
-            (value: any, message?: string | Error): asserts value;
112
-            equal: typeof strictEqual;
113
-            notEqual: typeof notStrictEqual;
114
-            deepEqual: typeof deepStrictEqual;
115
-            notDeepEqual: typeof notDeepStrictEqual;
116
-
117
-            // Mapped types and assertion functions are incompatible?
118
-            // TS2775: Assertions require every name in the call target
119
-            // to be declared with an explicit type annotation.
120
-            ok: typeof ok;
121
-            strictEqual: typeof strictEqual;
122
-            deepStrictEqual: typeof deepStrictEqual;
123
-            ifError: typeof ifError;
124
-            strict: typeof strict;
125
-        };
126
-    }
127
-
128
-    export = assert;
129
-}
... ...
@@ -1,233 +0,0 @@
1
-/**
2
- * Async Hooks module: https://nodejs.org/api/async_hooks.html
3
- */
4
-declare module 'node:async_hooks' {
5
-    export * from 'async_hooks';
6
-}
7
-
8
-/**
9
- * Async Hooks module: https://nodejs.org/api/async_hooks.html
10
- */
11
-declare module 'async_hooks' {
12
-    /**
13
-     * Returns the asyncId of the current execution context.
14
-     */
15
-    function executionAsyncId(): number;
16
-
17
-    /**
18
-     * The resource representing the current execution.
19
-     *  Useful to store data within the resource.
20
-     *
21
-     * Resource objects returned by `executionAsyncResource()` are most often internal
22
-     * Node.js handle objects with undocumented APIs. Using any functions or properties
23
-     * on the object is likely to crash your application and should be avoided.
24
-     *
25
-     * Using `executionAsyncResource()` in the top-level execution context will
26
-     * return an empty object as there is no handle or request object to use,
27
-     * but having an object representing the top-level can be helpful.
28
-     */
29
-    function executionAsyncResource(): object;
30
-
31
-    /**
32
-     * Returns the ID of the resource responsible for calling the callback that is currently being executed.
33
-     */
34
-    function triggerAsyncId(): number;
35
-
36
-    interface HookCallbacks {
37
-        /**
38
-         * Called when a class is constructed that has the possibility to emit an asynchronous event.
39
-         * @param asyncId a unique ID for the async resource
40
-         * @param type the type of the async resource
41
-         * @param triggerAsyncId the unique ID of the async resource in whose execution context this async resource was created
42
-         * @param resource reference to the resource representing the async operation, needs to be released during destroy
43
-         */
44
-        init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
45
-
46
-        /**
47
-         * When an asynchronous operation is initiated or completes a callback is called to notify the user.
48
-         * The before callback is called just before said callback is executed.
49
-         * @param asyncId the unique identifier assigned to the resource about to execute the callback.
50
-         */
51
-        before?(asyncId: number): void;
52
-
53
-        /**
54
-         * Called immediately after the callback specified in before is completed.
55
-         * @param asyncId the unique identifier assigned to the resource which has executed the callback.
56
-         */
57
-        after?(asyncId: number): void;
58
-
59
-        /**
60
-         * Called when a promise has resolve() called. This may not be in the same execution id
61
-         * as the promise itself.
62
-         * @param asyncId the unique id for the promise that was resolve()d.
63
-         */
64
-        promiseResolve?(asyncId: number): void;
65
-
66
-        /**
67
-         * Called after the resource corresponding to asyncId is destroyed
68
-         * @param asyncId a unique ID for the async resource
69
-         */
70
-        destroy?(asyncId: number): void;
71
-    }
72
-
73
-    interface AsyncHook {
74
-        /**
75
-         * Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
76
-         */
77
-        enable(): this;
78
-
79
-        /**
80
-         * Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
81
-         */
82
-        disable(): this;
83
-    }
84
-
85
-    /**
86
-     * Registers functions to be called for different lifetime events of each async operation.
87
-     * @param options the callbacks to register
88
-     * @return an AsyncHooks instance used for disabling and enabling hooks
89
-     */
90
-    function createHook(options: HookCallbacks): AsyncHook;
91
-
92
-    interface AsyncResourceOptions {
93
-      /**
94
-       * The ID of the execution context that created this async event.
95
-       * Default: `executionAsyncId()`
96
-       */
97
-      triggerAsyncId?: number;
98
-
99
-      /**
100
-       * Disables automatic `emitDestroy` when the object is garbage collected.
101
-       * This usually does not need to be set (even if `emitDestroy` is called
102
-       * manually), unless the resource's `asyncId` is retrieved and the
103
-       * sensitive API's `emitDestroy` is called with it.
104
-       * Default: `false`
105
-       */
106
-      requireManualDestroy?: boolean;
107
-    }
108
-
109
-    /**
110
-     * The class AsyncResource was designed to be extended by the embedder's async resources.
111
-     * Using this users can easily trigger the lifetime events of their own resources.
112
-     */
113
-    class AsyncResource {
114
-        /**
115
-         * AsyncResource() is meant to be extended. Instantiating a
116
-         * new AsyncResource() also triggers init. If triggerAsyncId is omitted then
117
-         * async_hook.executionAsyncId() is used.
118
-         * @param type The type of async event.
119
-         * @param triggerAsyncId The ID of the execution context that created
120
-         *   this async event (default: `executionAsyncId()`), or an
121
-         *   AsyncResourceOptions object (since 9.3)
122
-         */
123
-        constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
124
-
125
-        /**
126
-         * Binds the given function to the current execution context.
127
-         * @param fn The function to bind to the current execution context.
128
-         * @param type An optional name to associate with the underlying `AsyncResource`.
129
-         */
130
-        static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
131
-
132
-        /**
133
-         * Binds the given function to execute to this `AsyncResource`'s scope.
134
-         * @param fn The function to bind to the current `AsyncResource`.
135
-         */
136
-        bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
137
-
138
-        /**
139
-         * Call the provided function with the provided arguments in the
140
-         * execution context of the async resource. This will establish the
141
-         * context, trigger the AsyncHooks before callbacks, call the function,
142
-         * trigger the AsyncHooks after callbacks, and then restore the original
143
-         * execution context.
144
-         * @param fn The function to call in the execution context of this
145
-         *   async resource.
146
-         * @param thisArg The receiver to be used for the function call.
147
-         * @param args Optional arguments to pass to the function.
148
-         */
149
-        runInAsyncScope<This, Result>(fn: (this: This, ...args: any[]) => Result, thisArg?: This, ...args: any[]): Result;
150
-
151
-        /**
152
-         * Call AsyncHooks destroy callbacks.
153
-         */
154
-        emitDestroy(): void;
155
-
156
-        /**
157
-         * @return the unique ID assigned to this AsyncResource instance.
158
-         */
159
-        asyncId(): number;
160
-
161
-        /**
162
-         * @return the trigger ID for this AsyncResource instance.
163
-         */
164
-        triggerAsyncId(): number;
165
-    }
166
-
167
-    /**
168
-     * When having multiple instances of `AsyncLocalStorage`, they are independent
169
-     * from each other. It is safe to instantiate this class multiple times.
170
-     */
171
-    class AsyncLocalStorage<T> {
172
-        /**
173
-         * This method disables the instance of `AsyncLocalStorage`. All subsequent calls
174
-         * to `asyncLocalStorage.getStore()` will return `undefined` until
175
-         * `asyncLocalStorage.run()` is called again.
176
-         *
177
-         * When calling `asyncLocalStorage.disable()`, all current contexts linked to the
178
-         * instance will be exited.
179
-         *
180
-         * Calling `asyncLocalStorage.disable()` is required before the
181
-         * `asyncLocalStorage` can be garbage collected. This does not apply to stores
182
-         * provided by the `asyncLocalStorage`, as those objects are garbage collected
183
-         * along with the corresponding async resources.
184
-         *
185
-         * This method is to be used when the `asyncLocalStorage` is not in use anymore
186
-         * in the current process.
187
-         */
188
-        disable(): void;
189
-
190
-        /**
191
-         * This method returns the current store. If this method is called outside of an
192
-         * asynchronous context initialized by calling `asyncLocalStorage.run`, it will
193
-         * return `undefined`.
194
-         */
195
-        getStore(): T | undefined;
196
-
197
-        /**
198
-         * This methods runs a function synchronously within a context and return its
199
-         * return value. The store is not accessible outside of the callback function or
200
-         * the asynchronous operations created within the callback.
201
-         *
202
-         * Optionally, arguments can be passed to the function. They will be passed to the
203
-         * callback function.
204
-         *
205
-         * I the callback function throws an error, it will be thrown by `run` too. The
206
-         * stacktrace will not be impacted by this call and the context will be exited.
207
-         */
208
-        // TODO: Apply generic vararg once available
209
-        run<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
210
-
211
-        /**
212
-         * This methods runs a function synchronously outside of a context and return its
213
-         * return value. The store is not accessible within the callback function or the
214
-         * asynchronous operations created within the callback.
215
-         *
216
-         * Optionally, arguments can be passed to the function. They will be passed to the
217
-         * callback function.
218
-         *
219
-         * If the callback function throws an error, it will be thrown by `exit` too. The
220
-         * stacktrace will not be impacted by this call and the context will be
221
-         * re-entered.
222
-         */
223
-        // TODO: Apply generic vararg once available
224
-        exit<R>(callback: (...args: any[]) => R, ...args: any[]): R;
225
-
226
-        /**
227
-         * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
228
-         * for the remainder of the current synchronous execution and will persist
229
-         * through any following asynchronous calls.
230
-         */
231
-        enterWith(store: T): void;
232
-    }
233
-}
... ...
@@ -1,19 +0,0 @@
1
-// NOTE: These definitions support NodeJS and TypeScript 3.7.
2
-
3
-// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
-//          - ~/base.d.ts         - Shared definitions common to all TypeScript versions
5
-//          - ~/index.d.ts        - Definitions specific to TypeScript 2.1
6
-//          - ~/ts3.7/base.d.ts   - Definitions specific to TypeScript 3.7
7
-//          - ~/ts3.7/index.d.ts  - Definitions specific to TypeScript 3.7 with assert pulled in
8
-
9
-// Reference required types from the default lib:
10
-/// <reference lib="es2018" />
11
-/// <reference lib="esnext.asynciterable" />
12
-/// <reference lib="esnext.intl" />
13
-/// <reference lib="esnext.bigint" />
14
-
15
-// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
-/// <reference path="ts3.6/base.d.ts" />
17
-
18
-// TypeScript 3.7-specific augmentations:
19
-/// <reference path="assert.d.ts" />
... ...
@@ -1,26 +0,0 @@
1
-declare module 'node:buffer' {
2
-    export * from 'buffer';
3
-}
4
-
5
-declare module 'buffer' {
6
-    export const INSPECT_MAX_BYTES: number;
7
-    export const kMaxLength: number;
8
-    export const kStringMaxLength: number;
9
-    export const constants: {
10
-        MAX_LENGTH: number;
11
-        MAX_STRING_LENGTH: number;
12
-    };
13
-    const BuffType: typeof Buffer;
14
-
15
-    export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
16
-
17
-    export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
18
-
19
-    export const SlowBuffer: {
20
-        /** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
21
-        new(size: number): Buffer;
22
-        prototype: Buffer;
23
-    };
24
-
25
-    export { BuffType as Buffer };
26
-}
... ...
@@ -1,513 +0,0 @@
1
-declare module 'node:child_process' {
2
-    export * from 'child_process';
3
-}
4
-
5
-declare module 'child_process' {
6
-    import { BaseEncodingOptions } from 'node:fs';
7
-    import * as events from 'node:events';
8
-    import * as net from 'node:net';
9
-    import { Writable, Readable, Stream, Pipe } from 'node:stream';
10
-
11
-    type Serializable = string | object | number | boolean;
12
-    type SendHandle = net.Socket | net.Server;
13
-
14
-    interface ChildProcess extends events.EventEmitter {
15
-        stdin: Writable | null;
16
-        stdout: Readable | null;
17
-        stderr: Readable | null;
18
-        readonly channel?: Pipe | null;
19
-        readonly stdio: [
20
-            Writable | null, // stdin
21
-            Readable | null, // stdout
22
-            Readable | null, // stderr
23
-            Readable | Writable | null | undefined, // extra
24
-            Readable | Writable | null | undefined // extra
25
-        ];
26
-        readonly killed: boolean;
27
-        readonly pid: number;
28
-        readonly connected: boolean;
29
-        readonly exitCode: number | null;
30
-        readonly signalCode: NodeJS.Signals | null;
31
-        readonly spawnargs: string[];
32
-        readonly spawnfile: string;
33
-        kill(signal?: NodeJS.Signals | number): boolean;
34
-        send(message: Serializable, callback?: (error: Error | null) => void): boolean;
35
-        send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
36
-        send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
37
-        disconnect(): void;
38
-        unref(): void;
39
-        ref(): void;
40
-
41
-        /**
42
-         * events.EventEmitter
43
-         * 1. close
44
-         * 2. disconnect
45
-         * 3. error
46
-         * 4. exit
47
-         * 5. message
48
-         */
49
-
50
-        addListener(event: string, listener: (...args: any[]) => void): this;
51
-        addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
52
-        addListener(event: "disconnect", listener: () => void): this;
53
-        addListener(event: "error", listener: (err: Error) => void): this;
54
-        addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
55
-        addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
56
-
57
-        emit(event: string | symbol, ...args: any[]): boolean;
58
-        emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
59
-        emit(event: "disconnect"): boolean;
60
-        emit(event: "error", err: Error): boolean;
61
-        emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
62
-        emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
63
-
64
-        on(event: string, listener: (...args: any[]) => void): this;
65
-        on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
66
-        on(event: "disconnect", listener: () => void): this;
67
-        on(event: "error", listener: (err: Error) => void): this;
68
-        on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
69
-        on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
70
-
71
-        once(event: string, listener: (...args: any[]) => void): this;
72
-        once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
73
-        once(event: "disconnect", listener: () => void): this;
74
-        once(event: "error", listener: (err: Error) => void): this;
75
-        once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
76
-        once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
77
-
78
-        prependListener(event: string, listener: (...args: any[]) => void): this;
79
-        prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
80
-        prependListener(event: "disconnect", listener: () => void): this;
81
-        prependListener(event: "error", listener: (err: Error) => void): this;
82
-        prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
83
-        prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
84
-
85
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
86
-        prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
87
-        prependOnceListener(event: "disconnect", listener: () => void): this;
88
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
89
-        prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
90
-        prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
91
-    }
92
-
93
-    // return this object when stdio option is undefined or not specified
94
-    interface ChildProcessWithoutNullStreams extends ChildProcess {
95
-        stdin: Writable;
96
-        stdout: Readable;
97
-        stderr: Readable;
98
-        readonly stdio: [
99
-            Writable, // stdin
100
-            Readable, // stdout
101
-            Readable, // stderr
102
-            Readable | Writable | null | undefined, // extra, no modification
103
-            Readable | Writable | null | undefined // extra, no modification
104
-        ];
105
-    }
106
-
107
-    // return this object when stdio option is a tuple of 3
108
-    interface ChildProcessByStdio<
109
-        I extends null | Writable,
110
-        O extends null | Readable,
111
-        E extends null | Readable,
112
-    > extends ChildProcess {
113
-        stdin: I;
114
-        stdout: O;
115
-        stderr: E;
116
-        readonly stdio: [
117
-            I,
118
-            O,
119
-            E,
120
-            Readable | Writable | null | undefined, // extra, no modification
121
-            Readable | Writable | null | undefined // extra, no modification
122
-        ];
123
-    }
124
-
125
-    interface MessageOptions {
126
-        keepOpen?: boolean;
127
-    }
128
-
129
-    type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
130
-
131
-    type SerializationType = 'json' | 'advanced';
132
-
133
-    interface MessagingOptions {
134
-        /**
135
-         * Specify the kind of serialization used for sending messages between processes.
136
-         * @default 'json'
137
-         */
138
-        serialization?: SerializationType;
139
-    }
140
-
141
-    interface ProcessEnvOptions {
142
-        uid?: number;
143
-        gid?: number;
144
-        cwd?: string;
145
-        env?: NodeJS.ProcessEnv;
146
-    }
147
-
148
-    interface CommonOptions extends ProcessEnvOptions {
149
-        /**
150
-         * @default true
151
-         */
152
-        windowsHide?: boolean;
153
-        /**
154
-         * @default 0
155
-         */
156
-        timeout?: number;
157
-    }
158
-
159
-    interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
160
-        argv0?: string;
161
-        stdio?: StdioOptions;
162
-        shell?: boolean | string;
163
-        windowsVerbatimArguments?: boolean;
164
-    }
165
-
166
-    interface SpawnOptions extends CommonSpawnOptions {
167
-        detached?: boolean;
168
-    }
169
-
170
-    interface SpawnOptionsWithoutStdio extends SpawnOptions {
171
-        stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
172
-    }
173
-
174
-    type StdioNull = 'inherit' | 'ignore' | Stream;
175
-    type StdioPipe = undefined | null | 'pipe';
176
-
177
-    interface SpawnOptionsWithStdioTuple<
178
-        Stdin extends StdioNull | StdioPipe,
179
-        Stdout extends StdioNull | StdioPipe,
180
-        Stderr extends StdioNull | StdioPipe,
181
-    > extends SpawnOptions {
182
-        stdio: [Stdin, Stdout, Stderr];
183
-    }
184
-
185
-    // overloads of spawn without 'args'
186
-    function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
187
-
188
-    function spawn(
189
-        command: string,
190
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
191
-    ): ChildProcessByStdio<Writable, Readable, Readable>;
192
-    function spawn(
193
-        command: string,
194
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
195
-    ): ChildProcessByStdio<Writable, Readable, null>;
196
-    function spawn(
197
-        command: string,
198
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
199
-    ): ChildProcessByStdio<Writable, null, Readable>;
200
-    function spawn(
201
-        command: string,
202
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
203
-    ): ChildProcessByStdio<null, Readable, Readable>;
204
-    function spawn(
205
-        command: string,
206
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
207
-    ): ChildProcessByStdio<Writable, null, null>;
208
-    function spawn(
209
-        command: string,
210
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
211
-    ): ChildProcessByStdio<null, Readable, null>;
212
-    function spawn(
213
-        command: string,
214
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
215
-    ): ChildProcessByStdio<null, null, Readable>;
216
-    function spawn(
217
-        command: string,
218
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
219
-    ): ChildProcessByStdio<null, null, null>;
220
-
221
-    function spawn(command: string, options: SpawnOptions): ChildProcess;
222
-
223
-    // overloads of spawn with 'args'
224
-    function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
225
-
226
-    function spawn(
227
-        command: string,
228
-        args: ReadonlyArray<string>,
229
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
230
-    ): ChildProcessByStdio<Writable, Readable, Readable>;
231
-    function spawn(
232
-        command: string,
233
-        args: ReadonlyArray<string>,
234
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
235
-    ): ChildProcessByStdio<Writable, Readable, null>;
236
-    function spawn(
237
-        command: string,
238
-        args: ReadonlyArray<string>,
239
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
240
-    ): ChildProcessByStdio<Writable, null, Readable>;
241
-    function spawn(
242
-        command: string,
243
-        args: ReadonlyArray<string>,
244
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
245
-    ): ChildProcessByStdio<null, Readable, Readable>;
246
-    function spawn(
247
-        command: string,
248
-        args: ReadonlyArray<string>,
249
-        options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
250
-    ): ChildProcessByStdio<Writable, null, null>;
251
-    function spawn(
252
-        command: string,
253
-        args: ReadonlyArray<string>,
254
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
255
-    ): ChildProcessByStdio<null, Readable, null>;
256
-    function spawn(
257
-        command: string,
258
-        args: ReadonlyArray<string>,
259
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
260
-    ): ChildProcessByStdio<null, null, Readable>;
261
-    function spawn(
262
-        command: string,
263
-        args: ReadonlyArray<string>,
264
-        options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
265
-    ): ChildProcessByStdio<null, null, null>;
266
-
267
-    function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
268
-
269
-    interface ExecOptions extends CommonOptions {
270
-        shell?: string;
271
-        maxBuffer?: number;
272
-        killSignal?: NodeJS.Signals | number;
273
-    }
274
-
275
-    interface ExecOptionsWithStringEncoding extends ExecOptions {
276
-        encoding: BufferEncoding;
277
-    }
278
-
279
-    interface ExecOptionsWithBufferEncoding extends ExecOptions {
280
-        encoding: BufferEncoding | null; // specify `null`.
281
-    }
282
-
283
-    interface ExecException extends Error {
284
-        cmd?: string;
285
-        killed?: boolean;
286
-        code?: number;
287
-        signal?: NodeJS.Signals;
288
-    }
289
-
290
-    // no `options` definitely means stdout/stderr are `string`.
291
-    function exec(command: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
292
-
293
-    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
294
-    function exec(command: string, options: { encoding: "buffer" | null } & ExecOptions, callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
295
-
296
-    // `options` with well known `encoding` means stdout/stderr are definitely `string`.
297
-    function exec(command: string, options: { encoding: BufferEncoding } & ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
298
-
299
-    // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
300
-    // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
301
-    function exec(
302
-        command: string,
303
-        options: { encoding: BufferEncoding } & ExecOptions,
304
-        callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
305
-    ): ChildProcess;
306
-
307
-    // `options` without an `encoding` means stdout/stderr are definitely `string`.
308
-    function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
309
-
310
-    // fallback if nothing else matches. Worst case is always `string | Buffer`.
311
-    function exec(
312
-        command: string,
313
-        options: (BaseEncodingOptions & ExecOptions) | undefined | null,
314
-        callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
315
-    ): ChildProcess;
316
-
317
-    interface PromiseWithChild<T> extends Promise<T> {
318
-        child: ChildProcess;
319
-    }
320
-
321
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
322
-    namespace exec {
323
-        function __promisify__(command: string): PromiseWithChild<{ stdout: string, stderr: string }>;
324
-        function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
325
-        function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
326
-        function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
327
-        function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
328
-    }
329
-
330
-    interface ExecFileOptions extends CommonOptions {
331
-        maxBuffer?: number;
332
-        killSignal?: NodeJS.Signals | number;
333
-        windowsVerbatimArguments?: boolean;
334
-        shell?: boolean | string;
335
-    }
336
-    interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
337
-        encoding: BufferEncoding;
338
-    }
339
-    interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
340
-        encoding: 'buffer' | null;
341
-    }
342
-    interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
343
-        encoding: BufferEncoding;
344
-    }
345
-
346
-    function execFile(file: string): ChildProcess;
347
-    function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
348
-    function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
349
-    function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
350
-
351
-    // no `options` definitely means stdout/stderr are `string`.
352
-    function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
353
-    function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
354
-
355
-    // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
356
-    function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
357
-    function execFile(
358
-        file: string,
359
-        args: ReadonlyArray<string> | undefined | null,
360
-        options: ExecFileOptionsWithBufferEncoding,
361
-        callback: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
362
-    ): ChildProcess;
363
-
364
-    // `options` with well known `encoding` means stdout/stderr are definitely `string`.
365
-    function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
366
-    function execFile(
367
-        file: string,
368
-        args: ReadonlyArray<string> | undefined | null,
369
-        options: ExecFileOptionsWithStringEncoding,
370
-        callback: (error: ExecException | null, stdout: string, stderr: string) => void,
371
-    ): ChildProcess;
372
-
373
-    // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
374
-    // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
375
-    function execFile(
376
-        file: string,
377
-        options: ExecFileOptionsWithOtherEncoding,
378
-        callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
379
-    ): ChildProcess;
380
-    function execFile(
381
-        file: string,
382
-        args: ReadonlyArray<string> | undefined | null,
383
-        options: ExecFileOptionsWithOtherEncoding,
384
-        callback: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
385
-    ): ChildProcess;
386
-
387
-    // `options` without an `encoding` means stdout/stderr are definitely `string`.
388
-    function execFile(file: string, options: ExecFileOptions, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
389
-    function execFile(
390
-        file: string,
391
-        args: ReadonlyArray<string> | undefined | null,
392
-        options: ExecFileOptions,
393
-        callback: (error: ExecException | null, stdout: string, stderr: string) => void
394
-    ): ChildProcess;
395
-
396
-    // fallback if nothing else matches. Worst case is always `string | Buffer`.
397
-    function execFile(
398
-        file: string,
399
-        options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
400
-        callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
401
-    ): ChildProcess;
402
-    function execFile(
403
-        file: string,
404
-        args: ReadonlyArray<string> | undefined | null,
405
-        options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
406
-        callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
407
-    ): ChildProcess;
408
-
409
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
410
-    namespace execFile {
411
-        function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
412
-        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
413
-        function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
414
-        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
415
-        function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
416
-        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
417
-        function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
418
-        function __promisify__(
419
-            file: string,
420
-            args: ReadonlyArray<string> | undefined | null,
421
-            options: ExecFileOptionsWithOtherEncoding,
422
-        ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
423
-        function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
424
-        function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
425
-        function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
426
-        function __promisify__(
427
-            file: string,
428
-            args: ReadonlyArray<string> | undefined | null,
429
-            options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
430
-        ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
431
-    }
432
-
433
-    interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
434
-        execPath?: string;
435
-        execArgv?: string[];
436
-        silent?: boolean;
437
-        stdio?: StdioOptions;
438
-        detached?: boolean;
439
-        windowsVerbatimArguments?: boolean;
440
-    }
441
-    function fork(modulePath: string, options?: ForkOptions): ChildProcess;
442
-    function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
443
-
444
-    interface SpawnSyncOptions extends CommonSpawnOptions {
445
-        input?: string | NodeJS.ArrayBufferView;
446
-        killSignal?: NodeJS.Signals | number;
447
-        maxBuffer?: number;
448
-        encoding?: BufferEncoding | 'buffer' | null;
449
-    }
450
-    interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
451
-        encoding: BufferEncoding;
452
-    }
453
-    interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
454
-        encoding?: 'buffer' | null;
455
-    }
456
-    interface SpawnSyncReturns<T> {
457
-        pid: number;
458
-        output: string[];
459
-        stdout: T;
460
-        stderr: T;
461
-        status: number | null;
462
-        signal: NodeJS.Signals | null;
463
-        error?: Error;
464
-    }
465
-    function spawnSync(command: string): SpawnSyncReturns<Buffer>;
466
-    function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
467
-    function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
468
-    function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
469
-    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
470
-    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
471
-    function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
472
-
473
-    interface ExecSyncOptions extends CommonOptions {
474
-        input?: string | Uint8Array;
475
-        stdio?: StdioOptions;
476
-        shell?: string;
477
-        killSignal?: NodeJS.Signals | number;
478
-        maxBuffer?: number;
479
-        encoding?: BufferEncoding | 'buffer' | null;
480
-    }
481
-    interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
482
-        encoding: BufferEncoding;
483
-    }
484
-    interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
485
-        encoding?: 'buffer' | null;
486
-    }
487
-    function execSync(command: string): Buffer;
488
-    function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
489
-    function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
490
-    function execSync(command: string, options?: ExecSyncOptions): Buffer;
491
-
492
-    interface ExecFileSyncOptions extends CommonOptions {
493
-        input?: string | NodeJS.ArrayBufferView;
494
-        stdio?: StdioOptions;
495
-        killSignal?: NodeJS.Signals | number;
496
-        maxBuffer?: number;
497
-        encoding?: BufferEncoding;
498
-        shell?: boolean | string;
499
-    }
500
-    interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
501
-        encoding: BufferEncoding;
502
-    }
503
-    interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
504
-        encoding: BufferEncoding; // specify `null`.
505
-    }
506
-    function execFileSync(command: string): Buffer;
507
-    function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
508
-    function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
509
-    function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
510
-    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
511
-    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
512
-    function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
513
-}
... ...
@@ -1,266 +0,0 @@
1
-declare module 'node:cluster' {
2
-    export * from 'cluster';
3
-}
4
-
5
-declare module 'cluster' {
6
-    import * as child from 'node:child_process';
7
-    import EventEmitter = require('node:events');
8
-    import * as net from 'node:net';
9
-
10
-    // interfaces
11
-    interface ClusterSettings {
12
-        execArgv?: string[]; // default: process.execArgv
13
-        exec?: string;
14
-        args?: string[];
15
-        silent?: boolean;
16
-        stdio?: any[];
17
-        uid?: number;
18
-        gid?: number;
19
-        inspectPort?: number | (() => number);
20
-    }
21
-
22
-    interface Address {
23
-        address: string;
24
-        port: number;
25
-        addressType: number | "udp4" | "udp6";  // 4, 6, -1, "udp4", "udp6"
26
-    }
27
-
28
-    class Worker extends EventEmitter {
29
-        id: number;
30
-        process: child.ChildProcess;
31
-        send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
32
-        kill(signal?: string): void;
33
-        destroy(signal?: string): void;
34
-        disconnect(): void;
35
-        isConnected(): boolean;
36
-        isDead(): boolean;
37
-        exitedAfterDisconnect: boolean;
38
-
39
-        /**
40
-         * events.EventEmitter
41
-         *   1. disconnect
42
-         *   2. error
43
-         *   3. exit
44
-         *   4. listening
45
-         *   5. message
46
-         *   6. online
47
-         */
48
-        addListener(event: string, listener: (...args: any[]) => void): this;
49
-        addListener(event: "disconnect", listener: () => void): this;
50
-        addListener(event: "error", listener: (error: Error) => void): this;
51
-        addListener(event: "exit", listener: (code: number, signal: string) => void): this;
52
-        addListener(event: "listening", listener: (address: Address) => void): this;
53
-        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.
54
-        addListener(event: "online", listener: () => void): this;
55
-
56
-        emit(event: string | symbol, ...args: any[]): boolean;
57
-        emit(event: "disconnect"): boolean;
58
-        emit(event: "error", error: Error): boolean;
59
-        emit(event: "exit", code: number, signal: string): boolean;
60
-        emit(event: "listening", address: Address): boolean;
61
-        emit(event: "message", message: any, handle: net.Socket | net.Server): boolean;
62
-        emit(event: "online"): boolean;
63
-
64
-        on(event: string, listener: (...args: any[]) => void): this;
65
-        on(event: "disconnect", listener: () => void): this;
66
-        on(event: "error", listener: (error: Error) => void): this;
67
-        on(event: "exit", listener: (code: number, signal: string) => void): this;
68
-        on(event: "listening", listener: (address: Address) => void): this;
69
-        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.
70
-        on(event: "online", listener: () => void): this;
71
-
72
-        once(event: string, listener: (...args: any[]) => void): this;
73
-        once(event: "disconnect", listener: () => void): this;
74
-        once(event: "error", listener: (error: Error) => void): this;
75
-        once(event: "exit", listener: (code: number, signal: string) => void): this;
76
-        once(event: "listening", listener: (address: Address) => void): this;
77
-        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.
78
-        once(event: "online", listener: () => void): this;
79
-
80
-        prependListener(event: string, listener: (...args: any[]) => void): this;
81
-        prependListener(event: "disconnect", listener: () => void): this;
82
-        prependListener(event: "error", listener: (error: Error) => void): this;
83
-        prependListener(event: "exit", listener: (code: number, signal: string) => void): this;
84
-        prependListener(event: "listening", listener: (address: Address) => void): this;
85
-        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.
86
-        prependListener(event: "online", listener: () => void): this;
87
-
88
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
89
-        prependOnceListener(event: "disconnect", listener: () => void): this;
90
-        prependOnceListener(event: "error", listener: (error: Error) => void): this;
91
-        prependOnceListener(event: "exit", listener: (code: number, signal: string) => void): this;
92
-        prependOnceListener(event: "listening", listener: (address: Address) => void): this;
93
-        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.
94
-        prependOnceListener(event: "online", listener: () => void): this;
95
-    }
96
-
97
-    interface Cluster extends EventEmitter {
98
-        Worker: Worker;
99
-        disconnect(callback?: () => void): void;
100
-        fork(env?: any): Worker;
101
-        isMaster: boolean;
102
-        isWorker: boolean;
103
-        schedulingPolicy: number;
104
-        settings: ClusterSettings;
105
-        setupMaster(settings?: ClusterSettings): void;
106
-        worker?: Worker;
107
-        workers?: NodeJS.Dict<Worker>;
108
-
109
-        readonly SCHED_NONE: number;
110
-        readonly SCHED_RR: number;
111
-
112
-        /**
113
-         * events.EventEmitter
114
-         *   1. disconnect
115
-         *   2. exit
116
-         *   3. fork
117
-         *   4. listening
118
-         *   5. message
119
-         *   6. online
120
-         *   7. setup
121
-         */
122
-        addListener(event: string, listener: (...args: any[]) => void): this;
123
-        addListener(event: "disconnect", listener: (worker: Worker) => void): this;
124
-        addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
125
-        addListener(event: "fork", listener: (worker: Worker) => void): this;
126
-        addListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
127
-        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.
128
-        addListener(event: "online", listener: (worker: Worker) => void): this;
129
-        addListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
130
-
131
-        emit(event: string | symbol, ...args: any[]): boolean;
132
-        emit(event: "disconnect", worker: Worker): boolean;
133
-        emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
134
-        emit(event: "fork", worker: Worker): boolean;
135
-        emit(event: "listening", worker: Worker, address: Address): boolean;
136
-        emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
137
-        emit(event: "online", worker: Worker): boolean;
138
-        emit(event: "setup", settings: ClusterSettings): boolean;
139
-
140
-        on(event: string, listener: (...args: any[]) => void): this;
141
-        on(event: "disconnect", listener: (worker: Worker) => void): this;
142
-        on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
143
-        on(event: "fork", listener: (worker: Worker) => void): this;
144
-        on(event: "listening", listener: (worker: Worker, address: Address) => void): this;
145
-        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.
146
-        on(event: "online", listener: (worker: Worker) => void): this;
147
-        on(event: "setup", listener: (settings: ClusterSettings) => void): this;
148
-
149
-        once(event: string, listener: (...args: any[]) => void): this;
150
-        once(event: "disconnect", listener: (worker: Worker) => void): this;
151
-        once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
152
-        once(event: "fork", listener: (worker: Worker) => void): this;
153
-        once(event: "listening", listener: (worker: Worker, address: Address) => void): this;
154
-        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.
155
-        once(event: "online", listener: (worker: Worker) => void): this;
156
-        once(event: "setup", listener: (settings: ClusterSettings) => void): this;
157
-
158
-        prependListener(event: string, listener: (...args: any[]) => void): this;
159
-        prependListener(event: "disconnect", listener: (worker: Worker) => void): this;
160
-        prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
161
-        prependListener(event: "fork", listener: (worker: Worker) => void): this;
162
-        prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
163
-        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.
164
-        prependListener(event: "online", listener: (worker: Worker) => void): this;
165
-        prependListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
166
-
167
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
168
-        prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): this;
169
-        prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): this;
170
-        prependOnceListener(event: "fork", listener: (worker: Worker) => void): this;
171
-        prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): this;
172
-        // the handle is a net.Socket or net.Server object, or undefined.
173
-        prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): this;
174
-        prependOnceListener(event: "online", listener: (worker: Worker) => void): this;
175
-        prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): this;
176
-    }
177
-
178
-    const SCHED_NONE: number;
179
-    const SCHED_RR: number;
180
-
181
-    function disconnect(callback?: () => void): void;
182
-    function fork(env?: any): Worker;
183
-    const isMaster: boolean;
184
-    const isWorker: boolean;
185
-    let schedulingPolicy: number;
186
-    const settings: ClusterSettings;
187
-    function setupMaster(settings?: ClusterSettings): void;
188
-    const worker: Worker;
189
-    const workers: NodeJS.Dict<Worker>;
190
-
191
-    /**
192
-     * events.EventEmitter
193
-     *   1. disconnect
194
-     *   2. exit
195
-     *   3. fork
196
-     *   4. listening
197
-     *   5. message
198
-     *   6. online
199
-     *   7. setup
200
-     */
201
-    function addListener(event: string, listener: (...args: any[]) => void): Cluster;
202
-    function addListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
203
-    function addListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
204
-    function addListener(event: "fork", listener: (worker: Worker) => void): Cluster;
205
-    function addListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
206
-     // the handle is a net.Socket or net.Server object, or undefined.
207
-    function addListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
208
-    function addListener(event: "online", listener: (worker: Worker) => void): Cluster;
209
-    function addListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
210
-
211
-    function emit(event: string | symbol, ...args: any[]): boolean;
212
-    function emit(event: "disconnect", worker: Worker): boolean;
213
-    function emit(event: "exit", worker: Worker, code: number, signal: string): boolean;
214
-    function emit(event: "fork", worker: Worker): boolean;
215
-    function emit(event: "listening", worker: Worker, address: Address): boolean;
216
-    function emit(event: "message", worker: Worker, message: any, handle: net.Socket | net.Server): boolean;
217
-    function emit(event: "online", worker: Worker): boolean;
218
-    function emit(event: "setup", settings: ClusterSettings): boolean;
219
-
220
-    function on(event: string, listener: (...args: any[]) => void): Cluster;
221
-    function on(event: "disconnect", listener: (worker: Worker) => void): Cluster;
222
-    function on(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
223
-    function on(event: "fork", listener: (worker: Worker) => void): Cluster;
224
-    function on(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
225
-    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.
226
-    function on(event: "online", listener: (worker: Worker) => void): Cluster;
227
-    function on(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
228
-
229
-    function once(event: string, listener: (...args: any[]) => void): Cluster;
230
-    function once(event: "disconnect", listener: (worker: Worker) => void): Cluster;
231
-    function once(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
232
-    function once(event: "fork", listener: (worker: Worker) => void): Cluster;
233
-    function once(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
234
-    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.
235
-    function once(event: "online", listener: (worker: Worker) => void): Cluster;
236
-    function once(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
237
-
238
-    function removeListener(event: string, listener: (...args: any[]) => void): Cluster;
239
-    function removeAllListeners(event?: string): Cluster;
240
-    function setMaxListeners(n: number): Cluster;
241
-    function getMaxListeners(): number;
242
-    function listeners(event: string): Function[];
243
-    function listenerCount(type: string): number;
244
-
245
-    function prependListener(event: string, listener: (...args: any[]) => void): Cluster;
246
-    function prependListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
247
-    function prependListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
248
-    function prependListener(event: "fork", listener: (worker: Worker) => void): Cluster;
249
-    function prependListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
250
-     // the handle is a net.Socket or net.Server object, or undefined.
251
-    function prependListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
252
-    function prependListener(event: "online", listener: (worker: Worker) => void): Cluster;
253
-    function prependListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
254
-
255
-    function prependOnceListener(event: string, listener: (...args: any[]) => void): Cluster;
256
-    function prependOnceListener(event: "disconnect", listener: (worker: Worker) => void): Cluster;
257
-    function prependOnceListener(event: "exit", listener: (worker: Worker, code: number, signal: string) => void): Cluster;
258
-    function prependOnceListener(event: "fork", listener: (worker: Worker) => void): Cluster;
259
-    function prependOnceListener(event: "listening", listener: (worker: Worker, address: Address) => void): Cluster;
260
-     // the handle is a net.Socket or net.Server object, or undefined.
261
-    function prependOnceListener(event: "message", listener: (worker: Worker, message: any, handle: net.Socket | net.Server) => void): Cluster;
262
-    function prependOnceListener(event: "online", listener: (worker: Worker) => void): Cluster;
263
-    function prependOnceListener(event: "setup", listener: (settings: ClusterSettings) => void): Cluster;
264
-
265
-    function eventNames(): string[];
266
-}
... ...
@@ -1,137 +0,0 @@
1
-declare module 'node:console' {
2
-    export = console;
3
-}
4
-
5
-declare module 'console' {
6
-    import { InspectOptions } from 'node:util';
7
-
8
-    global {
9
-        // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
10
-        interface Console {
11
-            Console: NodeJS.ConsoleConstructor;
12
-            /**
13
-             * A simple assertion test that verifies whether `value` is truthy.
14
-             * If it is not, an `AssertionError` is thrown.
15
-             * If provided, the error `message` is formatted using `util.format()` and used as the error message.
16
-             */
17
-            assert(value: any, message?: string, ...optionalParams: any[]): void;
18
-            /**
19
-             * When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
20
-             * When `stdout` is not a TTY, this method does nothing.
21
-             */
22
-            clear(): void;
23
-            /**
24
-             * Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
25
-             */
26
-            count(label?: string): void;
27
-            /**
28
-             * Resets the internal counter specific to `label`.
29
-             */
30
-            countReset(label?: string): void;
31
-            /**
32
-             * The `console.debug()` function is an alias for {@link console.log()}.
33
-             */
34
-            debug(message?: any, ...optionalParams: any[]): void;
35
-            /**
36
-             * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
37
-             * This function bypasses any custom `inspect()` function defined on `obj`.
38
-             */
39
-            dir(obj: any, options?: InspectOptions): void;
40
-            /**
41
-             * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
42
-             */
43
-            dirxml(...data: any[]): void;
44
-            /**
45
-             * Prints to `stderr` with newline.
46
-             */
47
-            error(message?: any, ...optionalParams: any[]): void;
48
-            /**
49
-             * Increases indentation of subsequent lines by two spaces.
50
-             * If one or more `label`s are provided, those are printed first without the additional indentation.
51
-             */
52
-            group(...label: any[]): void;
53
-            /**
54
-             * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
55
-             */
56
-            groupCollapsed(...label: any[]): void;
57
-            /**
58
-             * Decreases indentation of subsequent lines by two spaces.
59
-             */
60
-            groupEnd(): void;
61
-            /**
62
-             * The {@link console.info()} function is an alias for {@link console.log()}.
63
-             */
64
-            info(message?: any, ...optionalParams: any[]): void;
65
-            /**
66
-             * Prints to `stdout` with newline.
67
-             */
68
-            log(message?: any, ...optionalParams: any[]): void;
69
-            /**
70
-             * This method does not display anything unless used in the inspector.
71
-             *  Prints to `stdout` the array `array` formatted as a table.
72
-             */
73
-            table(tabularData: any, properties?: ReadonlyArray<string>): void;
74
-            /**
75
-             * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
76
-             */
77
-            time(label?: string): void;
78
-            /**
79
-             * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
80
-             */
81
-            timeEnd(label?: string): void;
82
-            /**
83
-             * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
84
-             */
85
-            timeLog(label?: string, ...data: any[]): void;
86
-            /**
87
-             * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
88
-             */
89
-            trace(message?: any, ...optionalParams: any[]): void;
90
-            /**
91
-             * The {@link console.warn()} function is an alias for {@link console.error()}.
92
-             */
93
-            warn(message?: any, ...optionalParams: any[]): void;
94
-
95
-            // --- Inspector mode only ---
96
-            /**
97
-             * This method does not display anything unless used in the inspector.
98
-             *  Starts a JavaScript CPU profile with an optional label.
99
-             */
100
-            profile(label?: string): void;
101
-            /**
102
-             * This method does not display anything unless used in the inspector.
103
-             *  Stops the current JavaScript CPU profiling session if one has been started and prints the report to the Profiles panel of the inspector.
104
-             */
105
-            profileEnd(label?: string): void;
106
-            /**
107
-             * This method does not display anything unless used in the inspector.
108
-             *  Adds an event with the label `label` to the Timeline panel of the inspector.
109
-             */
110
-            timeStamp(label?: string): void;
111
-        }
112
-
113
-        var console: Console;
114
-
115
-        namespace NodeJS {
116
-            interface ConsoleConstructorOptions {
117
-                stdout: WritableStream;
118
-                stderr?: WritableStream;
119
-                ignoreErrors?: boolean;
120
-                colorMode?: boolean | 'auto';
121
-                inspectOptions?: InspectOptions;
122
-            }
123
-
124
-            interface ConsoleConstructor {
125
-                prototype: Console;
126
-                new(stdout: WritableStream, stderr?: WritableStream, ignoreErrors?: boolean): Console;
127
-                new(options: ConsoleConstructorOptions): Console;
128
-            }
129
-
130
-            interface Global {
131
-                console: typeof console;
132
-            }
133
-        }
134
-    }
135
-
136
-    export = console;
137
-}
... ...
@@ -1,19 +0,0 @@
1
-/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2
-declare module 'node:constants' {
3
-    import exp = require('constants');
4
-    export = exp;
5
-}
6
-
7
-/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
8
-declare module 'constants' {
9
-    import { constants as osConstants, SignalConstants } from 'node:os';
10
-    import { constants as cryptoConstants } from 'node:crypto';
11
-    import { constants as fsConstants } from 'node:fs';
12
-
13
-    const exp: typeof osConstants.errno &
14
-        typeof osConstants.priority &
15
-        SignalConstants &
16
-        typeof cryptoConstants &
17
-        typeof fsConstants;
18
-    export = exp;
19
-}
... ...
@@ -1,1176 +0,0 @@
1
-declare module 'node:crypto' {
2
-    export * from 'crypto';
3
-}
4
-
5
-declare module 'crypto' {
6
-    import * as stream from 'node:stream';
7
-
8
-    interface Certificate {
9
-        /**
10
-         * @param spkac
11
-         * @returns The challenge component of the `spkac` data structure,
12
-         * which includes a public key and a challenge.
13
-         */
14
-        exportChallenge(spkac: BinaryLike): Buffer;
15
-        /**
16
-         * @param spkac
17
-         * @param encoding The encoding of the spkac string.
18
-         * @returns The public key component of the `spkac` data structure,
19
-         * which includes a public key and a challenge.
20
-         */
21
-        exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
22
-        /**
23
-         * @param spkac
24
-         * @returns `true` if the given `spkac` data structure is valid,
25
-         * `false` otherwise.
26
-         */
27
-        verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
28
-    }
29
-    const Certificate: Certificate & {
30
-        /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
31
-        new (): Certificate;
32
-        /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
33
-        (): Certificate;
34
-    };
35
-
36
-    namespace constants {
37
-        // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
38
-        const OPENSSL_VERSION_NUMBER: number;
39
-
40
-        /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
41
-        const SSL_OP_ALL: number;
42
-        /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
43
-        const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
44
-        /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
45
-        const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
46
-        /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
47
-        const SSL_OP_CISCO_ANYCONNECT: number;
48
-        /** Instructs OpenSSL to turn on cookie exchange. */
49
-        const SSL_OP_COOKIE_EXCHANGE: number;
50
-        /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
51
-        const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
52
-        /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
53
-        const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
54
-        /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
55
-        const SSL_OP_EPHEMERAL_RSA: number;
56
-        /** Allows initial connection to servers that do not support RI. */
57
-        const SSL_OP_LEGACY_SERVER_CONNECT: number;
58
-        const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
59
-        const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
60
-        /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
61
-        const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
62
-        const SSL_OP_NETSCAPE_CA_DN_BUG: number;
63
-        const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
64
-        const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
65
-        const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
66
-        /** Instructs OpenSSL to disable support for SSL/TLS compression. */
67
-        const SSL_OP_NO_COMPRESSION: number;
68
-        const SSL_OP_NO_QUERY_MTU: number;
69
-        /** Instructs OpenSSL to always start a new session when performing renegotiation. */
70
-        const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
71
-        const SSL_OP_NO_SSLv2: number;
72
-        const SSL_OP_NO_SSLv3: number;
73
-        const SSL_OP_NO_TICKET: number;
74
-        const SSL_OP_NO_TLSv1: number;
75
-        const SSL_OP_NO_TLSv1_1: number;
76
-        const SSL_OP_NO_TLSv1_2: number;
77
-        const SSL_OP_PKCS1_CHECK_1: number;
78
-        const SSL_OP_PKCS1_CHECK_2: number;
79
-        /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
80
-        const SSL_OP_SINGLE_DH_USE: number;
81
-        /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
82
-        const SSL_OP_SINGLE_ECDH_USE: number;
83
-        const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
84
-        const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
85
-        const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
86
-        const SSL_OP_TLS_D5_BUG: number;
87
-        /** Instructs OpenSSL to disable version rollback attack detection. */
88
-        const SSL_OP_TLS_ROLLBACK_BUG: number;
89
-
90
-        const ENGINE_METHOD_RSA: number;
91
-        const ENGINE_METHOD_DSA: number;
92
-        const ENGINE_METHOD_DH: number;
93
-        const ENGINE_METHOD_RAND: number;
94
-        const ENGINE_METHOD_EC: number;
95
-        const ENGINE_METHOD_CIPHERS: number;
96
-        const ENGINE_METHOD_DIGESTS: number;
97
-        const ENGINE_METHOD_PKEY_METHS: number;
98
-        const ENGINE_METHOD_PKEY_ASN1_METHS: number;
99
-        const ENGINE_METHOD_ALL: number;
100
-        const ENGINE_METHOD_NONE: number;
101
-
102
-        const DH_CHECK_P_NOT_SAFE_PRIME: number;
103
-        const DH_CHECK_P_NOT_PRIME: number;
104
-        const DH_UNABLE_TO_CHECK_GENERATOR: number;
105
-        const DH_NOT_SUITABLE_GENERATOR: number;
106
-
107
-        const ALPN_ENABLED: number;
108
-
109
-        const RSA_PKCS1_PADDING: number;
110
-        const RSA_SSLV23_PADDING: number;
111
-        const RSA_NO_PADDING: number;
112
-        const RSA_PKCS1_OAEP_PADDING: number;
113
-        const RSA_X931_PADDING: number;
114
-        const RSA_PKCS1_PSS_PADDING: number;
115
-        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
116
-        const RSA_PSS_SALTLEN_DIGEST: number;
117
-        /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
118
-        const RSA_PSS_SALTLEN_MAX_SIGN: number;
119
-        /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
120
-        const RSA_PSS_SALTLEN_AUTO: number;
121
-
122
-        const POINT_CONVERSION_COMPRESSED: number;
123
-        const POINT_CONVERSION_UNCOMPRESSED: number;
124
-        const POINT_CONVERSION_HYBRID: number;
125
-
126
-        /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
127
-        const defaultCoreCipherList: string;
128
-        /** Specifies the active default cipher list used by the current Node.js process  (colon-separated values). */
129
-        const defaultCipherList: string;
130
-    }
131
-
132
-    interface HashOptions extends stream.TransformOptions {
133
-        /**
134
-         * For XOF hash functions such as `shake256`, the
135
-         * outputLength option can be used to specify the desired output length in bytes.
136
-         */
137
-        outputLength?: number;
138
-    }
139
-
140
-    /** @deprecated since v10.0.0 */
141
-    const fips: boolean;
142
-
143
-    function createHash(algorithm: string, options?: HashOptions): Hash;
144
-    function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
145
-
146
-    // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
147
-    type BinaryToTextEncoding = 'base64' | 'hex';
148
-    type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
149
-    type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
150
-
151
-    type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
152
-
153
-    type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
154
-
155
-    class Hash extends stream.Transform {
156
-        private constructor();
157
-        copy(): Hash;
158
-        update(data: BinaryLike): Hash;
159
-        update(data: string, input_encoding: Encoding): Hash;
160
-        digest(): Buffer;
161
-        digest(encoding: BinaryToTextEncoding): string;
162
-    }
163
-    class Hmac extends stream.Transform {
164
-        private constructor();
165
-        update(data: BinaryLike): Hmac;
166
-        update(data: string, input_encoding: Encoding): Hmac;
167
-        digest(): Buffer;
168
-        digest(encoding: BinaryToTextEncoding): string;
169
-    }
170
-
171
-    type KeyObjectType = 'secret' | 'public' | 'private';
172
-
173
-    interface KeyExportOptions<T extends KeyFormat> {
174
-        type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
175
-        format: T;
176
-        cipher?: string;
177
-        passphrase?: string | Buffer;
178
-    }
179
-
180
-    class KeyObject {
181
-        private constructor();
182
-        asymmetricKeyType?: KeyType;
183
-        /**
184
-         * For asymmetric keys, this property represents the size of the embedded key in
185
-         * bytes. This property is `undefined` for symmetric keys.
186
-         */
187
-        asymmetricKeySize?: number;
188
-        export(options: KeyExportOptions<'pem'>): string | Buffer;
189
-        export(options?: KeyExportOptions<'der'>): Buffer;
190
-        symmetricKeySize?: number;
191
-        type: KeyObjectType;
192
-    }
193
-
194
-    type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
195
-    type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
196
-
197
-    type BinaryLike = string | NodeJS.ArrayBufferView;
198
-
199
-    type CipherKey = BinaryLike | KeyObject;
200
-
201
-    interface CipherCCMOptions extends stream.TransformOptions {
202
-        authTagLength: number;
203
-    }
204
-    interface CipherGCMOptions extends stream.TransformOptions {
205
-        authTagLength?: number;
206
-    }
207
-    /** @deprecated since v10.0.0 use `createCipheriv()` */
208
-    function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
209
-    /** @deprecated since v10.0.0 use `createCipheriv()` */
210
-    function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
211
-    /** @deprecated since v10.0.0 use `createCipheriv()` */
212
-    function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
213
-
214
-    function createCipheriv(
215
-        algorithm: CipherCCMTypes,
216
-        key: CipherKey,
217
-        iv: BinaryLike | null,
218
-        options: CipherCCMOptions,
219
-    ): CipherCCM;
220
-    function createCipheriv(
221
-        algorithm: CipherGCMTypes,
222
-        key: CipherKey,
223
-        iv: BinaryLike | null,
224
-        options?: CipherGCMOptions,
225
-    ): CipherGCM;
226
-    function createCipheriv(
227
-        algorithm: string,
228
-        key: CipherKey,
229
-        iv: BinaryLike | null,
230
-        options?: stream.TransformOptions,
231
-    ): Cipher;
232
-
233
-    class Cipher extends stream.Transform {
234
-        private constructor();
235
-        update(data: BinaryLike): Buffer;
236
-        update(data: string, input_encoding: Encoding): Buffer;
237
-        update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: BinaryToTextEncoding): string;
238
-        update(data: string, input_encoding: Encoding | undefined, output_encoding: BinaryToTextEncoding): string;
239
-        final(): Buffer;
240
-        final(output_encoding: BufferEncoding): string;
241
-        setAutoPadding(auto_padding?: boolean): this;
242
-        // getAuthTag(): Buffer;
243
-        // setAAD(buffer: NodeJS.ArrayBufferView): this;
244
-    }
245
-    interface CipherCCM extends Cipher {
246
-        setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
247
-        getAuthTag(): Buffer;
248
-    }
249
-    interface CipherGCM extends Cipher {
250
-        setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
251
-        getAuthTag(): Buffer;
252
-    }
253
-    /** @deprecated since v10.0.0 use `createDecipheriv()` */
254
-    function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
255
-    /** @deprecated since v10.0.0 use `createDecipheriv()` */
256
-    function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
257
-    /** @deprecated since v10.0.0 use `createDecipheriv()` */
258
-    function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
259
-
260
-    function createDecipheriv(
261
-        algorithm: CipherCCMTypes,
262
-        key: CipherKey,
263
-        iv: BinaryLike | null,
264
-        options: CipherCCMOptions,
265
-    ): DecipherCCM;
266
-    function createDecipheriv(
267
-        algorithm: CipherGCMTypes,
268
-        key: CipherKey,
269
-        iv: BinaryLike | null,
270
-        options?: CipherGCMOptions,
271
-    ): DecipherGCM;
272
-    function createDecipheriv(
273
-        algorithm: string,
274
-        key: CipherKey,
275
-        iv: BinaryLike | null,
276
-        options?: stream.TransformOptions,
277
-    ): Decipher;
278
-
279
-    class Decipher extends stream.Transform {
280
-        private constructor();
281
-        update(data: NodeJS.ArrayBufferView): Buffer;
282
-        update(data: string, input_encoding: BinaryToTextEncoding): Buffer;
283
-        update(data: NodeJS.ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string;
284
-        update(data: string, input_encoding: BinaryToTextEncoding | undefined, output_encoding: Encoding): string;
285
-        final(): Buffer;
286
-        final(output_encoding: BufferEncoding): string;
287
-        setAutoPadding(auto_padding?: boolean): this;
288
-        // setAuthTag(tag: NodeJS.ArrayBufferView): this;
289
-        // setAAD(buffer: NodeJS.ArrayBufferView): this;
290
-    }
291
-    interface DecipherCCM extends Decipher {
292
-        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
293
-        setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
294
-    }
295
-    interface DecipherGCM extends Decipher {
296
-        setAuthTag(buffer: NodeJS.ArrayBufferView): this;
297
-        setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
298
-    }
299
-
300
-    interface PrivateKeyInput {
301
-        key: string | Buffer;
302
-        format?: KeyFormat;
303
-        type?: 'pkcs1' | 'pkcs8' | 'sec1';
304
-        passphrase?: string | Buffer;
305
-    }
306
-
307
-    interface PublicKeyInput {
308
-        key: string | Buffer;
309
-        format?: KeyFormat;
310
-        type?: 'pkcs1' | 'spki';
311
-    }
312
-
313
-    function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
314
-    function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
315
-    function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
316
-
317
-    function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
318
-
319
-    type DSAEncoding = 'der' | 'ieee-p1363';
320
-
321
-    interface SigningOptions {
322
-        /**
323
-         * @See crypto.constants.RSA_PKCS1_PADDING
324
-         */
325
-        padding?: number;
326
-        saltLength?: number;
327
-        dsaEncoding?: DSAEncoding;
328
-    }
329
-
330
-    interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
331
-    interface SignKeyObjectInput extends SigningOptions {
332
-        key: KeyObject;
333
-    }
334
-    interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {}
335
-    interface VerifyKeyObjectInput extends SigningOptions {
336
-        key: KeyObject;
337
-    }
338
-
339
-    type KeyLike = string | Buffer | KeyObject;
340
-
341
-    class Signer extends stream.Writable {
342
-        private constructor();
343
-
344
-        update(data: BinaryLike): Signer;
345
-        update(data: string, input_encoding: Encoding): Signer;
346
-        sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
347
-        sign(
348
-            private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
349
-            output_format: BinaryToTextEncoding,
350
-        ): string;
351
-    }
352
-
353
-    function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
354
-    class Verify extends stream.Writable {
355
-        private constructor();
356
-
357
-        update(data: BinaryLike): Verify;
358
-        update(data: string, input_encoding: Encoding): Verify;
359
-        verify(
360
-            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
361
-            signature: NodeJS.ArrayBufferView,
362
-        ): boolean;
363
-        verify(
364
-            object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
365
-            signature: string,
366
-            signature_format?: BinaryToTextEncoding,
367
-        ): boolean;
368
-        // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
369
-        // The signature field accepts a TypedArray type, but it is only available starting ES2017
370
-    }
371
-    function createDiffieHellman(prime_length: number, generator?: number | NodeJS.ArrayBufferView): DiffieHellman;
372
-    function createDiffieHellman(prime: NodeJS.ArrayBufferView): DiffieHellman;
373
-    function createDiffieHellman(prime: string, prime_encoding: BinaryToTextEncoding): DiffieHellman;
374
-    function createDiffieHellman(
375
-        prime: string,
376
-        prime_encoding: BinaryToTextEncoding,
377
-        generator: number | NodeJS.ArrayBufferView,
378
-    ): DiffieHellman;
379
-    function createDiffieHellman(
380
-        prime: string,
381
-        prime_encoding: BinaryToTextEncoding,
382
-        generator: string,
383
-        generator_encoding: BinaryToTextEncoding,
384
-    ): DiffieHellman;
385
-    class DiffieHellman {
386
-        private constructor();
387
-        generateKeys(): Buffer;
388
-        generateKeys(encoding: BinaryToTextEncoding): string;
389
-        computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
390
-        computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
391
-        computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
392
-        computeSecret(
393
-            other_public_key: string,
394
-            input_encoding: BinaryToTextEncoding,
395
-            output_encoding: BinaryToTextEncoding,
396
-        ): string;
397
-        getPrime(): Buffer;
398
-        getPrime(encoding: BinaryToTextEncoding): string;
399
-        getGenerator(): Buffer;
400
-        getGenerator(encoding: BinaryToTextEncoding): string;
401
-        getPublicKey(): Buffer;
402
-        getPublicKey(encoding: BinaryToTextEncoding): string;
403
-        getPrivateKey(): Buffer;
404
-        getPrivateKey(encoding: BinaryToTextEncoding): string;
405
-        setPublicKey(public_key: NodeJS.ArrayBufferView): void;
406
-        setPublicKey(public_key: string, encoding: BufferEncoding): void;
407
-        setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
408
-        setPrivateKey(private_key: string, encoding: BufferEncoding): void;
409
-        verifyError: number;
410
-    }
411
-    function getDiffieHellman(group_name: string): DiffieHellman;
412
-    function pbkdf2(
413
-        password: BinaryLike,
414
-        salt: BinaryLike,
415
-        iterations: number,
416
-        keylen: number,
417
-        digest: string,
418
-        callback: (err: Error | null, derivedKey: Buffer) => any,
419
-    ): void;
420
-    function pbkdf2Sync(
421
-        password: BinaryLike,
422
-        salt: BinaryLike,
423
-        iterations: number,
424
-        keylen: number,
425
-        digest: string,
426
-    ): Buffer;
427
-
428
-    function randomBytes(size: number): Buffer;
429
-    function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
430
-    function pseudoRandomBytes(size: number): Buffer;
431
-    function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
432
-
433
-    function randomInt(max: number): number;
434
-    function randomInt(min: number, max: number): number;
435
-    function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
436
-    function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
437
-
438
-    function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
439
-    function randomFill<T extends NodeJS.ArrayBufferView>(
440
-        buffer: T,
441
-        callback: (err: Error | null, buf: T) => void,
442
-    ): void;
443
-    function randomFill<T extends NodeJS.ArrayBufferView>(
444
-        buffer: T,
445
-        offset: number,
446
-        callback: (err: Error | null, buf: T) => void,
447
-    ): void;
448
-    function randomFill<T extends NodeJS.ArrayBufferView>(
449
-        buffer: T,
450
-        offset: number,
451
-        size: number,
452
-        callback: (err: Error | null, buf: T) => void,
453
-    ): void;
454
-
455
-    interface ScryptOptions {
456
-        cost?: number;
457
-        blockSize?: number;
458
-        parallelization?: number;
459
-        N?: number;
460
-        r?: number;
461
-        p?: number;
462
-        maxmem?: number;
463
-    }
464
-    function scrypt(
465
-        password: BinaryLike,
466
-        salt: BinaryLike,
467
-        keylen: number,
468
-        callback: (err: Error | null, derivedKey: Buffer) => void,
469
-    ): void;
470
-    function scrypt(
471
-        password: BinaryLike,
472
-        salt: BinaryLike,
473
-        keylen: number,
474
-        options: ScryptOptions,
475
-        callback: (err: Error | null, derivedKey: Buffer) => void,
476
-    ): void;
477
-    function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
478
-
479
-    interface RsaPublicKey {
480
-        key: KeyLike;
481
-        padding?: number;
482
-    }
483
-    interface RsaPrivateKey {
484
-        key: KeyLike;
485
-        passphrase?: string;
486
-        /**
487
-         * @default 'sha1'
488
-         */
489
-        oaepHash?: string;
490
-        oaepLabel?: NodeJS.TypedArray;
491
-        padding?: number;
492
-    }
493
-    function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
494
-    function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
495
-    function privateDecrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
496
-    function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
497
-    function getCiphers(): string[];
498
-    function getCurves(): string[];
499
-    function getFips(): 1 | 0;
500
-    function getHashes(): string[];
501
-    class ECDH {
502
-        private constructor();
503
-        static convertKey(
504
-            key: BinaryLike,
505
-            curve: string,
506
-            inputEncoding?: BinaryToTextEncoding,
507
-            outputEncoding?: 'latin1' | 'hex' | 'base64',
508
-            format?: 'uncompressed' | 'compressed' | 'hybrid',
509
-        ): Buffer | string;
510
-        generateKeys(): Buffer;
511
-        generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
512
-        computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
513
-        computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
514
-        computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
515
-        computeSecret(
516
-            other_public_key: string,
517
-            input_encoding: BinaryToTextEncoding,
518
-            output_encoding: BinaryToTextEncoding,
519
-        ): string;
520
-        getPrivateKey(): Buffer;
521
-        getPrivateKey(encoding: BinaryToTextEncoding): string;
522
-        getPublicKey(): Buffer;
523
-        getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
524
-        setPrivateKey(private_key: NodeJS.ArrayBufferView): void;
525
-        setPrivateKey(private_key: string, encoding: BinaryToTextEncoding): void;
526
-    }
527
-    function createECDH(curve_name: string): ECDH;
528
-    function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
529
-    /** @deprecated since v10.0.0 */
530
-    const DEFAULT_ENCODING: BufferEncoding;
531
-
532
-    type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
533
-    type KeyFormat = 'pem' | 'der';
534
-
535
-    interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
536
-        format: T;
537
-        cipher?: string;
538
-        passphrase?: string;
539
-    }
540
-
541
-    interface KeyPairKeyObjectResult {
542
-        publicKey: KeyObject;
543
-        privateKey: KeyObject;
544
-    }
545
-
546
-    interface ED25519KeyPairKeyObjectOptions {
547
-        /**
548
-         * No options.
549
-         */
550
-    }
551
-
552
-    interface ED448KeyPairKeyObjectOptions {
553
-        /**
554
-         * No options.
555
-         */
556
-    }
557
-
558
-    interface X25519KeyPairKeyObjectOptions {
559
-        /**
560
-         * No options.
561
-         */
562
-    }
563
-
564
-    interface X448KeyPairKeyObjectOptions {
565
-        /**
566
-         * No options.
567
-         */
568
-    }
569
-
570
-    interface ECKeyPairKeyObjectOptions {
571
-        /**
572
-         * Name of the curve to use.
573
-         */
574
-        namedCurve: string;
575
-    }
576
-
577
-    interface RSAKeyPairKeyObjectOptions {
578
-        /**
579
-         * Key size in bits
580
-         */
581
-        modulusLength: number;
582
-
583
-        /**
584
-         * @default 0x10001
585
-         */
586
-        publicExponent?: number;
587
-    }
588
-
589
-    interface DSAKeyPairKeyObjectOptions {
590
-        /**
591
-         * Key size in bits
592
-         */
593
-        modulusLength: number;
594
-
595
-        /**
596
-         * Size of q in bits
597
-         */
598
-        divisorLength: number;
599
-    }
600
-
601
-    interface RSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
602
-        /**
603
-         * Key size in bits
604
-         */
605
-        modulusLength: number;
606
-        /**
607
-         * @default 0x10001
608
-         */
609
-        publicExponent?: number;
610
-
611
-        publicKeyEncoding: {
612
-            type: 'pkcs1' | 'spki';
613
-            format: PubF;
614
-        };
615
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
616
-            type: 'pkcs1' | 'pkcs8';
617
-        };
618
-    }
619
-
620
-    interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
621
-        /**
622
-         * Key size in bits
623
-         */
624
-        modulusLength: number;
625
-        /**
626
-         * Size of q in bits
627
-         */
628
-        divisorLength: number;
629
-
630
-        publicKeyEncoding: {
631
-            type: 'spki';
632
-            format: PubF;
633
-        };
634
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
635
-            type: 'pkcs8';
636
-        };
637
-    }
638
-
639
-    interface ECKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
640
-        /**
641
-         * Name of the curve to use.
642
-         */
643
-        namedCurve: string;
644
-
645
-        publicKeyEncoding: {
646
-            type: 'pkcs1' | 'spki';
647
-            format: PubF;
648
-        };
649
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
650
-            type: 'sec1' | 'pkcs8';
651
-        };
652
-    }
653
-
654
-    interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
655
-        publicKeyEncoding: {
656
-            type: 'spki';
657
-            format: PubF;
658
-        };
659
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
660
-            type: 'pkcs8';
661
-        };
662
-    }
663
-
664
-    interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
665
-        publicKeyEncoding: {
666
-            type: 'spki';
667
-            format: PubF;
668
-        };
669
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
670
-            type: 'pkcs8';
671
-        };
672
-    }
673
-
674
-    interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
675
-        publicKeyEncoding: {
676
-            type: 'spki';
677
-            format: PubF;
678
-        };
679
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
680
-            type: 'pkcs8';
681
-        };
682
-    }
683
-
684
-    interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
685
-        publicKeyEncoding: {
686
-            type: 'spki';
687
-            format: PubF;
688
-        };
689
-        privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
690
-            type: 'pkcs8';
691
-        };
692
-    }
693
-
694
-    interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
695
-        publicKey: T1;
696
-        privateKey: T2;
697
-    }
698
-
699
-    function generateKeyPairSync(
700
-        type: 'rsa',
701
-        options: RSAKeyPairOptions<'pem', 'pem'>,
702
-    ): KeyPairSyncResult<string, string>;
703
-    function generateKeyPairSync(
704
-        type: 'rsa',
705
-        options: RSAKeyPairOptions<'pem', 'der'>,
706
-    ): KeyPairSyncResult<string, Buffer>;
707
-    function generateKeyPairSync(
708
-        type: 'rsa',
709
-        options: RSAKeyPairOptions<'der', 'pem'>,
710
-    ): KeyPairSyncResult<Buffer, string>;
711
-    function generateKeyPairSync(
712
-        type: 'rsa',
713
-        options: RSAKeyPairOptions<'der', 'der'>,
714
-    ): KeyPairSyncResult<Buffer, Buffer>;
715
-    function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
716
-
717
-    function generateKeyPairSync(
718
-        type: 'dsa',
719
-        options: DSAKeyPairOptions<'pem', 'pem'>,
720
-    ): KeyPairSyncResult<string, string>;
721
-    function generateKeyPairSync(
722
-        type: 'dsa',
723
-        options: DSAKeyPairOptions<'pem', 'der'>,
724
-    ): KeyPairSyncResult<string, Buffer>;
725
-    function generateKeyPairSync(
726
-        type: 'dsa',
727
-        options: DSAKeyPairOptions<'der', 'pem'>,
728
-    ): KeyPairSyncResult<Buffer, string>;
729
-    function generateKeyPairSync(
730
-        type: 'dsa',
731
-        options: DSAKeyPairOptions<'der', 'der'>,
732
-    ): KeyPairSyncResult<Buffer, Buffer>;
733
-    function generateKeyPairSync(type: 'dsa', options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
734
-
735
-    function generateKeyPairSync(
736
-        type: 'ec',
737
-        options: ECKeyPairOptions<'pem', 'pem'>,
738
-    ): KeyPairSyncResult<string, string>;
739
-    function generateKeyPairSync(
740
-        type: 'ec',
741
-        options: ECKeyPairOptions<'pem', 'der'>,
742
-    ): KeyPairSyncResult<string, Buffer>;
743
-    function generateKeyPairSync(
744
-        type: 'ec',
745
-        options: ECKeyPairOptions<'der', 'pem'>,
746
-    ): KeyPairSyncResult<Buffer, string>;
747
-    function generateKeyPairSync(
748
-        type: 'ec',
749
-        options: ECKeyPairOptions<'der', 'der'>,
750
-    ): KeyPairSyncResult<Buffer, Buffer>;
751
-    function generateKeyPairSync(type: 'ec', options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
752
-
753
-    function generateKeyPairSync(
754
-        type: 'ed25519',
755
-        options: ED25519KeyPairOptions<'pem', 'pem'>,
756
-    ): KeyPairSyncResult<string, string>;
757
-    function generateKeyPairSync(
758
-        type: 'ed25519',
759
-        options: ED25519KeyPairOptions<'pem', 'der'>,
760
-    ): KeyPairSyncResult<string, Buffer>;
761
-    function generateKeyPairSync(
762
-        type: 'ed25519',
763
-        options: ED25519KeyPairOptions<'der', 'pem'>,
764
-    ): KeyPairSyncResult<Buffer, string>;
765
-    function generateKeyPairSync(
766
-        type: 'ed25519',
767
-        options: ED25519KeyPairOptions<'der', 'der'>,
768
-    ): KeyPairSyncResult<Buffer, Buffer>;
769
-    function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
770
-
771
-    function generateKeyPairSync(
772
-        type: 'ed448',
773
-        options: ED448KeyPairOptions<'pem', 'pem'>,
774
-    ): KeyPairSyncResult<string, string>;
775
-    function generateKeyPairSync(
776
-        type: 'ed448',
777
-        options: ED448KeyPairOptions<'pem', 'der'>,
778
-    ): KeyPairSyncResult<string, Buffer>;
779
-    function generateKeyPairSync(
780
-        type: 'ed448',
781
-        options: ED448KeyPairOptions<'der', 'pem'>,
782
-    ): KeyPairSyncResult<Buffer, string>;
783
-    function generateKeyPairSync(
784
-        type: 'ed448',
785
-        options: ED448KeyPairOptions<'der', 'der'>,
786
-    ): KeyPairSyncResult<Buffer, Buffer>;
787
-    function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
788
-
789
-    function generateKeyPairSync(
790
-        type: 'x25519',
791
-        options: X25519KeyPairOptions<'pem', 'pem'>,
792
-    ): KeyPairSyncResult<string, string>;
793
-    function generateKeyPairSync(
794
-        type: 'x25519',
795
-        options: X25519KeyPairOptions<'pem', 'der'>,
796
-    ): KeyPairSyncResult<string, Buffer>;
797
-    function generateKeyPairSync(
798
-        type: 'x25519',
799
-        options: X25519KeyPairOptions<'der', 'pem'>,
800
-    ): KeyPairSyncResult<Buffer, string>;
801
-    function generateKeyPairSync(
802
-        type: 'x25519',
803
-        options: X25519KeyPairOptions<'der', 'der'>,
804
-    ): KeyPairSyncResult<Buffer, Buffer>;
805
-    function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
806
-
807
-    function generateKeyPairSync(
808
-        type: 'x448',
809
-        options: X448KeyPairOptions<'pem', 'pem'>,
810
-    ): KeyPairSyncResult<string, string>;
811
-    function generateKeyPairSync(
812
-        type: 'x448',
813
-        options: X448KeyPairOptions<'pem', 'der'>,
814
-    ): KeyPairSyncResult<string, Buffer>;
815
-    function generateKeyPairSync(
816
-        type: 'x448',
817
-        options: X448KeyPairOptions<'der', 'pem'>,
818
-    ): KeyPairSyncResult<Buffer, string>;
819
-    function generateKeyPairSync(
820
-        type: 'x448',
821
-        options: X448KeyPairOptions<'der', 'der'>,
822
-    ): KeyPairSyncResult<Buffer, Buffer>;
823
-    function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
824
-
825
-    function generateKeyPair(
826
-        type: 'rsa',
827
-        options: RSAKeyPairOptions<'pem', 'pem'>,
828
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
829
-    ): void;
830
-    function generateKeyPair(
831
-        type: 'rsa',
832
-        options: RSAKeyPairOptions<'pem', 'der'>,
833
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
834
-    ): void;
835
-    function generateKeyPair(
836
-        type: 'rsa',
837
-        options: RSAKeyPairOptions<'der', 'pem'>,
838
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
839
-    ): void;
840
-    function generateKeyPair(
841
-        type: 'rsa',
842
-        options: RSAKeyPairOptions<'der', 'der'>,
843
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
844
-    ): void;
845
-    function generateKeyPair(
846
-        type: 'rsa',
847
-        options: RSAKeyPairKeyObjectOptions,
848
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
849
-    ): void;
850
-
851
-    function generateKeyPair(
852
-        type: 'dsa',
853
-        options: DSAKeyPairOptions<'pem', 'pem'>,
854
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
855
-    ): void;
856
-    function generateKeyPair(
857
-        type: 'dsa',
858
-        options: DSAKeyPairOptions<'pem', 'der'>,
859
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
860
-    ): void;
861
-    function generateKeyPair(
862
-        type: 'dsa',
863
-        options: DSAKeyPairOptions<'der', 'pem'>,
864
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
865
-    ): void;
866
-    function generateKeyPair(
867
-        type: 'dsa',
868
-        options: DSAKeyPairOptions<'der', 'der'>,
869
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
870
-    ): void;
871
-    function generateKeyPair(
872
-        type: 'dsa',
873
-        options: DSAKeyPairKeyObjectOptions,
874
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
875
-    ): void;
876
-
877
-    function generateKeyPair(
878
-        type: 'ec',
879
-        options: ECKeyPairOptions<'pem', 'pem'>,
880
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
881
-    ): void;
882
-    function generateKeyPair(
883
-        type: 'ec',
884
-        options: ECKeyPairOptions<'pem', 'der'>,
885
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
886
-    ): void;
887
-    function generateKeyPair(
888
-        type: 'ec',
889
-        options: ECKeyPairOptions<'der', 'pem'>,
890
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
891
-    ): void;
892
-    function generateKeyPair(
893
-        type: 'ec',
894
-        options: ECKeyPairOptions<'der', 'der'>,
895
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
896
-    ): void;
897
-    function generateKeyPair(
898
-        type: 'ec',
899
-        options: ECKeyPairKeyObjectOptions,
900
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
901
-    ): void;
902
-
903
-    function generateKeyPair(
904
-        type: 'ed25519',
905
-        options: ED25519KeyPairOptions<'pem', 'pem'>,
906
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
907
-    ): void;
908
-    function generateKeyPair(
909
-        type: 'ed25519',
910
-        options: ED25519KeyPairOptions<'pem', 'der'>,
911
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
912
-    ): void;
913
-    function generateKeyPair(
914
-        type: 'ed25519',
915
-        options: ED25519KeyPairOptions<'der', 'pem'>,
916
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
917
-    ): void;
918
-    function generateKeyPair(
919
-        type: 'ed25519',
920
-        options: ED25519KeyPairOptions<'der', 'der'>,
921
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
922
-    ): void;
923
-    function generateKeyPair(
924
-        type: 'ed25519',
925
-        options: ED25519KeyPairKeyObjectOptions | undefined,
926
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
927
-    ): void;
928
-
929
-    function generateKeyPair(
930
-        type: 'ed448',
931
-        options: ED448KeyPairOptions<'pem', 'pem'>,
932
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
933
-    ): void;
934
-    function generateKeyPair(
935
-        type: 'ed448',
936
-        options: ED448KeyPairOptions<'pem', 'der'>,
937
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
938
-    ): void;
939
-    function generateKeyPair(
940
-        type: 'ed448',
941
-        options: ED448KeyPairOptions<'der', 'pem'>,
942
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
943
-    ): void;
944
-    function generateKeyPair(
945
-        type: 'ed448',
946
-        options: ED448KeyPairOptions<'der', 'der'>,
947
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
948
-    ): void;
949
-    function generateKeyPair(
950
-        type: 'ed448',
951
-        options: ED448KeyPairKeyObjectOptions | undefined,
952
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
953
-    ): void;
954
-
955
-    function generateKeyPair(
956
-        type: 'x25519',
957
-        options: X25519KeyPairOptions<'pem', 'pem'>,
958
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
959
-    ): void;
960
-    function generateKeyPair(
961
-        type: 'x25519',
962
-        options: X25519KeyPairOptions<'pem', 'der'>,
963
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
964
-    ): void;
965
-    function generateKeyPair(
966
-        type: 'x25519',
967
-        options: X25519KeyPairOptions<'der', 'pem'>,
968
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
969
-    ): void;
970
-    function generateKeyPair(
971
-        type: 'x25519',
972
-        options: X25519KeyPairOptions<'der', 'der'>,
973
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
974
-    ): void;
975
-    function generateKeyPair(
976
-        type: 'x25519',
977
-        options: X25519KeyPairKeyObjectOptions | undefined,
978
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
979
-    ): void;
980
-
981
-    function generateKeyPair(
982
-        type: 'x448',
983
-        options: X448KeyPairOptions<'pem', 'pem'>,
984
-        callback: (err: Error | null, publicKey: string, privateKey: string) => void,
985
-    ): void;
986
-    function generateKeyPair(
987
-        type: 'x448',
988
-        options: X448KeyPairOptions<'pem', 'der'>,
989
-        callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
990
-    ): void;
991
-    function generateKeyPair(
992
-        type: 'x448',
993
-        options: X448KeyPairOptions<'der', 'pem'>,
994
-        callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
995
-    ): void;
996
-    function generateKeyPair(
997
-        type: 'x448',
998
-        options: X448KeyPairOptions<'der', 'der'>,
999
-        callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
1000
-    ): void;
1001
-    function generateKeyPair(
1002
-        type: 'x448',
1003
-        options: X448KeyPairKeyObjectOptions | undefined,
1004
-        callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
1005
-    ): void;
1006
-
1007
-    namespace generateKeyPair {
1008
-        function __promisify__(
1009
-            type: 'rsa',
1010
-            options: RSAKeyPairOptions<'pem', 'pem'>,
1011
-        ): Promise<{ publicKey: string; privateKey: string }>;
1012
-        function __promisify__(
1013
-            type: 'rsa',
1014
-            options: RSAKeyPairOptions<'pem', 'der'>,
1015
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1016
-        function __promisify__(
1017
-            type: 'rsa',
1018
-            options: RSAKeyPairOptions<'der', 'pem'>,
1019
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1020
-        function __promisify__(
1021
-            type: 'rsa',
1022
-            options: RSAKeyPairOptions<'der', 'der'>,
1023
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1024
-        function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1025
-
1026
-        function __promisify__(
1027
-            type: 'dsa',
1028
-            options: DSAKeyPairOptions<'pem', 'pem'>,
1029
-        ): Promise<{ publicKey: string; privateKey: string }>;
1030
-        function __promisify__(
1031
-            type: 'dsa',
1032
-            options: DSAKeyPairOptions<'pem', 'der'>,
1033
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1034
-        function __promisify__(
1035
-            type: 'dsa',
1036
-            options: DSAKeyPairOptions<'der', 'pem'>,
1037
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1038
-        function __promisify__(
1039
-            type: 'dsa',
1040
-            options: DSAKeyPairOptions<'der', 'der'>,
1041
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1042
-        function __promisify__(type: 'dsa', options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1043
-
1044
-        function __promisify__(
1045
-            type: 'ec',
1046
-            options: ECKeyPairOptions<'pem', 'pem'>,
1047
-        ): Promise<{ publicKey: string; privateKey: string }>;
1048
-        function __promisify__(
1049
-            type: 'ec',
1050
-            options: ECKeyPairOptions<'pem', 'der'>,
1051
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1052
-        function __promisify__(
1053
-            type: 'ec',
1054
-            options: ECKeyPairOptions<'der', 'pem'>,
1055
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1056
-        function __promisify__(
1057
-            type: 'ec',
1058
-            options: ECKeyPairOptions<'der', 'der'>,
1059
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1060
-        function __promisify__(type: 'ec', options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1061
-
1062
-        function __promisify__(
1063
-            type: 'ed25519',
1064
-            options: ED25519KeyPairOptions<'pem', 'pem'>,
1065
-        ): Promise<{ publicKey: string; privateKey: string }>;
1066
-        function __promisify__(
1067
-            type: 'ed25519',
1068
-            options: ED25519KeyPairOptions<'pem', 'der'>,
1069
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1070
-        function __promisify__(
1071
-            type: 'ed25519',
1072
-            options: ED25519KeyPairOptions<'der', 'pem'>,
1073
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1074
-        function __promisify__(
1075
-            type: 'ed25519',
1076
-            options: ED25519KeyPairOptions<'der', 'der'>,
1077
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1078
-        function __promisify__(
1079
-            type: 'ed25519',
1080
-            options?: ED25519KeyPairKeyObjectOptions,
1081
-        ): Promise<KeyPairKeyObjectResult>;
1082
-
1083
-        function __promisify__(
1084
-            type: 'ed448',
1085
-            options: ED448KeyPairOptions<'pem', 'pem'>,
1086
-        ): Promise<{ publicKey: string; privateKey: string }>;
1087
-        function __promisify__(
1088
-            type: 'ed448',
1089
-            options: ED448KeyPairOptions<'pem', 'der'>,
1090
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1091
-        function __promisify__(
1092
-            type: 'ed448',
1093
-            options: ED448KeyPairOptions<'der', 'pem'>,
1094
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1095
-        function __promisify__(
1096
-            type: 'ed448',
1097
-            options: ED448KeyPairOptions<'der', 'der'>,
1098
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1099
-        function __promisify__(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1100
-
1101
-        function __promisify__(
1102
-            type: 'x25519',
1103
-            options: X25519KeyPairOptions<'pem', 'pem'>,
1104
-        ): Promise<{ publicKey: string; privateKey: string }>;
1105
-        function __promisify__(
1106
-            type: 'x25519',
1107
-            options: X25519KeyPairOptions<'pem', 'der'>,
1108
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1109
-        function __promisify__(
1110
-            type: 'x25519',
1111
-            options: X25519KeyPairOptions<'der', 'pem'>,
1112
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1113
-        function __promisify__(
1114
-            type: 'x25519',
1115
-            options: X25519KeyPairOptions<'der', 'der'>,
1116
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1117
-        function __promisify__(
1118
-            type: 'x25519',
1119
-            options?: X25519KeyPairKeyObjectOptions,
1120
-        ): Promise<KeyPairKeyObjectResult>;
1121
-
1122
-        function __promisify__(
1123
-            type: 'x448',
1124
-            options: X448KeyPairOptions<'pem', 'pem'>,
1125
-        ): Promise<{ publicKey: string; privateKey: string }>;
1126
-        function __promisify__(
1127
-            type: 'x448',
1128
-            options: X448KeyPairOptions<'pem', 'der'>,
1129
-        ): Promise<{ publicKey: string; privateKey: Buffer }>;
1130
-        function __promisify__(
1131
-            type: 'x448',
1132
-            options: X448KeyPairOptions<'der', 'pem'>,
1133
-        ): Promise<{ publicKey: Buffer; privateKey: string }>;
1134
-        function __promisify__(
1135
-            type: 'x448',
1136
-            options: X448KeyPairOptions<'der', 'der'>,
1137
-        ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
1138
-        function __promisify__(type: 'x448', options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
1139
-    }
1140
-
1141
-    /**
1142
-     * Calculates and returns the signature for `data` using the given private key and
1143
-     * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
1144
-     * dependent upon the key type (especially Ed25519 and Ed448).
1145
-     *
1146
-     * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
1147
-     * passed to [`crypto.createPrivateKey()`][].
1148
-     */
1149
-    function sign(
1150
-        algorithm: string | null | undefined,
1151
-        data: NodeJS.ArrayBufferView,
1152
-        key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput,
1153
-    ): Buffer;
1154
-
1155
-    /**
1156
-     * Calculates and returns the signature for `data` using the given private key and
1157
-     * algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is
1158
-     * dependent upon the key type (especially Ed25519 and Ed448).
1159
-     *
1160
-     * If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
1161
-     * passed to [`crypto.createPublicKey()`][].
1162
-     */
1163
-    function verify(
1164
-        algorithm: string | null | undefined,
1165
-        data: NodeJS.ArrayBufferView,
1166
-        key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput,
1167
-        signature: NodeJS.ArrayBufferView,
1168
-    ): boolean;
1169
-
1170
-    /**
1171
-     * Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
1172
-     * Both keys must have the same asymmetricKeyType, which must be one of
1173
-     * 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
1174
-     */
1175
-    function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
1176
-}
... ...
@@ -1,145 +0,0 @@
1
-declare module 'node:dgram' {
2
-    export * from 'dgram';
3
-}
4
-
5
-declare module 'dgram' {
6
-    import { AddressInfo } from 'node:net';
7
-    import * as dns from 'node:dns';
8
-    import EventEmitter = require('node:events');
9
-
10
-    interface RemoteInfo {
11
-        address: string;
12
-        family: 'IPv4' | 'IPv6';
13
-        port: number;
14
-        size: number;
15
-    }
16
-
17
-    interface BindOptions {
18
-        port?: number;
19
-        address?: string;
20
-        exclusive?: boolean;
21
-        fd?: number;
22
-    }
23
-
24
-    type SocketType = "udp4" | "udp6";
25
-
26
-    interface SocketOptions {
27
-        type: SocketType;
28
-        reuseAddr?: boolean;
29
-        /**
30
-         * @default false
31
-         */
32
-        ipv6Only?: boolean;
33
-        recvBufferSize?: number;
34
-        sendBufferSize?: number;
35
-        lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
36
-    }
37
-
38
-    function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
39
-    function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
40
-
41
-    class Socket extends EventEmitter {
42
-        addMembership(multicastAddress: string, multicastInterface?: string): void;
43
-        address(): AddressInfo;
44
-        bind(port?: number, address?: string, callback?: () => void): void;
45
-        bind(port?: number, callback?: () => void): void;
46
-        bind(callback?: () => void): void;
47
-        bind(options: BindOptions, callback?: () => void): void;
48
-        close(callback?: () => void): void;
49
-        connect(port: number, address?: string, callback?: () => void): void;
50
-        connect(port: number, callback: () => void): void;
51
-        disconnect(): void;
52
-        dropMembership(multicastAddress: string, multicastInterface?: string): void;
53
-        getRecvBufferSize(): number;
54
-        getSendBufferSize(): number;
55
-        ref(): this;
56
-        remoteAddress(): AddressInfo;
57
-        send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
58
-        send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
59
-        send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
60
-        send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
61
-        send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
62
-        send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
63
-        setBroadcast(flag: boolean): void;
64
-        setMulticastInterface(multicastInterface: string): void;
65
-        setMulticastLoopback(flag: boolean): void;
66
-        setMulticastTTL(ttl: number): void;
67
-        setRecvBufferSize(size: number): void;
68
-        setSendBufferSize(size: number): void;
69
-        setTTL(ttl: number): void;
70
-        unref(): this;
71
-        /**
72
-         * Tells the kernel to join a source-specific multicast channel at the given
73
-         * `sourceAddress` and `groupAddress`, using the `multicastInterface` with the
74
-         * `IP_ADD_SOURCE_MEMBERSHIP` socket option.
75
-         * If the `multicastInterface` argument
76
-         * is not specified, the operating system will choose one interface and will add
77
-         * membership to it.
78
-         * To add membership to every available interface, call
79
-         * `socket.addSourceSpecificMembership()` multiple times, once per interface.
80
-         */
81
-        addSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
82
-
83
-        /**
84
-         * Instructs the kernel to leave a source-specific multicast channel at the given
85
-         * `sourceAddress` and `groupAddress` using the `IP_DROP_SOURCE_MEMBERSHIP`
86
-         * socket option. This method is automatically called by the kernel when the
87
-         * socket is closed or the process terminates, so most apps will never have
88
-         * reason to call this.
89
-         *
90
-         * If `multicastInterface` is not specified, the operating system will attempt to
91
-         * drop membership on all valid interfaces.
92
-         */
93
-        dropSourceSpecificMembership(sourceAddress: string, groupAddress: string, multicastInterface?: string): void;
94
-
95
-        /**
96
-         * events.EventEmitter
97
-         * 1. close
98
-         * 2. connect
99
-         * 3. error
100
-         * 4. listening
101
-         * 5. message
102
-         */
103
-        addListener(event: string, listener: (...args: any[]) => void): this;
104
-        addListener(event: "close", listener: () => void): this;
105
-        addListener(event: "connect", listener: () => void): this;
106
-        addListener(event: "error", listener: (err: Error) => void): this;
107
-        addListener(event: "listening", listener: () => void): this;
108
-        addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
109
-
110
-        emit(event: string | symbol, ...args: any[]): boolean;
111
-        emit(event: "close"): boolean;
112
-        emit(event: "connect"): boolean;
113
-        emit(event: "error", err: Error): boolean;
114
-        emit(event: "listening"): boolean;
115
-        emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
116
-
117
-        on(event: string, listener: (...args: any[]) => void): this;
118
-        on(event: "close", listener: () => void): this;
119
-        on(event: "connect", listener: () => void): this;
120
-        on(event: "error", listener: (err: Error) => void): this;
121
-        on(event: "listening", listener: () => void): this;
122
-        on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
123
-
124
-        once(event: string, listener: (...args: any[]) => void): this;
125
-        once(event: "close", listener: () => void): this;
126
-        once(event: "connect", listener: () => void): this;
127
-        once(event: "error", listener: (err: Error) => void): this;
128
-        once(event: "listening", listener: () => void): this;
129
-        once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
130
-
131
-        prependListener(event: string, listener: (...args: any[]) => void): this;
132
-        prependListener(event: "close", listener: () => void): this;
133
-        prependListener(event: "connect", listener: () => void): this;
134
-        prependListener(event: "error", listener: (err: Error) => void): this;
135
-        prependListener(event: "listening", listener: () => void): this;
136
-        prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
137
-
138
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
139
-        prependOnceListener(event: "close", listener: () => void): this;
140
-        prependOnceListener(event: "connect", listener: () => void): this;
141
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
142
-        prependOnceListener(event: "listening", listener: () => void): this;
143
-        prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
144
-    }
145
-}
... ...
@@ -1,384 +0,0 @@
1
-declare module 'node:dns' {
2
-    export * from 'dns';
3
-}
4
-
5
-declare module 'dns' {
6
-    // Supported getaddrinfo flags.
7
-    const ADDRCONFIG: number;
8
-    const V4MAPPED: number;
9
-    /**
10
-     * If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
11
-     * well as IPv4 mapped IPv6 addresses.
12
-     */
13
-    const ALL: number;
14
-
15
-    interface LookupOptions {
16
-        family?: number;
17
-        hints?: number;
18
-        all?: boolean;
19
-        verbatim?: boolean;
20
-    }
21
-
22
-    interface LookupOneOptions extends LookupOptions {
23
-        all?: false;
24
-    }
25
-
26
-    interface LookupAllOptions extends LookupOptions {
27
-        all: true;
28
-    }
29
-
30
-    interface LookupAddress {
31
-        address: string;
32
-        family: number;
33
-    }
34
-
35
-    function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
36
-    function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
37
-    function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
38
-    function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
39
-    function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
40
-
41
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
42
-    namespace lookup {
43
-        function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
44
-        function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
45
-        function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
46
-    }
47
-
48
-    function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
49
-
50
-    namespace lookupService {
51
-        function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
52
-    }
53
-
54
-    interface ResolveOptions {
55
-        ttl: boolean;
56
-    }
57
-
58
-    interface ResolveWithTtlOptions extends ResolveOptions {
59
-        ttl: true;
60
-    }
61
-
62
-    interface RecordWithTtl {
63
-        address: string;
64
-        ttl: number;
65
-    }
66
-
67
-    /** @deprecated Use `AnyARecord` or `AnyAaaaRecord` instead. */
68
-    type AnyRecordWithTtl = AnyARecord | AnyAaaaRecord;
69
-
70
-    interface AnyARecord extends RecordWithTtl {
71
-        type: "A";
72
-    }
73
-
74
-    interface AnyAaaaRecord extends RecordWithTtl {
75
-        type: "AAAA";
76
-    }
77
-
78
-    interface MxRecord {
79
-        priority: number;
80
-        exchange: string;
81
-    }
82
-
83
-    interface AnyMxRecord extends MxRecord {
84
-        type: "MX";
85
-    }
86
-
87
-    interface NaptrRecord {
88
-        flags: string;
89
-        service: string;
90
-        regexp: string;
91
-        replacement: string;
92
-        order: number;
93
-        preference: number;
94
-    }
95
-
96
-    interface AnyNaptrRecord extends NaptrRecord {
97
-        type: "NAPTR";
98
-    }
99
-
100
-    interface SoaRecord {
101
-        nsname: string;
102
-        hostmaster: string;
103
-        serial: number;
104
-        refresh: number;
105
-        retry: number;
106
-        expire: number;
107
-        minttl: number;
108
-    }
109
-
110
-    interface AnySoaRecord extends SoaRecord {
111
-        type: "SOA";
112
-    }
113
-
114
-    interface SrvRecord {
115
-        priority: number;
116
-        weight: number;
117
-        port: number;
118
-        name: string;
119
-    }
120
-
121
-    interface AnySrvRecord extends SrvRecord {
122
-        type: "SRV";
123
-    }
124
-
125
-    interface AnyTxtRecord {
126
-        type: "TXT";
127
-        entries: string[];
128
-    }
129
-
130
-    interface AnyNsRecord {
131
-        type: "NS";
132
-        value: string;
133
-    }
134
-
135
-    interface AnyPtrRecord {
136
-        type: "PTR";
137
-        value: string;
138
-    }
139
-
140
-    interface AnyCnameRecord {
141
-        type: "CNAME";
142
-        value: string;
143
-    }
144
-
145
-    type AnyRecord = AnyARecord |
146
-        AnyAaaaRecord |
147
-        AnyCnameRecord |
148
-        AnyMxRecord |
149
-        AnyNaptrRecord |
150
-        AnyNsRecord |
151
-        AnyPtrRecord |
152
-        AnySoaRecord |
153
-        AnySrvRecord |
154
-        AnyTxtRecord;
155
-
156
-    function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
157
-    function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
158
-    function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
159
-    function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
160
-    function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
161
-    function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
162
-    function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
163
-    function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
164
-    function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
165
-    function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
166
-    function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
167
-    function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
168
-    function resolve(
169
-        hostname: string,
170
-        rrtype: string,
171
-        callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
172
-    ): void;
173
-
174
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
175
-    namespace resolve {
176
-        function __promisify__(hostname: string, rrtype?: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
177
-        function __promisify__(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
178
-        function __promisify__(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
179
-        function __promisify__(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
180
-        function __promisify__(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
181
-        function __promisify__(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
182
-        function __promisify__(hostname: string, rrtype: "TXT"): Promise<string[][]>;
183
-        function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
184
-    }
185
-
186
-    function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
187
-    function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
188
-    function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
189
-
190
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
191
-    namespace resolve4 {
192
-        function __promisify__(hostname: string): Promise<string[]>;
193
-        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
194
-        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
195
-    }
196
-
197
-    function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
198
-    function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
199
-    function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
200
-
201
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
202
-    namespace resolve6 {
203
-        function __promisify__(hostname: string): Promise<string[]>;
204
-        function __promisify__(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
205
-        function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
206
-    }
207
-
208
-    function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
209
-    namespace resolveCname {
210
-        function __promisify__(hostname: string): Promise<string[]>;
211
-    }
212
-
213
-    function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
214
-    namespace resolveMx {
215
-        function __promisify__(hostname: string): Promise<MxRecord[]>;
216
-    }
217
-
218
-    function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
219
-    namespace resolveNaptr {
220
-        function __promisify__(hostname: string): Promise<NaptrRecord[]>;
221
-    }
222
-
223
-    function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
224
-    namespace resolveNs {
225
-        function __promisify__(hostname: string): Promise<string[]>;
226
-    }
227
-
228
-    function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
229
-    namespace resolvePtr {
230
-        function __promisify__(hostname: string): Promise<string[]>;
231
-    }
232
-
233
-    function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
234
-    namespace resolveSoa {
235
-        function __promisify__(hostname: string): Promise<SoaRecord>;
236
-    }
237
-
238
-    function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
239
-    namespace resolveSrv {
240
-        function __promisify__(hostname: string): Promise<SrvRecord[]>;
241
-    }
242
-
243
-    function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
244
-    namespace resolveTxt {
245
-        function __promisify__(hostname: string): Promise<string[][]>;
246
-    }
247
-
248
-    function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
249
-    namespace resolveAny {
250
-        function __promisify__(hostname: string): Promise<AnyRecord[]>;
251
-    }
252
-
253
-    function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
254
-    function setServers(servers: ReadonlyArray<string>): void;
255
-    function getServers(): string[];
256
-
257
-    // Error codes
258
-    const NODATA: string;
259
-    const FORMERR: string;
260
-    const SERVFAIL: string;
261
-    const NOTFOUND: string;
262
-    const NOTIMP: string;
263
-    const REFUSED: string;
264
-    const BADQUERY: string;
265
-    const BADNAME: string;
266
-    const BADFAMILY: string;
267
-    const BADRESP: string;
268
-    const CONNREFUSED: string;
269
-    const TIMEOUT: string;
270
-    const EOF: string;
271
-    const FILE: string;
272
-    const NOMEM: string;
273
-    const DESTRUCTION: string;
274
-    const BADSTR: string;
275
-    const BADFLAGS: string;
276
-    const NONAME: string;
277
-    const BADHINTS: string;
278
-    const NOTINITIALIZED: string;
279
-    const LOADIPHLPAPI: string;
280
-    const ADDRGETNETWORKPARAMS: string;
281
-    const CANCELLED: string;
282
-
283
-    interface ResolverOptions {
284
-        timeout?: number;
285
-    }
286
-
287
-    class Resolver {
288
-        constructor(options?: ResolverOptions);
289
-        cancel(): void;
290
-        getServers: typeof getServers;
291
-        resolve: typeof resolve;
292
-        resolve4: typeof resolve4;
293
-        resolve6: typeof resolve6;
294
-        resolveAny: typeof resolveAny;
295
-        resolveCname: typeof resolveCname;
296
-        resolveMx: typeof resolveMx;
297
-        resolveNaptr: typeof resolveNaptr;
298
-        resolveNs: typeof resolveNs;
299
-        resolvePtr: typeof resolvePtr;
300
-        resolveSoa: typeof resolveSoa;
301
-        resolveSrv: typeof resolveSrv;
302
-        resolveTxt: typeof resolveTxt;
303
-        reverse: typeof reverse;
304
-        setLocalAddress(ipv4?: string, ipv6?: string): void;
305
-        setServers: typeof setServers;
306
-    }
307
-
308
-    namespace promises {
309
-        function getServers(): string[];
310
-
311
-        function lookup(hostname: string, family: number): Promise<LookupAddress>;
312
-        function lookup(hostname: string, options: LookupOneOptions): Promise<LookupAddress>;
313
-        function lookup(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
314
-        function lookup(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
315
-        function lookup(hostname: string): Promise<LookupAddress>;
316
-
317
-        function lookupService(address: string, port: number): Promise<{ hostname: string, service: string }>;
318
-
319
-        function resolve(hostname: string): Promise<string[]>;
320
-        function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
321
-        function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
322
-        function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
323
-        function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
324
-        function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
325
-        function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
326
-        function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
327
-        function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
328
-        function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
329
-        function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
330
-        function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
331
-        function resolve(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
332
-
333
-        function resolve4(hostname: string): Promise<string[]>;
334
-        function resolve4(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
335
-        function resolve4(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
336
-
337
-        function resolve6(hostname: string): Promise<string[]>;
338
-        function resolve6(hostname: string, options: ResolveWithTtlOptions): Promise<RecordWithTtl[]>;
339
-        function resolve6(hostname: string, options: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
340
-
341
-        function resolveAny(hostname: string): Promise<AnyRecord[]>;
342
-
343
-        function resolveCname(hostname: string): Promise<string[]>;
344
-
345
-        function resolveMx(hostname: string): Promise<MxRecord[]>;
346
-
347
-        function resolveNaptr(hostname: string): Promise<NaptrRecord[]>;
348
-
349
-        function resolveNs(hostname: string): Promise<string[]>;
350
-
351
-        function resolvePtr(hostname: string): Promise<string[]>;
352
-
353
-        function resolveSoa(hostname: string): Promise<SoaRecord>;
354
-
355
-        function resolveSrv(hostname: string): Promise<SrvRecord[]>;
356
-
357
-        function resolveTxt(hostname: string): Promise<string[][]>;
358
-
359
-        function reverse(ip: string): Promise<string[]>;
360
-
361
-        function setServers(servers: ReadonlyArray<string>): void;
362
-
363
-        class Resolver {
364
-            constructor(options?: ResolverOptions);
365
-            cancel(): void;
366
-            getServers: typeof getServers;
367
-            resolve: typeof resolve;
368
-            resolve4: typeof resolve4;
369
-            resolve6: typeof resolve6;
370
-            resolveAny: typeof resolveAny;
371
-            resolveCname: typeof resolveCname;
372
-            resolveMx: typeof resolveMx;
373
-            resolveNaptr: typeof resolveNaptr;
374
-            resolveNs: typeof resolveNs;
375
-            resolvePtr: typeof resolvePtr;
376
-            resolveSoa: typeof resolveSoa;
377
-            resolveSrv: typeof resolveSrv;
378
-            resolveTxt: typeof resolveTxt;
379
-            reverse: typeof reverse;
380
-            setLocalAddress(ipv4?: string, ipv6?: string): void;
381
-            setServers: typeof setServers;
382
-        }
383
-    }
384
-}
... ...
@@ -1,28 +0,0 @@
1
-declare module 'node:domain' {
2
-    export * from 'domain';
3
-}
4
-
5
-declare module 'domain' {
6
-    import EventEmitter = require('node:events');
7
-
8
-    global {
9
-        namespace NodeJS {
10
-            interface Domain extends EventEmitter {
11
-                run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
12
-                add(emitter: EventEmitter | Timer): void;
13
-                remove(emitter: EventEmitter | Timer): void;
14
-                bind<T extends Function>(cb: T): T;
15
-                intercept<T extends Function>(cb: T): T;
16
-            }
17
-        }
18
-    }
19
-
20
-    interface Domain extends NodeJS.Domain {}
21
-    class Domain extends EventEmitter {
22
-        members: Array<EventEmitter | NodeJS.Timer>;
23
-        enter(): void;
24
-        exit(): void;
25
-    }
26
-
27
-    function create(): Domain;
28
-}
... ...
@@ -1,83 +0,0 @@
1
-declare module 'node:events' {
2
-    import EventEmitter = require('events');
3
-    export = EventEmitter;
4
-}
5
-
6
-declare module 'events' {
7
-    interface EventEmitterOptions {
8
-        /**
9
-         * Enables automatic capturing of promise rejection.
10
-         */
11
-        captureRejections?: boolean;
12
-    }
13
-
14
-    interface NodeEventTarget {
15
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
16
-    }
17
-
18
-    interface DOMEventTarget {
19
-        addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
20
-    }
21
-
22
-    interface EventEmitter extends NodeJS.EventEmitter {}
23
-    class EventEmitter {
24
-        constructor(options?: EventEmitterOptions);
25
-
26
-        static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
27
-        static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
28
-        static on(emitter: NodeJS.EventEmitter, event: string): AsyncIterableIterator<any>;
29
-
30
-        /** @deprecated since v4.0.0 */
31
-        static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
32
-
33
-        /**
34
-         * This symbol shall be used to install a listener for only monitoring `'error'`
35
-         * events. Listeners installed using this symbol are called before the regular
36
-         * `'error'` listeners are called.
37
-         *
38
-         * Installing a listener using this symbol does not change the behavior once an
39
-         * `'error'` event is emitted, therefore the process will still crash if no
40
-         * regular `'error'` listener is installed.
41
-         */
42
-        static readonly errorMonitor: unique symbol;
43
-        static readonly captureRejectionSymbol: unique symbol;
44
-
45
-        /**
46
-         * Sets or gets the default captureRejection value for all emitters.
47
-         */
48
-        // TODO: These should be described using static getter/setter pairs:
49
-        static captureRejections: boolean;
50
-        static defaultMaxListeners: number;
51
-    }
52
-
53
-    import internal = require('events');
54
-    namespace EventEmitter {
55
-        // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
56
-        export { internal as EventEmitter };
57
-    }
58
-
59
-    global {
60
-        namespace NodeJS {
61
-            interface EventEmitter {
62
-                addListener(event: string | symbol, listener: (...args: any[]) => void): this;
63
-                on(event: string | symbol, listener: (...args: any[]) => void): this;
64
-                once(event: string | symbol, listener: (...args: any[]) => void): this;
65
-                removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
66
-                off(event: string | symbol, listener: (...args: any[]) => void): this;
67
-                removeAllListeners(event?: string | symbol): this;
68
-                setMaxListeners(n: number): this;
69
-                getMaxListeners(): number;
70
-                listeners(event: string | symbol): Function[];
71
-                rawListeners(event: string | symbol): Function[];
72
-                emit(event: string | symbol, ...args: any[]): boolean;
73
-                listenerCount(event: string | symbol): number;
74
-                // Added in Node 6...
75
-                prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
76
-                prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
77
-                eventNames(): Array<string | symbol>;
78
-            }
79
-        }
80
-    }
81
-
82
-    export = EventEmitter;
83
-}
... ...
@@ -1,2262 +0,0 @@
1
-declare module 'node:fs' {
2
-    export * from 'fs';
3
-}
4
-
5
-declare module 'fs' {
6
-    import * as stream from 'node:stream';
7
-    import EventEmitter = require('node:events');
8
-    import { URL } from 'node:url';
9
-    import * as promises from 'node:fs/promises';
10
-
11
-    export { promises };
12
-    /**
13
-     * Valid types for path values in "fs".
14
-     */
15
-    export type PathLike = string | Buffer | URL;
16
-
17
-    export type NoParamCallback = (err: NodeJS.ErrnoException | null) => void;
18
-
19
-    export type BufferEncodingOption = 'buffer' | { encoding: 'buffer' };
20
-
21
-    export interface BaseEncodingOptions {
22
-        encoding?: BufferEncoding | null;
23
-    }
24
-
25
-    export type OpenMode = number | string;
26
-
27
-    export type Mode = number | string;
28
-
29
-    export interface StatsBase<T> {
30
-        isFile(): boolean;
31
-        isDirectory(): boolean;
32
-        isBlockDevice(): boolean;
33
-        isCharacterDevice(): boolean;
34
-        isSymbolicLink(): boolean;
35
-        isFIFO(): boolean;
36
-        isSocket(): boolean;
37
-
38
-        dev: T;
39
-        ino: T;
40
-        mode: T;
41
-        nlink: T;
42
-        uid: T;
43
-        gid: T;
44
-        rdev: T;
45
-        size: T;
46
-        blksize: T;
47
-        blocks: T;
48
-        atimeMs: T;
49
-        mtimeMs: T;
50
-        ctimeMs: T;
51
-        birthtimeMs: T;
52
-        atime: Date;
53
-        mtime: Date;
54
-        ctime: Date;
55
-        birthtime: Date;
56
-    }
57
-
58
-    export interface Stats extends StatsBase<number> {
59
-    }
60
-
61
-    export class Stats {
62
-    }
63
-
64
-    export class Dirent {
65
-        isFile(): boolean;
66
-        isDirectory(): boolean;
67
-        isBlockDevice(): boolean;
68
-        isCharacterDevice(): boolean;
69
-        isSymbolicLink(): boolean;
70
-        isFIFO(): boolean;
71
-        isSocket(): boolean;
72
-        name: string;
73
-    }
74
-
75
-    /**
76
-     * A class representing a directory stream.
77
-     */
78
-    export class Dir {
79
-        readonly path: string;
80
-
81
-        /**
82
-         * Asynchronously iterates over the directory via `readdir(3)` until all entries have been read.
83
-         */
84
-        [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
85
-
86
-        /**
87
-         * Asynchronously close the directory's underlying resource handle.
88
-         * Subsequent reads will result in errors.
89
-         */
90
-        close(): Promise<void>;
91
-        close(cb: NoParamCallback): void;
92
-
93
-        /**
94
-         * Synchronously close the directory's underlying resource handle.
95
-         * Subsequent reads will result in errors.
96
-         */
97
-        closeSync(): void;
98
-
99
-        /**
100
-         * Asynchronously read the next directory entry via `readdir(3)` as an `Dirent`.
101
-         * After the read is completed, a value is returned that will be resolved with an `Dirent`, or `null` if there are no more directory entries to read.
102
-         * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
103
-         */
104
-        read(): Promise<Dirent | null>;
105
-        read(cb: (err: NodeJS.ErrnoException | null, dirEnt: Dirent | null) => void): void;
106
-
107
-        /**
108
-         * Synchronously read the next directory entry via `readdir(3)` as a `Dirent`.
109
-         * If there are no more directory entries to read, null will be returned.
110
-         * Directory entries returned by this function are in no particular order as provided by the operating system's underlying directory mechanisms.
111
-         */
112
-        readSync(): Dirent | null;
113
-    }
114
-
115
-    export interface FSWatcher extends EventEmitter {
116
-        close(): void;
117
-
118
-        /**
119
-         * events.EventEmitter
120
-         *   1. change
121
-         *   2. error
122
-         */
123
-        addListener(event: string, listener: (...args: any[]) => void): this;
124
-        addListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
125
-        addListener(event: "error", listener: (error: Error) => void): this;
126
-        addListener(event: "close", listener: () => void): this;
127
-
128
-        on(event: string, listener: (...args: any[]) => void): this;
129
-        on(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
130
-        on(event: "error", listener: (error: Error) => void): this;
131
-        on(event: "close", listener: () => void): this;
132
-
133
-        once(event: string, listener: (...args: any[]) => void): this;
134
-        once(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
135
-        once(event: "error", listener: (error: Error) => void): this;
136
-        once(event: "close", listener: () => void): this;
137
-
138
-        prependListener(event: string, listener: (...args: any[]) => void): this;
139
-        prependListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
140
-        prependListener(event: "error", listener: (error: Error) => void): this;
141
-        prependListener(event: "close", listener: () => void): this;
142
-
143
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
144
-        prependOnceListener(event: "change", listener: (eventType: string, filename: string | Buffer) => void): this;
145
-        prependOnceListener(event: "error", listener: (error: Error) => void): this;
146
-        prependOnceListener(event: "close", listener: () => void): this;
147
-    }
148
-
149
-    export class ReadStream extends stream.Readable {
150
-        close(): void;
151
-        bytesRead: number;
152
-        path: string | Buffer;
153
-        pending: boolean;
154
-
155
-        /**
156
-         * events.EventEmitter
157
-         *   1. open
158
-         *   2. close
159
-         *   3. ready
160
-         */
161
-        addListener(event: "close", listener: () => void): this;
162
-        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
163
-        addListener(event: "end", listener: () => void): this;
164
-        addListener(event: "error", listener: (err: Error) => void): this;
165
-        addListener(event: "open", listener: (fd: number) => void): this;
166
-        addListener(event: "pause", listener: () => void): this;
167
-        addListener(event: "readable", listener: () => void): this;
168
-        addListener(event: "ready", listener: () => void): this;
169
-        addListener(event: "resume", listener: () => void): this;
170
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
171
-
172
-        on(event: "close", listener: () => void): this;
173
-        on(event: "data", listener: (chunk: Buffer | string) => void): this;
174
-        on(event: "end", listener: () => void): this;
175
-        on(event: "error", listener: (err: Error) => void): this;
176
-        on(event: "open", listener: (fd: number) => void): this;
177
-        on(event: "pause", listener: () => void): this;
178
-        on(event: "readable", listener: () => void): this;
179
-        on(event: "ready", listener: () => void): this;
180
-        on(event: "resume", listener: () => void): this;
181
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
182
-
183
-        once(event: "close", listener: () => void): this;
184
-        once(event: "data", listener: (chunk: Buffer | string) => void): this;
185
-        once(event: "end", listener: () => void): this;
186
-        once(event: "error", listener: (err: Error) => void): this;
187
-        once(event: "open", listener: (fd: number) => void): this;
188
-        once(event: "pause", listener: () => void): this;
189
-        once(event: "readable", listener: () => void): this;
190
-        once(event: "ready", listener: () => void): this;
191
-        once(event: "resume", listener: () => void): this;
192
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
193
-
194
-        prependListener(event: "close", listener: () => void): this;
195
-        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
196
-        prependListener(event: "end", listener: () => void): this;
197
-        prependListener(event: "error", listener: (err: Error) => void): this;
198
-        prependListener(event: "open", listener: (fd: number) => void): this;
199
-        prependListener(event: "pause", listener: () => void): this;
200
-        prependListener(event: "readable", listener: () => void): this;
201
-        prependListener(event: "ready", listener: () => void): this;
202
-        prependListener(event: "resume", listener: () => void): this;
203
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
204
-
205
-        prependOnceListener(event: "close", listener: () => void): this;
206
-        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
207
-        prependOnceListener(event: "end", listener: () => void): this;
208
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
209
-        prependOnceListener(event: "open", listener: (fd: number) => void): this;
210
-        prependOnceListener(event: "pause", listener: () => void): this;
211
-        prependOnceListener(event: "readable", listener: () => void): this;
212
-        prependOnceListener(event: "ready", listener: () => void): this;
213
-        prependOnceListener(event: "resume", listener: () => void): this;
214
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
215
-    }
216
-
217
-    export class WriteStream extends stream.Writable {
218
-        close(): void;
219
-        bytesWritten: number;
220
-        path: string | Buffer;
221
-        pending: boolean;
222
-
223
-        /**
224
-         * events.EventEmitter
225
-         *   1. open
226
-         *   2. close
227
-         *   3. ready
228
-         */
229
-        addListener(event: "close", listener: () => void): this;
230
-        addListener(event: "drain", listener: () => void): this;
231
-        addListener(event: "error", listener: (err: Error) => void): this;
232
-        addListener(event: "finish", listener: () => void): this;
233
-        addListener(event: "open", listener: (fd: number) => void): this;
234
-        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
235
-        addListener(event: "ready", listener: () => void): this;
236
-        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
237
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
238
-
239
-        on(event: "close", listener: () => void): this;
240
-        on(event: "drain", listener: () => void): this;
241
-        on(event: "error", listener: (err: Error) => void): this;
242
-        on(event: "finish", listener: () => void): this;
243
-        on(event: "open", listener: (fd: number) => void): this;
244
-        on(event: "pipe", listener: (src: stream.Readable) => void): this;
245
-        on(event: "ready", listener: () => void): this;
246
-        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
247
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
248
-
249
-        once(event: "close", listener: () => void): this;
250
-        once(event: "drain", listener: () => void): this;
251
-        once(event: "error", listener: (err: Error) => void): this;
252
-        once(event: "finish", listener: () => void): this;
253
-        once(event: "open", listener: (fd: number) => void): this;
254
-        once(event: "pipe", listener: (src: stream.Readable) => void): this;
255
-        once(event: "ready", listener: () => void): this;
256
-        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
257
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
258
-
259
-        prependListener(event: "close", listener: () => void): this;
260
-        prependListener(event: "drain", listener: () => void): this;
261
-        prependListener(event: "error", listener: (err: Error) => void): this;
262
-        prependListener(event: "finish", listener: () => void): this;
263
-        prependListener(event: "open", listener: (fd: number) => void): this;
264
-        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
265
-        prependListener(event: "ready", listener: () => void): this;
266
-        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
267
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
268
-
269
-        prependOnceListener(event: "close", listener: () => void): this;
270
-        prependOnceListener(event: "drain", listener: () => void): this;
271
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
272
-        prependOnceListener(event: "finish", listener: () => void): this;
273
-        prependOnceListener(event: "open", listener: (fd: number) => void): this;
274
-        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
275
-        prependOnceListener(event: "ready", listener: () => void): this;
276
-        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
277
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
278
-    }
279
-
280
-    /**
281
-     * Asynchronous rename(2) - Change the name or location of a file or directory.
282
-     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
283
-     * URL support is _experimental_.
284
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
285
-     * URL support is _experimental_.
286
-     */
287
-    export function rename(oldPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
288
-
289
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
290
-    export namespace rename {
291
-        /**
292
-         * Asynchronous rename(2) - Change the name or location of a file or directory.
293
-         * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
294
-         * URL support is _experimental_.
295
-         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
296
-         * URL support is _experimental_.
297
-         */
298
-        function __promisify__(oldPath: PathLike, newPath: PathLike): Promise<void>;
299
-    }
300
-
301
-    /**
302
-     * Synchronous rename(2) - Change the name or location of a file or directory.
303
-     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
304
-     * URL support is _experimental_.
305
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
306
-     * URL support is _experimental_.
307
-     */
308
-    export function renameSync(oldPath: PathLike, newPath: PathLike): void;
309
-
310
-    /**
311
-     * Asynchronous truncate(2) - Truncate a file to a specified length.
312
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
313
-     * @param len If not specified, defaults to `0`.
314
-     */
315
-    export function truncate(path: PathLike, len: number | undefined | null, callback: NoParamCallback): void;
316
-
317
-    /**
318
-     * Asynchronous truncate(2) - Truncate a file to a specified length.
319
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
320
-     * URL support is _experimental_.
321
-     */
322
-    export function truncate(path: PathLike, callback: NoParamCallback): void;
323
-
324
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
325
-    export namespace truncate {
326
-        /**
327
-         * Asynchronous truncate(2) - Truncate a file to a specified length.
328
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
329
-         * @param len If not specified, defaults to `0`.
330
-         */
331
-        function __promisify__(path: PathLike, len?: number | null): Promise<void>;
332
-    }
333
-
334
-    /**
335
-     * Synchronous truncate(2) - Truncate a file to a specified length.
336
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
337
-     * @param len If not specified, defaults to `0`.
338
-     */
339
-    export function truncateSync(path: PathLike, len?: number | null): void;
340
-
341
-    /**
342
-     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
343
-     * @param fd A file descriptor.
344
-     * @param len If not specified, defaults to `0`.
345
-     */
346
-    export function ftruncate(fd: number, len: number | undefined | null, callback: NoParamCallback): void;
347
-
348
-    /**
349
-     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
350
-     * @param fd A file descriptor.
351
-     */
352
-    export function ftruncate(fd: number, callback: NoParamCallback): void;
353
-
354
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
355
-    export namespace ftruncate {
356
-        /**
357
-         * Asynchronous ftruncate(2) - Truncate a file to a specified length.
358
-         * @param fd A file descriptor.
359
-         * @param len If not specified, defaults to `0`.
360
-         */
361
-        function __promisify__(fd: number, len?: number | null): Promise<void>;
362
-    }
363
-
364
-    /**
365
-     * Synchronous ftruncate(2) - Truncate a file to a specified length.
366
-     * @param fd A file descriptor.
367
-     * @param len If not specified, defaults to `0`.
368
-     */
369
-    export function ftruncateSync(fd: number, len?: number | null): void;
370
-
371
-    /**
372
-     * Asynchronous chown(2) - Change ownership of a file.
373
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
374
-     */
375
-    export function chown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
376
-
377
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
378
-    export namespace chown {
379
-        /**
380
-         * Asynchronous chown(2) - Change ownership of a file.
381
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
382
-         */
383
-        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
384
-    }
385
-
386
-    /**
387
-     * Synchronous chown(2) - Change ownership of a file.
388
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
389
-     */
390
-    export function chownSync(path: PathLike, uid: number, gid: number): void;
391
-
392
-    /**
393
-     * Asynchronous fchown(2) - Change ownership of a file.
394
-     * @param fd A file descriptor.
395
-     */
396
-    export function fchown(fd: number, uid: number, gid: number, callback: NoParamCallback): void;
397
-
398
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
399
-    export namespace fchown {
400
-        /**
401
-         * Asynchronous fchown(2) - Change ownership of a file.
402
-         * @param fd A file descriptor.
403
-         */
404
-        function __promisify__(fd: number, uid: number, gid: number): Promise<void>;
405
-    }
406
-
407
-    /**
408
-     * Synchronous fchown(2) - Change ownership of a file.
409
-     * @param fd A file descriptor.
410
-     */
411
-    export function fchownSync(fd: number, uid: number, gid: number): void;
412
-
413
-    /**
414
-     * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
415
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
416
-     */
417
-    export function lchown(path: PathLike, uid: number, gid: number, callback: NoParamCallback): void;
418
-
419
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
420
-    export namespace lchown {
421
-        /**
422
-         * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
423
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
424
-         */
425
-        function __promisify__(path: PathLike, uid: number, gid: number): Promise<void>;
426
-    }
427
-
428
-    /**
429
-     * Synchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
430
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
431
-     */
432
-    export function lchownSync(path: PathLike, uid: number, gid: number): void;
433
-
434
-    /**
435
-     * Changes the access and modification times of a file in the same way as `fs.utimes()`,
436
-     * with the difference that if the path refers to a symbolic link, then the link is not
437
-     * dereferenced: instead, the timestamps of the symbolic link itself are changed.
438
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
439
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
440
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
441
-     */
442
-    export function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
443
-
444
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
445
-    export namespace lutimes {
446
-        /**
447
-         * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
448
-         * with the difference that if the path refers to a symbolic link, then the link is not
449
-         * dereferenced: instead, the timestamps of the symbolic link itself are changed.
450
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
451
-         * @param atime The last access time. If a string is provided, it will be coerced to number.
452
-         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
453
-         */
454
-        function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
455
-    }
456
-
457
-    /**
458
-     * Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
459
-     * or throws an exception when parameters are incorrect or the operation fails.
460
-     * This is the synchronous version of `fs.lutimes()`.
461
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
462
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
463
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
464
-     */
465
-    export function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
466
-
467
-    /**
468
-     * Asynchronous chmod(2) - Change permissions of a file.
469
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
470
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
471
-     */
472
-    export function chmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
473
-
474
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
475
-    export namespace chmod {
476
-        /**
477
-         * Asynchronous chmod(2) - Change permissions of a file.
478
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
479
-         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
480
-         */
481
-        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
482
-    }
483
-
484
-    /**
485
-     * Synchronous chmod(2) - Change permissions of a file.
486
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
487
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
488
-     */
489
-    export function chmodSync(path: PathLike, mode: Mode): void;
490
-
491
-    /**
492
-     * Asynchronous fchmod(2) - Change permissions of a file.
493
-     * @param fd A file descriptor.
494
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
495
-     */
496
-    export function fchmod(fd: number, mode: Mode, callback: NoParamCallback): void;
497
-
498
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
499
-    export namespace fchmod {
500
-        /**
501
-         * Asynchronous fchmod(2) - Change permissions of a file.
502
-         * @param fd A file descriptor.
503
-         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
504
-         */
505
-        function __promisify__(fd: number, mode: Mode): Promise<void>;
506
-    }
507
-
508
-    /**
509
-     * Synchronous fchmod(2) - Change permissions of a file.
510
-     * @param fd A file descriptor.
511
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
512
-     */
513
-    export function fchmodSync(fd: number, mode: Mode): void;
514
-
515
-    /**
516
-     * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
517
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
518
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
519
-     */
520
-    export function lchmod(path: PathLike, mode: Mode, callback: NoParamCallback): void;
521
-
522
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
523
-    export namespace lchmod {
524
-        /**
525
-         * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
526
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
527
-         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
528
-         */
529
-        function __promisify__(path: PathLike, mode: Mode): Promise<void>;
530
-    }
531
-
532
-    /**
533
-     * Synchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
534
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
535
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
536
-     */
537
-    export function lchmodSync(path: PathLike, mode: Mode): void;
538
-
539
-    /**
540
-     * Asynchronous stat(2) - Get file status.
541
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
542
-     */
543
-    export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
544
-    export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
545
-    export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
546
-    export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
547
-
548
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
549
-    export namespace stat {
550
-        /**
551
-         * Asynchronous stat(2) - Get file status.
552
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
553
-         */
554
-        function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
555
-        function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
556
-        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
557
-    }
558
-
559
-    /**
560
-     * Synchronous stat(2) - Get file status.
561
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
562
-     */
563
-    export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
564
-    export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
565
-    export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
566
-
567
-    /**
568
-     * Asynchronous fstat(2) - Get file status.
569
-     * @param fd A file descriptor.
570
-     */
571
-    export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
572
-    export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
573
-    export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
574
-    export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
575
-
576
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
577
-    export namespace fstat {
578
-        /**
579
-         * Asynchronous fstat(2) - Get file status.
580
-         * @param fd A file descriptor.
581
-         */
582
-        function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise<Stats>;
583
-        function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
584
-        function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
585
-    }
586
-
587
-    /**
588
-     * Synchronous fstat(2) - Get file status.
589
-     * @param fd A file descriptor.
590
-     */
591
-    export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats;
592
-    export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats;
593
-    export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
594
-
595
-    /**
596
-     * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
597
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
598
-     */
599
-    export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
600
-    export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
601
-    export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
602
-    export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
603
-
604
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
605
-    export namespace lstat {
606
-        /**
607
-         * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
608
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
609
-         */
610
-        function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
611
-        function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
612
-        function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
613
-    }
614
-
615
-    /**
616
-     * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
617
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
618
-     */
619
-    export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
620
-    export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
621
-    export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
622
-
623
-    /**
624
-     * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
625
-     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
626
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
627
-     */
628
-    export function link(existingPath: PathLike, newPath: PathLike, callback: NoParamCallback): void;
629
-
630
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
631
-    export namespace link {
632
-        /**
633
-         * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
634
-         * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
635
-         * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
636
-         */
637
-        function __promisify__(existingPath: PathLike, newPath: PathLike): Promise<void>;
638
-    }
639
-
640
-    /**
641
-     * Synchronous link(2) - Create a new link (also known as a hard link) to an existing file.
642
-     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
643
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
644
-     */
645
-    export function linkSync(existingPath: PathLike, newPath: PathLike): void;
646
-
647
-    /**
648
-     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
649
-     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
650
-     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
651
-     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
652
-     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
653
-     */
654
-    export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: NoParamCallback): void;
655
-
656
-    /**
657
-     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
658
-     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
659
-     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
660
-     */
661
-    export function symlink(target: PathLike, path: PathLike, callback: NoParamCallback): void;
662
-
663
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
664
-    export namespace symlink {
665
-        /**
666
-         * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
667
-         * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
668
-         * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
669
-         * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
670
-         * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
671
-         */
672
-        function __promisify__(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
673
-
674
-        type Type = "dir" | "file" | "junction";
675
-    }
676
-
677
-    /**
678
-     * Synchronous symlink(2) - Create a new symbolic link to an existing file.
679
-     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
680
-     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
681
-     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
682
-     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
683
-     */
684
-    export function symlinkSync(target: PathLike, path: PathLike, type?: symlink.Type | null): void;
685
-
686
-    /**
687
-     * Asynchronous readlink(2) - read value of a symbolic link.
688
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
689
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
690
-     */
691
-    export function readlink(
692
-        path: PathLike,
693
-        options: BaseEncodingOptions | BufferEncoding | undefined | null,
694
-        callback: (err: NodeJS.ErrnoException | null, linkString: string) => void
695
-    ): void;
696
-
697
-    /**
698
-     * Asynchronous readlink(2) - read value of a symbolic link.
699
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
700
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
701
-     */
702
-    export function readlink(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
703
-
704
-    /**
705
-     * Asynchronous readlink(2) - read value of a symbolic link.
706
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
707
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
708
-     */
709
-    export function readlink(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
710
-
711
-    /**
712
-     * Asynchronous readlink(2) - read value of a symbolic link.
713
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
714
-     */
715
-    export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
716
-
717
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
718
-    export namespace readlink {
719
-        /**
720
-         * Asynchronous readlink(2) - read value of a symbolic link.
721
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
722
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
723
-         */
724
-        function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
725
-
726
-        /**
727
-         * Asynchronous readlink(2) - read value of a symbolic link.
728
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
729
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
730
-         */
731
-        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
732
-
733
-        /**
734
-         * Asynchronous readlink(2) - read value of a symbolic link.
735
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
736
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
737
-         */
738
-        function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
739
-    }
740
-
741
-    /**
742
-     * Synchronous readlink(2) - read value of a symbolic link.
743
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
744
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
745
-     */
746
-    export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
747
-
748
-    /**
749
-     * Synchronous readlink(2) - read value of a symbolic link.
750
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
751
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
752
-     */
753
-    export function readlinkSync(path: PathLike, options: BufferEncodingOption): Buffer;
754
-
755
-    /**
756
-     * Synchronous readlink(2) - read value of a symbolic link.
757
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
758
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
759
-     */
760
-    export function readlinkSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
761
-
762
-    /**
763
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
764
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
765
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
766
-     */
767
-    export function realpath(
768
-        path: PathLike,
769
-        options: BaseEncodingOptions | BufferEncoding | undefined | null,
770
-        callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
771
-    ): void;
772
-
773
-    /**
774
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
775
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
776
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
777
-     */
778
-    export function realpath(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
779
-
780
-    /**
781
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
782
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
783
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
784
-     */
785
-    export function realpath(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
786
-
787
-    /**
788
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
789
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
790
-     */
791
-    export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
792
-
793
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
794
-    export namespace realpath {
795
-        /**
796
-         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
797
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
798
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
799
-         */
800
-        function __promisify__(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
801
-
802
-        /**
803
-         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
804
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
805
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
806
-         */
807
-        function __promisify__(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
808
-
809
-        /**
810
-         * Asynchronous realpath(3) - return the canonicalized absolute pathname.
811
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
812
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
813
-         */
814
-        function __promisify__(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
815
-
816
-        function native(
817
-            path: PathLike,
818
-            options: BaseEncodingOptions | BufferEncoding | undefined | null,
819
-            callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
820
-        ): void;
821
-        function native(path: PathLike, options: BufferEncodingOption, callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
822
-        function native(path: PathLike, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
823
-        function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
824
-    }
825
-
826
-    /**
827
-     * Synchronous realpath(3) - return the canonicalized absolute pathname.
828
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
829
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
830
-     */
831
-    export function realpathSync(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
832
-
833
-    /**
834
-     * Synchronous realpath(3) - return the canonicalized absolute pathname.
835
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
836
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
837
-     */
838
-    export function realpathSync(path: PathLike, options: BufferEncodingOption): Buffer;
839
-
840
-    /**
841
-     * Synchronous realpath(3) - return the canonicalized absolute pathname.
842
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
843
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
844
-     */
845
-    export function realpathSync(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
846
-
847
-    export namespace realpathSync {
848
-        function native(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): string;
849
-        function native(path: PathLike, options: BufferEncodingOption): Buffer;
850
-        function native(path: PathLike, options?: BaseEncodingOptions | string | null): string | Buffer;
851
-    }
852
-
853
-    /**
854
-     * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
855
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
856
-     */
857
-    export function unlink(path: PathLike, callback: NoParamCallback): void;
858
-
859
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
860
-    export namespace unlink {
861
-        /**
862
-         * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
863
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
864
-         */
865
-        function __promisify__(path: PathLike): Promise<void>;
866
-    }
867
-
868
-    /**
869
-     * Synchronous unlink(2) - delete a name and possibly the file it refers to.
870
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
871
-     */
872
-    export function unlinkSync(path: PathLike): void;
873
-
874
-    export interface RmDirOptions {
875
-        /**
876
-         * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
877
-         * `EPERM` error is encountered, Node.js will retry the operation with a linear
878
-         * backoff wait of `retryDelay` ms longer on each try. This option represents the
879
-         * number of retries. This option is ignored if the `recursive` option is not
880
-         * `true`.
881
-         * @default 0
882
-         */
883
-        maxRetries?: number;
884
-        /**
885
-         * @deprecated since v14.14.0 In future versions of Node.js,
886
-         * `fs.rmdir(path, { recursive: true })` will throw on nonexistent
887
-         * paths, or when given a file as a target.
888
-         * Use `fs.rm(path, { recursive: true, force: true })` instead.
889
-         *
890
-         * If `true`, perform a recursive directory removal. In
891
-         * recursive mode, errors are not reported if `path` does not exist, and
892
-         * operations are retried on failure.
893
-         * @default false
894
-         */
895
-        recursive?: boolean;
896
-        /**
897
-         * The amount of time in milliseconds to wait between retries.
898
-         * This option is ignored if the `recursive` option is not `true`.
899
-         * @default 100
900
-         */
901
-        retryDelay?: number;
902
-    }
903
-
904
-    /**
905
-     * Asynchronous rmdir(2) - delete a directory.
906
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
907
-     */
908
-    export function rmdir(path: PathLike, callback: NoParamCallback): void;
909
-    export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
910
-
911
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
912
-    export namespace rmdir {
913
-        /**
914
-         * Asynchronous rmdir(2) - delete a directory.
915
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
916
-         */
917
-        function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
918
-    }
919
-
920
-    /**
921
-     * Synchronous rmdir(2) - delete a directory.
922
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
923
-     */
924
-    export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
925
-
926
-    export interface RmOptions {
927
-        /**
928
-         * When `true`, exceptions will be ignored if `path` does not exist.
929
-         * @default false
930
-         */
931
-        force?: boolean;
932
-        /**
933
-         * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
934
-         * `EPERM` error is encountered, Node.js will retry the operation with a linear
935
-         * backoff wait of `retryDelay` ms longer on each try. This option represents the
936
-         * number of retries. This option is ignored if the `recursive` option is not
937
-         * `true`.
938
-         * @default 0
939
-         */
940
-        maxRetries?: number;
941
-        /**
942
-         * If `true`, perform a recursive directory removal. In
943
-         * recursive mode, errors are not reported if `path` does not exist, and
944
-         * operations are retried on failure.
945
-         * @default false
946
-         */
947
-        recursive?: boolean;
948
-        /**
949
-         * The amount of time in milliseconds to wait between retries.
950
-         * This option is ignored if the `recursive` option is not `true`.
951
-         * @default 100
952
-         */
953
-        retryDelay?: number;
954
-    }
955
-
956
-    /**
957
-     * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
958
-     */
959
-    export function rm(path: PathLike, callback: NoParamCallback): void;
960
-    export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
961
-
962
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
963
-    export namespace rm {
964
-        /**
965
-         * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
966
-         */
967
-        function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
968
-    }
969
-
970
-    /**
971
-     * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility).
972
-     */
973
-    export function rmSync(path: PathLike, options?: RmOptions): void;
974
-
975
-    export interface MakeDirectoryOptions {
976
-        /**
977
-         * Indicates whether parent folders should be created.
978
-         * If a folder was created, the path to the first created folder will be returned.
979
-         * @default false
980
-         */
981
-        recursive?: boolean;
982
-        /**
983
-         * A file mode. If a string is passed, it is parsed as an octal integer. If not specified
984
-         * @default 0o777
985
-         */
986
-        mode?: Mode;
987
-    }
988
-
989
-    /**
990
-     * Asynchronous mkdir(2) - create a directory.
991
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
992
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
993
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
994
-     */
995
-    export function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true }, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
996
-
997
-    /**
998
-     * Asynchronous mkdir(2) - create a directory.
999
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1000
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1001
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1002
-     */
1003
-    export function mkdir(path: PathLike, options: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null | undefined, callback: NoParamCallback): void;
1004
-
1005
-    /**
1006
-     * Asynchronous mkdir(2) - create a directory.
1007
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1008
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1009
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1010
-     */
1011
-    export function mkdir(path: PathLike, options: Mode | MakeDirectoryOptions | null | undefined, callback: (err: NodeJS.ErrnoException | null, path?: string) => void): void;
1012
-
1013
-    /**
1014
-     * Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
1015
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1016
-     */
1017
-    export function mkdir(path: PathLike, callback: NoParamCallback): void;
1018
-
1019
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1020
-    export namespace mkdir {
1021
-        /**
1022
-         * Asynchronous mkdir(2) - create a directory.
1023
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1024
-         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1025
-         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1026
-         */
1027
-        function __promisify__(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
1028
-
1029
-        /**
1030
-         * Asynchronous mkdir(2) - create a directory.
1031
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1032
-         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1033
-         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1034
-         */
1035
-        function __promisify__(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
1036
-
1037
-        /**
1038
-         * Asynchronous mkdir(2) - create a directory.
1039
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1040
-         * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1041
-         * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1042
-         */
1043
-        function __promisify__(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
1044
-    }
1045
-
1046
-    /**
1047
-     * Synchronous mkdir(2) - create a directory.
1048
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1049
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1050
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1051
-     */
1052
-    export function mkdirSync(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): string | undefined;
1053
-
1054
-    /**
1055
-     * Synchronous mkdir(2) - create a directory.
1056
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1057
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1058
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1059
-     */
1060
-    export function mkdirSync(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): void;
1061
-
1062
-    /**
1063
-     * Synchronous mkdir(2) - create a directory.
1064
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1065
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
1066
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
1067
-     */
1068
-    export function mkdirSync(path: PathLike, options?: Mode | MakeDirectoryOptions | null): string | undefined;
1069
-
1070
-    /**
1071
-     * Asynchronously creates a unique temporary directory.
1072
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1073
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1074
-     */
1075
-    export function mkdtemp(prefix: string, options: BaseEncodingOptions | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
1076
-
1077
-    /**
1078
-     * Asynchronously creates a unique temporary directory.
1079
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1080
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1081
-     */
1082
-    export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
1083
-
1084
-    /**
1085
-     * Asynchronously creates a unique temporary directory.
1086
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1087
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1088
-     */
1089
-    export function mkdtemp(prefix: string, options: BaseEncodingOptions | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
1090
-
1091
-    /**
1092
-     * Asynchronously creates a unique temporary directory.
1093
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1094
-     */
1095
-    export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
1096
-
1097
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1098
-    export namespace mkdtemp {
1099
-        /**
1100
-         * Asynchronously creates a unique temporary directory.
1101
-         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1102
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1103
-         */
1104
-        function __promisify__(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
1105
-
1106
-        /**
1107
-         * Asynchronously creates a unique temporary directory.
1108
-         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1109
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1110
-         */
1111
-        function __promisify__(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
1112
-
1113
-        /**
1114
-         * Asynchronously creates a unique temporary directory.
1115
-         * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1116
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1117
-         */
1118
-        function __promisify__(prefix: string, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
1119
-    }
1120
-
1121
-    /**
1122
-     * Synchronously creates a unique temporary directory.
1123
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1124
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1125
-     */
1126
-    export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): string;
1127
-
1128
-    /**
1129
-     * Synchronously creates a unique temporary directory.
1130
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1131
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1132
-     */
1133
-    export function mkdtempSync(prefix: string, options: BufferEncodingOption): Buffer;
1134
-
1135
-    /**
1136
-     * Synchronously creates a unique temporary directory.
1137
-     * Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
1138
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1139
-     */
1140
-    export function mkdtempSync(prefix: string, options?: BaseEncodingOptions | string | null): string | Buffer;
1141
-
1142
-    /**
1143
-     * Asynchronous readdir(3) - read a directory.
1144
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1145
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1146
-     */
1147
-    export function readdir(
1148
-        path: PathLike,
1149
-        options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null,
1150
-        callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
1151
-    ): void;
1152
-
1153
-    /**
1154
-     * Asynchronous readdir(3) - read a directory.
1155
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1156
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1157
-     */
1158
-    export function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
1159
-
1160
-    /**
1161
-     * Asynchronous readdir(3) - read a directory.
1162
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1163
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1164
-     */
1165
-    export function readdir(
1166
-        path: PathLike,
1167
-        options: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | undefined | null,
1168
-        callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void,
1169
-    ): void;
1170
-
1171
-    /**
1172
-     * Asynchronous readdir(3) - read a directory.
1173
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1174
-     */
1175
-    export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
1176
-
1177
-    /**
1178
-     * Asynchronous readdir(3) - read a directory.
1179
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1180
-     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
1181
-     */
1182
-    export function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
1183
-
1184
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1185
-    export namespace readdir {
1186
-        /**
1187
-         * Asynchronous readdir(3) - read a directory.
1188
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1189
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1190
-         */
1191
-        function __promisify__(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
1192
-
1193
-        /**
1194
-         * Asynchronous readdir(3) - read a directory.
1195
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1196
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1197
-         */
1198
-        function __promisify__(path: PathLike, options: "buffer" | { encoding: "buffer"; withFileTypes?: false }): Promise<Buffer[]>;
1199
-
1200
-        /**
1201
-         * Asynchronous readdir(3) - read a directory.
1202
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1203
-         * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1204
-         */
1205
-        function __promisify__(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
1206
-
1207
-        /**
1208
-         * Asynchronous readdir(3) - read a directory.
1209
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1210
-         * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
1211
-         */
1212
-        function __promisify__(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
1213
-    }
1214
-
1215
-    /**
1216
-     * Synchronous readdir(3) - read a directory.
1217
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1218
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1219
-     */
1220
-    export function readdirSync(path: PathLike, options?: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | null): string[];
1221
-
1222
-    /**
1223
-     * Synchronous readdir(3) - read a directory.
1224
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1225
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1226
-     */
1227
-    export function readdirSync(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Buffer[];
1228
-
1229
-    /**
1230
-     * Synchronous readdir(3) - read a directory.
1231
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1232
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
1233
-     */
1234
-    export function readdirSync(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): string[] | Buffer[];
1235
-
1236
-    /**
1237
-     * Synchronous readdir(3) - read a directory.
1238
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1239
-     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
1240
-     */
1241
-    export function readdirSync(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Dirent[];
1242
-
1243
-    /**
1244
-     * Asynchronous close(2) - close a file descriptor.
1245
-     * @param fd A file descriptor.
1246
-     */
1247
-    export function close(fd: number, callback: NoParamCallback): void;
1248
-
1249
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1250
-    export namespace close {
1251
-        /**
1252
-         * Asynchronous close(2) - close a file descriptor.
1253
-         * @param fd A file descriptor.
1254
-         */
1255
-        function __promisify__(fd: number): Promise<void>;
1256
-    }
1257
-
1258
-    /**
1259
-     * Synchronous close(2) - close a file descriptor.
1260
-     * @param fd A file descriptor.
1261
-     */
1262
-    export function closeSync(fd: number): void;
1263
-
1264
-    /**
1265
-     * Asynchronous open(2) - open and possibly create a file.
1266
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1267
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1268
-     */
1269
-    export function open(path: PathLike, flags: OpenMode, mode: Mode | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1270
-
1271
-    /**
1272
-     * Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
1273
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1274
-     */
1275
-    export function open(path: PathLike, flags: OpenMode, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
1276
-
1277
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1278
-    export namespace open {
1279
-        /**
1280
-         * Asynchronous open(2) - open and possibly create a file.
1281
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1282
-         * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1283
-         */
1284
-        function __promisify__(path: PathLike, flags: OpenMode, mode?: Mode | null): Promise<number>;
1285
-    }
1286
-
1287
-    /**
1288
-     * Synchronous open(2) - open and possibly create a file, returning a file descriptor..
1289
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1290
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
1291
-     */
1292
-    export function openSync(path: PathLike, flags: OpenMode, mode?: Mode | null): number;
1293
-
1294
-    /**
1295
-     * Asynchronously change file timestamps of the file referenced by the supplied path.
1296
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1297
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
1298
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1299
-     */
1300
-    export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
1301
-
1302
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1303
-    export namespace utimes {
1304
-        /**
1305
-         * Asynchronously change file timestamps of the file referenced by the supplied path.
1306
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1307
-         * @param atime The last access time. If a string is provided, it will be coerced to number.
1308
-         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1309
-         */
1310
-        function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
1311
-    }
1312
-
1313
-    /**
1314
-     * Synchronously change file timestamps of the file referenced by the supplied path.
1315
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1316
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
1317
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1318
-     */
1319
-    export function utimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
1320
-
1321
-    /**
1322
-     * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
1323
-     * @param fd A file descriptor.
1324
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
1325
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1326
-     */
1327
-    export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
1328
-
1329
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1330
-    export namespace futimes {
1331
-        /**
1332
-         * Asynchronously change file timestamps of the file referenced by the supplied file descriptor.
1333
-         * @param fd A file descriptor.
1334
-         * @param atime The last access time. If a string is provided, it will be coerced to number.
1335
-         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1336
-         */
1337
-        function __promisify__(fd: number, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
1338
-    }
1339
-
1340
-    /**
1341
-     * Synchronously change file timestamps of the file referenced by the supplied file descriptor.
1342
-     * @param fd A file descriptor.
1343
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
1344
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
1345
-     */
1346
-    export function futimesSync(fd: number, atime: string | number | Date, mtime: string | number | Date): void;
1347
-
1348
-    /**
1349
-     * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1350
-     * @param fd A file descriptor.
1351
-     */
1352
-    export function fsync(fd: number, callback: NoParamCallback): void;
1353
-
1354
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1355
-    export namespace fsync {
1356
-        /**
1357
-         * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1358
-         * @param fd A file descriptor.
1359
-         */
1360
-        function __promisify__(fd: number): Promise<void>;
1361
-    }
1362
-
1363
-    /**
1364
-     * Synchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
1365
-     * @param fd A file descriptor.
1366
-     */
1367
-    export function fsyncSync(fd: number): void;
1368
-
1369
-    /**
1370
-     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1371
-     * @param fd A file descriptor.
1372
-     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1373
-     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1374
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1375
-     */
1376
-    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1377
-        fd: number,
1378
-        buffer: TBuffer,
1379
-        offset: number | undefined | null,
1380
-        length: number | undefined | null,
1381
-        position: number | undefined | null,
1382
-        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
1383
-    ): void;
1384
-
1385
-    /**
1386
-     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1387
-     * @param fd A file descriptor.
1388
-     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1389
-     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1390
-     */
1391
-    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1392
-        fd: number,
1393
-        buffer: TBuffer,
1394
-        offset: number | undefined | null,
1395
-        length: number | undefined | null,
1396
-        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
1397
-    ): void;
1398
-
1399
-    /**
1400
-     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1401
-     * @param fd A file descriptor.
1402
-     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1403
-     */
1404
-    export function write<TBuffer extends NodeJS.ArrayBufferView>(
1405
-        fd: number,
1406
-        buffer: TBuffer,
1407
-        offset: number | undefined | null,
1408
-        callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
1409
-    ): void;
1410
-
1411
-    /**
1412
-     * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1413
-     * @param fd A file descriptor.
1414
-     */
1415
-    export function write<TBuffer extends NodeJS.ArrayBufferView>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
1416
-
1417
-    /**
1418
-     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1419
-     * @param fd A file descriptor.
1420
-     * @param string A string to write.
1421
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1422
-     * @param encoding The expected string encoding.
1423
-     */
1424
-    export function write(
1425
-        fd: number,
1426
-        string: string,
1427
-        position: number | undefined | null,
1428
-        encoding: BufferEncoding | undefined | null,
1429
-        callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
1430
-    ): void;
1431
-
1432
-    /**
1433
-     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1434
-     * @param fd A file descriptor.
1435
-     * @param string A string to write.
1436
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1437
-     */
1438
-    export function write(fd: number, string: string, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
1439
-
1440
-    /**
1441
-     * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1442
-     * @param fd A file descriptor.
1443
-     * @param string A string to write.
1444
-     */
1445
-    export function write(fd: number, string: string, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
1446
-
1447
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1448
-    export namespace write {
1449
-        /**
1450
-         * Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
1451
-         * @param fd A file descriptor.
1452
-         * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1453
-         * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1454
-         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1455
-         */
1456
-        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
1457
-            fd: number,
1458
-            buffer?: TBuffer,
1459
-            offset?: number,
1460
-            length?: number,
1461
-            position?: number | null,
1462
-        ): Promise<{ bytesWritten: number, buffer: TBuffer }>;
1463
-
1464
-        /**
1465
-         * Asynchronously writes `string` to the file referenced by the supplied file descriptor.
1466
-         * @param fd A file descriptor.
1467
-         * @param string A string to write.
1468
-         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1469
-         * @param encoding The expected string encoding.
1470
-         */
1471
-        function __promisify__(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
1472
-    }
1473
-
1474
-    /**
1475
-     * Synchronously writes `buffer` to the file referenced by the supplied file descriptor, returning the number of bytes written.
1476
-     * @param fd A file descriptor.
1477
-     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
1478
-     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
1479
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1480
-     */
1481
-    export function writeSync(fd: number, buffer: NodeJS.ArrayBufferView, offset?: number | null, length?: number | null, position?: number | null): number;
1482
-
1483
-    /**
1484
-     * Synchronously writes `string` to the file referenced by the supplied file descriptor, returning the number of bytes written.
1485
-     * @param fd A file descriptor.
1486
-     * @param string A string to write.
1487
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
1488
-     * @param encoding The expected string encoding.
1489
-     */
1490
-    export function writeSync(fd: number, string: string, position?: number | null, encoding?: BufferEncoding | null): number;
1491
-
1492
-    /**
1493
-     * Asynchronously reads data from the file referenced by the supplied file descriptor.
1494
-     * @param fd A file descriptor.
1495
-     * @param buffer The buffer that the data will be written to.
1496
-     * @param offset The offset in the buffer at which to start writing.
1497
-     * @param length The number of bytes to read.
1498
-     * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1499
-     */
1500
-    export function read<TBuffer extends NodeJS.ArrayBufferView>(
1501
-        fd: number,
1502
-        buffer: TBuffer,
1503
-        offset: number,
1504
-        length: number,
1505
-        position: number | null,
1506
-        callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
1507
-    ): void;
1508
-
1509
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1510
-    export namespace read {
1511
-        /**
1512
-         * @param fd A file descriptor.
1513
-         * @param buffer The buffer that the data will be written to.
1514
-         * @param offset The offset in the buffer at which to start writing.
1515
-         * @param length The number of bytes to read.
1516
-         * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1517
-         */
1518
-        function __promisify__<TBuffer extends NodeJS.ArrayBufferView>(
1519
-            fd: number,
1520
-            buffer: TBuffer,
1521
-            offset: number,
1522
-            length: number,
1523
-            position: number | null
1524
-        ): Promise<{ bytesRead: number, buffer: TBuffer }>;
1525
-    }
1526
-
1527
-    export interface ReadSyncOptions {
1528
-        /**
1529
-         * @default 0
1530
-         */
1531
-        offset?: number;
1532
-        /**
1533
-         * @default `length of buffer`
1534
-         */
1535
-        length?: number;
1536
-        /**
1537
-         * @default null
1538
-         */
1539
-        position?: number | null;
1540
-    }
1541
-
1542
-    /**
1543
-     * Synchronously reads data from the file referenced by the supplied file descriptor, returning the number of bytes read.
1544
-     * @param fd A file descriptor.
1545
-     * @param buffer The buffer that the data will be written to.
1546
-     * @param offset The offset in the buffer at which to start writing.
1547
-     * @param length The number of bytes to read.
1548
-     * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
1549
-     */
1550
-    export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, offset: number, length: number, position: number | null): number;
1551
-
1552
-    /**
1553
-     * Similar to the above `fs.readSync` function, this version takes an optional `options` object.
1554
-     * If no `options` object is specified, it will default with the above values.
1555
-     */
1556
-    export function readSync(fd: number, buffer: NodeJS.ArrayBufferView, opts?: ReadSyncOptions): number;
1557
-
1558
-    /**
1559
-     * Asynchronously reads the entire contents of a file.
1560
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1561
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1562
-     * @param options An object that may contain an optional flag.
1563
-     * If a flag is not provided, it defaults to `'r'`.
1564
-     */
1565
-    export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
1566
-
1567
-    /**
1568
-     * Asynchronously reads the entire contents of a file.
1569
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1570
-     * URL support is _experimental_.
1571
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1572
-     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1573
-     * If a flag is not provided, it defaults to `'r'`.
1574
-     */
1575
-    export function readFile(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
1576
-
1577
-    /**
1578
-     * Asynchronously reads the entire contents of a file.
1579
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1580
-     * URL support is _experimental_.
1581
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1582
-     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1583
-     * If a flag is not provided, it defaults to `'r'`.
1584
-     */
1585
-    export function readFile(
1586
-        path: PathLike | number,
1587
-        options: BaseEncodingOptions & { flag?: string; } | string | undefined | null,
1588
-        callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
1589
-    ): void;
1590
-
1591
-    /**
1592
-     * Asynchronously reads the entire contents of a file.
1593
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1594
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1595
-     */
1596
-    export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
1597
-
1598
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1599
-    export namespace readFile {
1600
-        /**
1601
-         * Asynchronously reads the entire contents of a file.
1602
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1603
-         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1604
-         * @param options An object that may contain an optional flag.
1605
-         * If a flag is not provided, it defaults to `'r'`.
1606
-         */
1607
-        function __promisify__(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Promise<Buffer>;
1608
-
1609
-        /**
1610
-         * Asynchronously reads the entire contents of a file.
1611
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1612
-         * URL support is _experimental_.
1613
-         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1614
-         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1615
-         * If a flag is not provided, it defaults to `'r'`.
1616
-         */
1617
-        function __promisify__(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | string): Promise<string>;
1618
-
1619
-        /**
1620
-         * Asynchronously reads the entire contents of a file.
1621
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1622
-         * URL support is _experimental_.
1623
-         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1624
-         * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1625
-         * If a flag is not provided, it defaults to `'r'`.
1626
-         */
1627
-        function __promisify__(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | string | null): Promise<string | Buffer>;
1628
-    }
1629
-
1630
-    /**
1631
-     * Synchronously reads the entire contents of a file.
1632
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1633
-     * URL support is _experimental_.
1634
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1635
-     * @param options An object that may contain an optional flag. If a flag is not provided, it defaults to `'r'`.
1636
-     */
1637
-    export function readFileSync(path: PathLike | number, options?: { encoding?: null; flag?: string; } | null): Buffer;
1638
-
1639
-    /**
1640
-     * Synchronously reads the entire contents of a file.
1641
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1642
-     * URL support is _experimental_.
1643
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1644
-     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1645
-     * If a flag is not provided, it defaults to `'r'`.
1646
-     */
1647
-    export function readFileSync(path: PathLike | number, options: { encoding: BufferEncoding; flag?: string; } | BufferEncoding): string;
1648
-
1649
-    /**
1650
-     * Synchronously reads the entire contents of a file.
1651
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1652
-     * URL support is _experimental_.
1653
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1654
-     * @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
1655
-     * If a flag is not provided, it defaults to `'r'`.
1656
-     */
1657
-    export function readFileSync(path: PathLike | number, options?: BaseEncodingOptions & { flag?: string; } | BufferEncoding | null): string | Buffer;
1658
-
1659
-    export type WriteFileOptions = BaseEncodingOptions & { mode?: Mode; flag?: string; } | string | null;
1660
-
1661
-    /**
1662
-     * Asynchronously writes data to a file, replacing the file if it already exists.
1663
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1664
-     * URL support is _experimental_.
1665
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1666
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1667
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1668
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1669
-     * If `mode` is not supplied, the default of `0o666` is used.
1670
-     * If `mode` is a string, it is parsed as an octal integer.
1671
-     * If `flag` is not supplied, the default of `'w'` is used.
1672
-     */
1673
-    export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options: WriteFileOptions, callback: NoParamCallback): void;
1674
-
1675
-    /**
1676
-     * Asynchronously writes data to a file, replacing the file if it already exists.
1677
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1678
-     * URL support is _experimental_.
1679
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1680
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1681
-     */
1682
-    export function writeFile(path: PathLike | number, data: string | NodeJS.ArrayBufferView, callback: NoParamCallback): void;
1683
-
1684
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1685
-    export namespace writeFile {
1686
-        /**
1687
-         * Asynchronously writes data to a file, replacing the file if it already exists.
1688
-         * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1689
-         * URL support is _experimental_.
1690
-         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1691
-         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1692
-         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1693
-         * If `encoding` is not supplied, the default of `'utf8'` is used.
1694
-         * If `mode` is not supplied, the default of `0o666` is used.
1695
-         * If `mode` is a string, it is parsed as an octal integer.
1696
-         * If `flag` is not supplied, the default of `'w'` is used.
1697
-         */
1698
-        function __promisify__(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): Promise<void>;
1699
-    }
1700
-
1701
-    /**
1702
-     * Synchronously writes data to a file, replacing the file if it already exists.
1703
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
1704
-     * URL support is _experimental_.
1705
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1706
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1707
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1708
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1709
-     * If `mode` is not supplied, the default of `0o666` is used.
1710
-     * If `mode` is a string, it is parsed as an octal integer.
1711
-     * If `flag` is not supplied, the default of `'w'` is used.
1712
-     */
1713
-    export function writeFileSync(path: PathLike | number, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions): void;
1714
-
1715
-    /**
1716
-     * Asynchronously append data to a file, creating the file if it does not exist.
1717
-     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1718
-     * URL support is _experimental_.
1719
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1720
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1721
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1722
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1723
-     * If `mode` is not supplied, the default of `0o666` is used.
1724
-     * If `mode` is a string, it is parsed as an octal integer.
1725
-     * If `flag` is not supplied, the default of `'a'` is used.
1726
-     */
1727
-    export function appendFile(file: PathLike | number, data: string | Uint8Array, options: WriteFileOptions, callback: NoParamCallback): void;
1728
-
1729
-    /**
1730
-     * Asynchronously append data to a file, creating the file if it does not exist.
1731
-     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1732
-     * URL support is _experimental_.
1733
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1734
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1735
-     */
1736
-    export function appendFile(file: PathLike | number, data: string | Uint8Array, callback: NoParamCallback): void;
1737
-
1738
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1739
-    export namespace appendFile {
1740
-        /**
1741
-         * Asynchronously append data to a file, creating the file if it does not exist.
1742
-         * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1743
-         * URL support is _experimental_.
1744
-         * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1745
-         * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1746
-         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1747
-         * If `encoding` is not supplied, the default of `'utf8'` is used.
1748
-         * If `mode` is not supplied, the default of `0o666` is used.
1749
-         * If `mode` is a string, it is parsed as an octal integer.
1750
-         * If `flag` is not supplied, the default of `'a'` is used.
1751
-         */
1752
-        function __promisify__(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): Promise<void>;
1753
-    }
1754
-
1755
-    /**
1756
-     * Synchronously append data to a file, creating the file if it does not exist.
1757
-     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
1758
-     * URL support is _experimental_.
1759
-     * If a file descriptor is provided, the underlying file will _not_ be closed automatically.
1760
-     * @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
1761
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
1762
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1763
-     * If `mode` is not supplied, the default of `0o666` is used.
1764
-     * If `mode` is a string, it is parsed as an octal integer.
1765
-     * If `flag` is not supplied, the default of `'a'` is used.
1766
-     */
1767
-    export function appendFileSync(file: PathLike | number, data: string | Uint8Array, options?: WriteFileOptions): void;
1768
-
1769
-    /**
1770
-     * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
1771
-     */
1772
-    export function watchFile(filename: PathLike, options: { persistent?: boolean; interval?: number; } | undefined, listener: (curr: Stats, prev: Stats) => void): void;
1773
-
1774
-    /**
1775
-     * Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.
1776
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1777
-     * URL support is _experimental_.
1778
-     */
1779
-    export function watchFile(filename: PathLike, listener: (curr: Stats, prev: Stats) => void): void;
1780
-
1781
-    /**
1782
-     * Stop watching for changes on `filename`.
1783
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1784
-     * URL support is _experimental_.
1785
-     */
1786
-    export function unwatchFile(filename: PathLike, listener?: (curr: Stats, prev: Stats) => void): void;
1787
-
1788
-    /**
1789
-     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1790
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1791
-     * URL support is _experimental_.
1792
-     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1793
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1794
-     * If `persistent` is not supplied, the default of `true` is used.
1795
-     * If `recursive` is not supplied, the default of `false` is used.
1796
-     */
1797
-    export function watch(
1798
-        filename: PathLike,
1799
-        options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null,
1800
-        listener?: (event: "rename" | "change", filename: string) => void,
1801
-    ): FSWatcher;
1802
-
1803
-    /**
1804
-     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1805
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1806
-     * URL support is _experimental_.
1807
-     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1808
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1809
-     * If `persistent` is not supplied, the default of `true` is used.
1810
-     * If `recursive` is not supplied, the default of `false` is used.
1811
-     */
1812
-    export function watch(
1813
-        filename: PathLike,
1814
-        options: { encoding: "buffer", persistent?: boolean, recursive?: boolean; } | "buffer",
1815
-        listener?: (event: "rename" | "change", filename: Buffer) => void
1816
-    ): FSWatcher;
1817
-
1818
-    /**
1819
-     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1820
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1821
-     * URL support is _experimental_.
1822
-     * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1823
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
1824
-     * If `persistent` is not supplied, the default of `true` is used.
1825
-     * If `recursive` is not supplied, the default of `false` is used.
1826
-     */
1827
-    export function watch(
1828
-        filename: PathLike,
1829
-        options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | string | null,
1830
-        listener?: (event: "rename" | "change", filename: string | Buffer) => void,
1831
-    ): FSWatcher;
1832
-
1833
-    /**
1834
-     * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1835
-     * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1836
-     * URL support is _experimental_.
1837
-     */
1838
-    export function watch(filename: PathLike, listener?: (event: "rename" | "change", filename: string) => any): FSWatcher;
1839
-
1840
-    /**
1841
-     * Asynchronously tests whether or not the given path exists by checking with the file system.
1842
-     * @deprecated since v1.0.0 Use `fs.stat()` or `fs.access()` instead
1843
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1844
-     * URL support is _experimental_.
1845
-     */
1846
-    export function exists(path: PathLike, callback: (exists: boolean) => void): void;
1847
-
1848
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
1849
-    export namespace exists {
1850
-        /**
1851
-         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1852
-         * URL support is _experimental_.
1853
-         */
1854
-        function __promisify__(path: PathLike): Promise<boolean>;
1855
-    }
1856
-
1857
-    /**
1858
-     * Synchronously tests whether or not the given path exists by checking with the file system.
1859
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1860
-     * URL support is _experimental_.
1861
-     */
1862
-    export function existsSync(path: PathLike): boolean;
1863
-
1864
-    export namespace constants {
1865
-        // File Access Constants
1866
-
1867
-        /** Constant for fs.access(). File is visible to the calling process. */
1868
-        const F_OK: number;
1869
-
1870
-        /** Constant for fs.access(). File can be read by the calling process. */
1871
-        const R_OK: number;
1872
-
1873
-        /** Constant for fs.access(). File can be written by the calling process. */
1874
-        const W_OK: number;
1875
-
1876
-        /** Constant for fs.access(). File can be executed by the calling process. */
1877
-        const X_OK: number;
1878
-
1879
-        // File Copy Constants
1880
-
1881
-        /** Constant for fs.copyFile. Flag indicating the destination file should not be overwritten if it already exists. */
1882
-        const COPYFILE_EXCL: number;
1883
-
1884
-        /**
1885
-         * Constant for fs.copyFile. copy operation will attempt to create a copy-on-write reflink.
1886
-         * If the underlying platform does not support copy-on-write, then a fallback copy mechanism is used.
1887
-         */
1888
-        const COPYFILE_FICLONE: number;
1889
-
1890
-        /**
1891
-         * Constant for fs.copyFile. Copy operation will attempt to create a copy-on-write reflink.
1892
-         * If the underlying platform does not support copy-on-write, then the operation will fail with an error.
1893
-         */
1894
-        const COPYFILE_FICLONE_FORCE: number;
1895
-
1896
-        // File Open Constants
1897
-
1898
-        /** Constant for fs.open(). Flag indicating to open a file for read-only access. */
1899
-        const O_RDONLY: number;
1900
-
1901
-        /** Constant for fs.open(). Flag indicating to open a file for write-only access. */
1902
-        const O_WRONLY: number;
1903
-
1904
-        /** Constant for fs.open(). Flag indicating to open a file for read-write access. */
1905
-        const O_RDWR: number;
1906
-
1907
-        /** Constant for fs.open(). Flag indicating to create the file if it does not already exist. */
1908
-        const O_CREAT: number;
1909
-
1910
-        /** Constant for fs.open(). Flag indicating that opening a file should fail if the O_CREAT flag is set and the file already exists. */
1911
-        const O_EXCL: number;
1912
-
1913
-        /**
1914
-         * Constant for fs.open(). Flag indicating that if path identifies a terminal device,
1915
-         * opening the path shall not cause that terminal to become the controlling terminal for the process
1916
-         * (if the process does not already have one).
1917
-         */
1918
-        const O_NOCTTY: number;
1919
-
1920
-        /** Constant for fs.open(). Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero. */
1921
-        const O_TRUNC: number;
1922
-
1923
-        /** Constant for fs.open(). Flag indicating that data will be appended to the end of the file. */
1924
-        const O_APPEND: number;
1925
-
1926
-        /** Constant for fs.open(). Flag indicating that the open should fail if the path is not a directory. */
1927
-        const O_DIRECTORY: number;
1928
-
1929
-        /**
1930
-         * constant for fs.open().
1931
-         * Flag indicating reading accesses to the file system will no longer result in
1932
-         * an update to the atime information associated with the file.
1933
-         * This flag is available on Linux operating systems only.
1934
-         */
1935
-        const O_NOATIME: number;
1936
-
1937
-        /** Constant for fs.open(). Flag indicating that the open should fail if the path is a symbolic link. */
1938
-        const O_NOFOLLOW: number;
1939
-
1940
-        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O. */
1941
-        const O_SYNC: number;
1942
-
1943
-        /** Constant for fs.open(). Flag indicating that the file is opened for synchronous I/O with write operations waiting for data integrity. */
1944
-        const O_DSYNC: number;
1945
-
1946
-        /** Constant for fs.open(). Flag indicating to open the symbolic link itself rather than the resource it is pointing to. */
1947
-        const O_SYMLINK: number;
1948
-
1949
-        /** Constant for fs.open(). When set, an attempt will be made to minimize caching effects of file I/O. */
1950
-        const O_DIRECT: number;
1951
-
1952
-        /** Constant for fs.open(). Flag indicating to open the file in nonblocking mode when possible. */
1953
-        const O_NONBLOCK: number;
1954
-
1955
-        // File Type Constants
1956
-
1957
-        /** Constant for fs.Stats mode property for determining a file's type. Bit mask used to extract the file type code. */
1958
-        const S_IFMT: number;
1959
-
1960
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a regular file. */
1961
-        const S_IFREG: number;
1962
-
1963
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a directory. */
1964
-        const S_IFDIR: number;
1965
-
1966
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a character-oriented device file. */
1967
-        const S_IFCHR: number;
1968
-
1969
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a block-oriented device file. */
1970
-        const S_IFBLK: number;
1971
-
1972
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a FIFO/pipe. */
1973
-        const S_IFIFO: number;
1974
-
1975
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a symbolic link. */
1976
-        const S_IFLNK: number;
1977
-
1978
-        /** Constant for fs.Stats mode property for determining a file's type. File type constant for a socket. */
1979
-        const S_IFSOCK: number;
1980
-
1981
-        // File Mode Constants
1982
-
1983
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by owner. */
1984
-        const S_IRWXU: number;
1985
-
1986
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by owner. */
1987
-        const S_IRUSR: number;
1988
-
1989
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by owner. */
1990
-        const S_IWUSR: number;
1991
-
1992
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by owner. */
1993
-        const S_IXUSR: number;
1994
-
1995
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by group. */
1996
-        const S_IRWXG: number;
1997
-
1998
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by group. */
1999
-        const S_IRGRP: number;
2000
-
2001
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by group. */
2002
-        const S_IWGRP: number;
2003
-
2004
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by group. */
2005
-        const S_IXGRP: number;
2006
-
2007
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable, writable and executable by others. */
2008
-        const S_IRWXO: number;
2009
-
2010
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating readable by others. */
2011
-        const S_IROTH: number;
2012
-
2013
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating writable by others. */
2014
-        const S_IWOTH: number;
2015
-
2016
-        /** Constant for fs.Stats mode property for determining access permissions for a file. File mode indicating executable by others. */
2017
-        const S_IXOTH: number;
2018
-
2019
-        /**
2020
-         * When set, a memory file mapping is used to access the file. This flag
2021
-         * is available on Windows operating systems only. On other operating systems,
2022
-         * this flag is ignored.
2023
-         */
2024
-        const UV_FS_O_FILEMAP: number;
2025
-    }
2026
-
2027
-    /**
2028
-     * Asynchronously tests a user's permissions for the file specified by path.
2029
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2030
-     * URL support is _experimental_.
2031
-     */
2032
-    export function access(path: PathLike, mode: number | undefined, callback: NoParamCallback): void;
2033
-
2034
-    /**
2035
-     * Asynchronously tests a user's permissions for the file specified by path.
2036
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2037
-     * URL support is _experimental_.
2038
-     */
2039
-    export function access(path: PathLike, callback: NoParamCallback): void;
2040
-
2041
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2042
-    export namespace access {
2043
-        /**
2044
-         * Asynchronously tests a user's permissions for the file specified by path.
2045
-         * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2046
-         * URL support is _experimental_.
2047
-         */
2048
-        function __promisify__(path: PathLike, mode?: number): Promise<void>;
2049
-    }
2050
-
2051
-    /**
2052
-     * Synchronously tests a user's permissions for the file specified by path.
2053
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
2054
-     * URL support is _experimental_.
2055
-     */
2056
-    export function accessSync(path: PathLike, mode?: number): void;
2057
-
2058
-    /**
2059
-     * Returns a new `ReadStream` object.
2060
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2061
-     * URL support is _experimental_.
2062
-     */
2063
-    export function createReadStream(path: PathLike, options?: string | {
2064
-        flags?: string;
2065
-        encoding?: BufferEncoding;
2066
-        fd?: number;
2067
-        mode?: number;
2068
-        autoClose?: boolean;
2069
-        /**
2070
-         * @default false
2071
-         */
2072
-        emitClose?: boolean;
2073
-        start?: number;
2074
-        end?: number;
2075
-        highWaterMark?: number;
2076
-    }): ReadStream;
2077
-
2078
-    /**
2079
-     * Returns a new `WriteStream` object.
2080
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
2081
-     * URL support is _experimental_.
2082
-     */
2083
-    export function createWriteStream(path: PathLike, options?: string | {
2084
-        flags?: string;
2085
-        encoding?: BufferEncoding;
2086
-        fd?: number;
2087
-        mode?: number;
2088
-        autoClose?: boolean;
2089
-        emitClose?: boolean;
2090
-        start?: number;
2091
-        highWaterMark?: number;
2092
-    }): WriteStream;
2093
-
2094
-    /**
2095
-     * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2096
-     * @param fd A file descriptor.
2097
-     */
2098
-    export function fdatasync(fd: number, callback: NoParamCallback): void;
2099
-
2100
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2101
-    export namespace fdatasync {
2102
-        /**
2103
-         * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2104
-         * @param fd A file descriptor.
2105
-         */
2106
-        function __promisify__(fd: number): Promise<void>;
2107
-    }
2108
-
2109
-    /**
2110
-     * Synchronous fdatasync(2) - synchronize a file's in-core state with storage device.
2111
-     * @param fd A file descriptor.
2112
-     */
2113
-    export function fdatasyncSync(fd: number): void;
2114
-
2115
-    /**
2116
-     * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2117
-     * No arguments other than a possible exception are given to the callback function.
2118
-     * Node.js makes no guarantees about the atomicity of the copy operation.
2119
-     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2120
-     * to remove the destination.
2121
-     * @param src A path to the source file.
2122
-     * @param dest A path to the destination file.
2123
-     */
2124
-    export function copyFile(src: PathLike, dest: PathLike, callback: NoParamCallback): void;
2125
-    /**
2126
-     * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2127
-     * No arguments other than a possible exception are given to the callback function.
2128
-     * Node.js makes no guarantees about the atomicity of the copy operation.
2129
-     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2130
-     * to remove the destination.
2131
-     * @param src A path to the source file.
2132
-     * @param dest A path to the destination file.
2133
-     * @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
2134
-     */
2135
-    export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: NoParamCallback): void;
2136
-
2137
-    // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
2138
-    export namespace copyFile {
2139
-        /**
2140
-         * Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
2141
-         * No arguments other than a possible exception are given to the callback function.
2142
-         * Node.js makes no guarantees about the atomicity of the copy operation.
2143
-         * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2144
-         * to remove the destination.
2145
-         * @param src A path to the source file.
2146
-         * @param dest A path to the destination file.
2147
-         * @param flags An optional integer that specifies the behavior of the copy operation.
2148
-         * The only supported flag is fs.constants.COPYFILE_EXCL,
2149
-         * which causes the copy operation to fail if dest already exists.
2150
-         */
2151
-        function __promisify__(src: PathLike, dst: PathLike, flags?: number): Promise<void>;
2152
-    }
2153
-
2154
-    /**
2155
-     * Synchronously copies src to dest. By default, dest is overwritten if it already exists.
2156
-     * Node.js makes no guarantees about the atomicity of the copy operation.
2157
-     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
2158
-     * to remove the destination.
2159
-     * @param src A path to the source file.
2160
-     * @param dest A path to the destination file.
2161
-     * @param flags An optional integer that specifies the behavior of the copy operation.
2162
-     * The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
2163
-     */
2164
-    export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
2165
-
2166
-    /**
2167
-     * Write an array of ArrayBufferViews to the file specified by fd using writev().
2168
-     * position is the offset from the beginning of the file where this data should be written.
2169
-     * It is unsafe to use fs.writev() multiple times on the same file without waiting for the callback. For this scenario, use fs.createWriteStream().
2170
-     * On Linux, positional writes don't work when the file is opened in append mode.
2171
-     * The kernel ignores the position argument and always appends the data to the end of the file.
2172
-     */
2173
-    export function writev(
2174
-        fd: number,
2175
-        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2176
-        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2177
-    ): void;
2178
-    export function writev(
2179
-        fd: number,
2180
-        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2181
-        position: number,
2182
-        cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2183
-    ): void;
2184
-
2185
-    export interface WriteVResult {
2186
-        bytesWritten: number;
2187
-        buffers: NodeJS.ArrayBufferView[];
2188
-    }
2189
-
2190
-    export namespace writev {
2191
-        function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
2192
-    }
2193
-
2194
-    /**
2195
-     * See `writev`.
2196
-     */
2197
-    export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2198
-
2199
-    export function readv(
2200
-        fd: number,
2201
-        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2202
-        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2203
-    ): void;
2204
-    export function readv(
2205
-        fd: number,
2206
-        buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2207
-        position: number,
2208
-        cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2209
-    ): void;
2210
-
2211
-    export interface ReadVResult {
2212
-        bytesRead: number;
2213
-        buffers: NodeJS.ArrayBufferView[];
2214
-    }
2215
-
2216
-    export namespace readv {
2217
-        function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
2218
-    }
2219
-
2220
-    /**
2221
-     * See `readv`.
2222
-     */
2223
-    export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2224
-
2225
-    export interface OpenDirOptions {
2226
-        encoding?: BufferEncoding;
2227
-        /**
2228
-         * Number of directory entries that are buffered
2229
-         * internally when reading from the directory. Higher values lead to better
2230
-         * performance but higher memory usage.
2231
-         * @default 32
2232
-         */
2233
-        bufferSize?: number;
2234
-    }
2235
-
2236
-    export function opendirSync(path: string, options?: OpenDirOptions): Dir;
2237
-
2238
-    export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
2239
-    export function opendir(path: string, options: OpenDirOptions, cb: (err: NodeJS.ErrnoException | null, dir: Dir) => void): void;
2240
-
2241
-    export namespace opendir {
2242
-        function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
2243
-    }
2244
-
2245
-    export interface BigIntStats extends StatsBase<bigint> {
2246
-    }
2247
-
2248
-    export class BigIntStats {
2249
-        atimeNs: bigint;
2250
-        mtimeNs: bigint;
2251
-        ctimeNs: bigint;
2252
-        birthtimeNs: bigint;
2253
-    }
2254
-
2255
-    export interface BigIntOptions {
2256
-        bigint: true;
2257
-    }
2258
-
2259
-    export interface StatOptions {
2260
-        bigint?: boolean;
2261
-    }
2262
-}
... ...
@@ -1,561 +0,0 @@
1
-declare module 'fs/promises' {
2
-    export * from 'node:fs/promises';
3
-}
4
-
5
-declare module 'node:fs/promises' {
6
-    import {
7
-        Stats,
8
-        BigIntStats,
9
-        StatOptions,
10
-        WriteVResult,
11
-        ReadVResult,
12
-        PathLike,
13
-        RmDirOptions,
14
-        RmOptions,
15
-        MakeDirectoryOptions,
16
-        Dirent,
17
-        OpenDirOptions,
18
-        Dir,
19
-        BaseEncodingOptions,
20
-        BufferEncodingOption,
21
-        OpenMode,
22
-        Mode,
23
-    } from 'node:fs';
24
-
25
-    interface FileHandle {
26
-        /**
27
-         * Gets the file descriptor for this file handle.
28
-         */
29
-        readonly fd: number;
30
-
31
-        /**
32
-         * Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically.
33
-         * The `FileHandle` must have been opened for appending.
34
-         * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
35
-         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
36
-         * If `encoding` is not supplied, the default of `'utf8'` is used.
37
-         * If `mode` is not supplied, the default of `0o666` is used.
38
-         * If `mode` is a string, it is parsed as an octal integer.
39
-         * If `flag` is not supplied, the default of `'a'` is used.
40
-         */
41
-        appendFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
42
-
43
-        /**
44
-         * Asynchronous fchown(2) - Change ownership of a file.
45
-         */
46
-        chown(uid: number, gid: number): Promise<void>;
47
-
48
-        /**
49
-         * Asynchronous fchmod(2) - Change permissions of a file.
50
-         * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
51
-         */
52
-        chmod(mode: Mode): Promise<void>;
53
-
54
-        /**
55
-         * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
56
-         */
57
-        datasync(): Promise<void>;
58
-
59
-        /**
60
-         * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
61
-         */
62
-        sync(): Promise<void>;
63
-
64
-        /**
65
-         * Asynchronously reads data from the file.
66
-         * The `FileHandle` must have been opened for reading.
67
-         * @param buffer The buffer that the data will be written to.
68
-         * @param offset The offset in the buffer at which to start writing.
69
-         * @param length The number of bytes to read.
70
-         * @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
71
-         */
72
-        read<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
73
-
74
-        /**
75
-         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
76
-         * The `FileHandle` must have been opened for reading.
77
-         * @param options An object that may contain an optional flag.
78
-         * If a flag is not provided, it defaults to `'r'`.
79
-         */
80
-        readFile(options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
81
-
82
-        /**
83
-         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
84
-         * The `FileHandle` must have been opened for reading.
85
-         * @param options An object that may contain an optional flag.
86
-         * If a flag is not provided, it defaults to `'r'`.
87
-         */
88
-        readFile(options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
89
-
90
-        /**
91
-         * Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
92
-         * The `FileHandle` must have been opened for reading.
93
-         * @param options An object that may contain an optional flag.
94
-         * If a flag is not provided, it defaults to `'r'`.
95
-         */
96
-        readFile(options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
97
-
98
-        /**
99
-         * Asynchronous fstat(2) - Get file status.
100
-         */
101
-        stat(opts?: StatOptions & { bigint?: false }): Promise<Stats>;
102
-        stat(opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
103
-        stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
104
-
105
-        /**
106
-         * Asynchronous ftruncate(2) - Truncate a file to a specified length.
107
-         * @param len If not specified, defaults to `0`.
108
-         */
109
-        truncate(len?: number): Promise<void>;
110
-
111
-        /**
112
-         * Asynchronously change file timestamps of the file.
113
-         * @param atime The last access time. If a string is provided, it will be coerced to number.
114
-         * @param mtime The last modified time. If a string is provided, it will be coerced to number.
115
-         */
116
-        utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
117
-
118
-        /**
119
-         * Asynchronously writes `buffer` to the file.
120
-         * The `FileHandle` must have been opened for writing.
121
-         * @param buffer The buffer that the data will be written to.
122
-         * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
123
-         * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
124
-         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
125
-         */
126
-        write<TBuffer extends Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
127
-
128
-        /**
129
-         * Asynchronously writes `string` to the file.
130
-         * The `FileHandle` must have been opened for writing.
131
-         * It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise`
132
-         * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
133
-         * @param string A string to write.
134
-         * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
135
-         * @param encoding The expected string encoding.
136
-         */
137
-        write(data: string | Uint8Array, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
138
-
139
-        /**
140
-         * Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically.
141
-         * The `FileHandle` must have been opened for writing.
142
-         * It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
143
-         * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
144
-         * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
145
-         * If `encoding` is not supplied, the default of `'utf8'` is used.
146
-         * If `mode` is not supplied, the default of `0o666` is used.
147
-         * If `mode` is a string, it is parsed as an octal integer.
148
-         * If `flag` is not supplied, the default of `'w'` is used.
149
-         */
150
-        writeFile(data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
151
-
152
-        /**
153
-         * See `fs.writev` promisified version.
154
-         */
155
-        writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
156
-
157
-        /**
158
-         * See `fs.readv` promisified version.
159
-         */
160
-        readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
161
-
162
-        /**
163
-         * Asynchronous close(2) - close a `FileHandle`.
164
-         */
165
-        close(): Promise<void>;
166
-    }
167
-
168
-    /**
169
-     * Asynchronously tests a user's permissions for the file specified by path.
170
-     * @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
171
-     * URL support is _experimental_.
172
-     */
173
-    function access(path: PathLike, mode?: number): Promise<void>;
174
-
175
-    /**
176
-     * Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
177
-     * Node.js makes no guarantees about the atomicity of the copy operation.
178
-     * If an error occurs after the destination file has been opened for writing, Node.js will attempt
179
-     * to remove the destination.
180
-     * @param src A path to the source file.
181
-     * @param dest A path to the destination file.
182
-     * @param flags An optional integer that specifies the behavior of the copy operation. The only
183
-     * supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
184
-     * `dest` already exists.
185
-     */
186
-    function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
187
-
188
-    /**
189
-     * Asynchronous open(2) - open and possibly create a file.
190
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
191
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
192
-     * supplied, defaults to `0o666`.
193
-     */
194
-    function open(path: PathLike, flags: string | number, mode?: Mode): Promise<FileHandle>;
195
-
196
-    /**
197
-     * Asynchronously reads data from the file referenced by the supplied `FileHandle`.
198
-     * @param handle A `FileHandle`.
199
-     * @param buffer The buffer that the data will be written to.
200
-     * @param offset The offset in the buffer at which to start writing.
201
-     * @param length The number of bytes to read.
202
-     * @param position The offset from the beginning of the file from which data should be read. If
203
-     * `null`, data will be read from the current position.
204
-     */
205
-    function read<TBuffer extends Uint8Array>(
206
-        handle: FileHandle,
207
-        buffer: TBuffer,
208
-        offset?: number | null,
209
-        length?: number | null,
210
-        position?: number | null,
211
-    ): Promise<{ bytesRead: number, buffer: TBuffer }>;
212
-
213
-    /**
214
-     * Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
215
-     * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
216
-     * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
217
-     * @param handle A `FileHandle`.
218
-     * @param buffer The buffer that the data will be written to.
219
-     * @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
220
-     * @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
221
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
222
-     */
223
-    function write<TBuffer extends Uint8Array>(
224
-        handle: FileHandle,
225
-        buffer: TBuffer,
226
-        offset?: number | null,
227
-        length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
228
-
229
-    /**
230
-     * Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
231
-     * It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise`
232
-     * to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
233
-     * @param handle A `FileHandle`.
234
-     * @param string A string to write.
235
-     * @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
236
-     * @param encoding The expected string encoding.
237
-     */
238
-    function write(handle: FileHandle, string: string, position?: number | null, encoding?: BufferEncoding | null): Promise<{ bytesWritten: number, buffer: string }>;
239
-
240
-    /**
241
-     * Asynchronous rename(2) - Change the name or location of a file or directory.
242
-     * @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
243
-     * URL support is _experimental_.
244
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
245
-     * URL support is _experimental_.
246
-     */
247
-    function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
248
-
249
-    /**
250
-     * Asynchronous truncate(2) - Truncate a file to a specified length.
251
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
252
-     * @param len If not specified, defaults to `0`.
253
-     */
254
-    function truncate(path: PathLike, len?: number): Promise<void>;
255
-
256
-    /**
257
-     * Asynchronous ftruncate(2) - Truncate a file to a specified length.
258
-     * @param handle A `FileHandle`.
259
-     * @param len If not specified, defaults to `0`.
260
-     */
261
-    function ftruncate(handle: FileHandle, len?: number): Promise<void>;
262
-
263
-    /**
264
-     * Asynchronous rmdir(2) - delete a directory.
265
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
266
-     */
267
-    function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
268
-
269
-    /**
270
-     * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
271
-     */
272
-    function rm(path: PathLike, options?: RmOptions): Promise<void>;
273
-
274
-    /**
275
-     * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
276
-     * @param handle A `FileHandle`.
277
-     */
278
-    function fdatasync(handle: FileHandle): Promise<void>;
279
-
280
-    /**
281
-     * Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
282
-     * @param handle A `FileHandle`.
283
-     */
284
-    function fsync(handle: FileHandle): Promise<void>;
285
-
286
-    /**
287
-     * Asynchronous mkdir(2) - create a directory.
288
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
289
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
290
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
291
-     */
292
-    function mkdir(path: PathLike, options: MakeDirectoryOptions & { recursive: true; }): Promise<string | undefined>;
293
-
294
-    /**
295
-     * Asynchronous mkdir(2) - create a directory.
296
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
297
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
298
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
299
-     */
300
-    function mkdir(path: PathLike, options?: Mode | (MakeDirectoryOptions & { recursive?: false; }) | null): Promise<void>;
301
-
302
-    /**
303
-     * Asynchronous mkdir(2) - create a directory.
304
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
305
-     * @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
306
-     * should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
307
-     */
308
-    function mkdir(path: PathLike, options?: Mode | MakeDirectoryOptions | null): Promise<string | undefined>;
309
-
310
-    /**
311
-     * Asynchronous readdir(3) - read a directory.
312
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
313
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
314
-     */
315
-    function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[]>;
316
-
317
-    /**
318
-     * Asynchronous readdir(3) - read a directory.
319
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
320
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
321
-     */
322
-    function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer"): Promise<Buffer[]>;
323
-
324
-    /**
325
-     * Asynchronous readdir(3) - read a directory.
326
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
327
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
328
-     */
329
-    function readdir(path: PathLike, options?: BaseEncodingOptions & { withFileTypes?: false } | BufferEncoding | null): Promise<string[] | Buffer[]>;
330
-
331
-    /**
332
-     * Asynchronous readdir(3) - read a directory.
333
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
334
-     * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
335
-     */
336
-    function readdir(path: PathLike, options: BaseEncodingOptions & { withFileTypes: true }): Promise<Dirent[]>;
337
-
338
-    /**
339
-     * Asynchronous readlink(2) - read value of a symbolic link.
340
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
341
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
342
-     */
343
-    function readlink(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
344
-
345
-    /**
346
-     * Asynchronous readlink(2) - read value of a symbolic link.
347
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
348
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
349
-     */
350
-    function readlink(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
351
-
352
-    /**
353
-     * Asynchronous readlink(2) - read value of a symbolic link.
354
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
355
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
356
-     */
357
-    function readlink(path: PathLike, options?: BaseEncodingOptions | string | null): Promise<string | Buffer>;
358
-
359
-    /**
360
-     * Asynchronous symlink(2) - Create a new symbolic link to an existing file.
361
-     * @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
362
-     * @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
363
-     * @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
364
-     * When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
365
-     */
366
-    function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
367
-
368
-    /**
369
-     * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
370
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
371
-     */
372
-    function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
373
-    function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
374
-    function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
375
-
376
-    /**
377
-     * Asynchronous stat(2) - Get file status.
378
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
379
-     */
380
-    function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
381
-    function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
382
-    function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
383
-
384
-    /**
385
-     * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
386
-     * @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
387
-     * @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
388
-     */
389
-    function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
390
-
391
-    /**
392
-     * Asynchronous unlink(2) - delete a name and possibly the file it refers to.
393
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
394
-     */
395
-    function unlink(path: PathLike): Promise<void>;
396
-
397
-    /**
398
-     * Asynchronous fchmod(2) - Change permissions of a file.
399
-     * @param handle A `FileHandle`.
400
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
401
-     */
402
-    function fchmod(handle: FileHandle, mode: Mode): Promise<void>;
403
-
404
-    /**
405
-     * Asynchronous chmod(2) - Change permissions of a file.
406
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
407
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
408
-     */
409
-    function chmod(path: PathLike, mode: Mode): Promise<void>;
410
-
411
-    /**
412
-     * Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
413
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
414
-     * @param mode A file mode. If a string is passed, it is parsed as an octal integer.
415
-     */
416
-    function lchmod(path: PathLike, mode: Mode): Promise<void>;
417
-
418
-    /**
419
-     * Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
420
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
421
-     */
422
-    function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
423
-
424
-    /**
425
-     * Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
426
-     * with the difference that if the path refers to a symbolic link, then the link is not
427
-     * dereferenced: instead, the timestamps of the symbolic link itself are changed.
428
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
429
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
430
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
431
-     */
432
-    function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
433
-
434
-    /**
435
-     * Asynchronous fchown(2) - Change ownership of a file.
436
-     * @param handle A `FileHandle`.
437
-     */
438
-    function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>;
439
-
440
-    /**
441
-     * Asynchronous chown(2) - Change ownership of a file.
442
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
443
-     */
444
-    function chown(path: PathLike, uid: number, gid: number): Promise<void>;
445
-
446
-    /**
447
-     * Asynchronously change file timestamps of the file referenced by the supplied path.
448
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
449
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
450
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
451
-     */
452
-    function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
453
-
454
-    /**
455
-     * Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
456
-     * @param handle A `FileHandle`.
457
-     * @param atime The last access time. If a string is provided, it will be coerced to number.
458
-     * @param mtime The last modified time. If a string is provided, it will be coerced to number.
459
-     */
460
-    function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
461
-
462
-    /**
463
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
464
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
465
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
466
-     */
467
-    function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
468
-
469
-    /**
470
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
471
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
472
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
473
-     */
474
-    function realpath(path: PathLike, options: BufferEncodingOption): Promise<Buffer>;
475
-
476
-    /**
477
-     * Asynchronous realpath(3) - return the canonicalized absolute pathname.
478
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
479
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
480
-     */
481
-    function realpath(path: PathLike, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
482
-
483
-    /**
484
-     * Asynchronously creates a unique temporary directory.
485
-     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
486
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
487
-     */
488
-    function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string>;
489
-
490
-    /**
491
-     * Asynchronously creates a unique temporary directory.
492
-     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
493
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
494
-     */
495
-    function mkdtemp(prefix: string, options: BufferEncodingOption): Promise<Buffer>;
496
-
497
-    /**
498
-     * Asynchronously creates a unique temporary directory.
499
-     * Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
500
-     * @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
501
-     */
502
-    function mkdtemp(prefix: string, options?: BaseEncodingOptions | BufferEncoding | null): Promise<string | Buffer>;
503
-
504
-    /**
505
-     * Asynchronously writes data to a file, replacing the file if it already exists.
506
-     * It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
507
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
508
-     * URL support is _experimental_.
509
-     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
510
-     * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
511
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
512
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
513
-     * If `mode` is not supplied, the default of `0o666` is used.
514
-     * If `mode` is a string, it is parsed as an octal integer.
515
-     * If `flag` is not supplied, the default of `'w'` is used.
516
-     */
517
-    function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
518
-
519
-    /**
520
-     * Asynchronously append data to a file, creating the file if it does not exist.
521
-     * @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
522
-     * URL support is _experimental_.
523
-     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
524
-     * @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
525
-     * @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
526
-     * If `encoding` is not supplied, the default of `'utf8'` is used.
527
-     * If `mode` is not supplied, the default of `0o666` is used.
528
-     * If `mode` is a string, it is parsed as an octal integer.
529
-     * If `flag` is not supplied, the default of `'a'` is used.
530
-     */
531
-    function appendFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } | BufferEncoding | null): Promise<void>;
532
-
533
-    /**
534
-     * Asynchronously reads the entire contents of a file.
535
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
536
-     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
537
-     * @param options An object that may contain an optional flag.
538
-     * If a flag is not provided, it defaults to `'r'`.
539
-     */
540
-    function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: OpenMode } | null): Promise<Buffer>;
541
-
542
-    /**
543
-     * Asynchronously reads the entire contents of a file.
544
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
545
-     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
546
-     * @param options An object that may contain an optional flag.
547
-     * If a flag is not provided, it defaults to `'r'`.
548
-     */
549
-    function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: OpenMode } | BufferEncoding): Promise<string>;
550
-
551
-    /**
552
-     * Asynchronously reads the entire contents of a file.
553
-     * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
554
-     * If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
555
-     * @param options An object that may contain an optional flag.
556
-     * If a flag is not provided, it defaults to `'r'`.
557
-     */
558
-    function readFile(path: PathLike | FileHandle, options?: BaseEncodingOptions & { flag?: OpenMode } | BufferEncoding | null): Promise<string | Buffer>;
559
-
560
-    function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
561
-}
... ...
@@ -1,614 +0,0 @@
1
-// Declare "static" methods in Error
2
-interface ErrorConstructor {
3
-    /** Create .stack property on a target object */
4
-    captureStackTrace(targetObject: object, constructorOpt?: Function): void;
5
-
6
-    /**
7
-     * Optional override for formatting stack traces
8
-     *
9
-     * @see https://github.com/v8/v8/wiki/Stack%20Trace%20API#customizing-stack-traces
10
-     */
11
-    prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
12
-
13
-    stackTraceLimit: number;
14
-}
15
-
16
-// Node.js ESNEXT support
17
-interface String {
18
-    /** Removes whitespace from the left end of a string. */
19
-    trimLeft(): string;
20
-    /** Removes whitespace from the right end of a string. */
21
-    trimRight(): string;
22
-
23
-    /** Returns a copy with leading whitespace removed. */
24
-    trimStart(): string;
25
-    /** Returns a copy with trailing whitespace removed. */
26
-    trimEnd(): string;
27
-}
28
-
29
-interface ImportMeta {
30
-    url: string;
31
-}
32
-
33
-/*-----------------------------------------------*
34
- *                                               *
35
- *                   GLOBAL                      *
36
- *                                               *
37
- ------------------------------------------------*/
38
-
39
-// For backwards compability
40
-interface NodeRequire extends NodeJS.Require {}
41
-interface RequireResolve extends NodeJS.RequireResolve {}
42
-interface NodeModule extends NodeJS.Module {}
43
-
44
-declare var process: NodeJS.Process;
45
-declare var console: Console;
46
-
47
-declare var __filename: string;
48
-declare var __dirname: string;
49
-
50
-declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
51
-declare namespace setTimeout {
52
-    function __promisify__(ms: number): Promise<void>;
53
-    function __promisify__<T>(ms: number, value: T): Promise<T>;
54
-}
55
-declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
56
-declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
57
-declare function clearInterval(intervalId: NodeJS.Timeout): void;
58
-declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
59
-declare namespace setImmediate {
60
-    function __promisify__(): Promise<void>;
61
-    function __promisify__<T>(value: T): Promise<T>;
62
-}
63
-declare function clearImmediate(immediateId: NodeJS.Immediate): void;
64
-
65
-declare function queueMicrotask(callback: () => void): void;
66
-
67
-declare var require: NodeRequire;
68
-declare var module: NodeModule;
69
-
70
-// Same as module.exports
71
-declare var exports: any;
72
-
73
-// Buffer class
74
-type BufferEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex";
75
-
76
-type WithImplicitCoercion<T> = T | { valueOf(): T };
77
-
78
-/**
79
- * Raw data is stored in instances of the Buffer class.
80
- * A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap.  A Buffer cannot be resized.
81
- * Valid string encodings: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
82
- */
83
-declare class Buffer extends Uint8Array {
84
-    /**
85
-     * Allocates a new buffer containing the given {str}.
86
-     *
87
-     * @param str String to store in buffer.
88
-     * @param encoding encoding to use, optional.  Default is 'utf8'
89
-     * @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
90
-     */
91
-    constructor(str: string, encoding?: BufferEncoding);
92
-    /**
93
-     * Allocates a new buffer of {size} octets.
94
-     *
95
-     * @param size count of octets to allocate.
96
-     * @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
97
-     */
98
-    constructor(size: number);
99
-    /**
100
-     * Allocates a new buffer containing the given {array} of octets.
101
-     *
102
-     * @param array The octets to store.
103
-     * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
104
-     */
105
-    constructor(array: Uint8Array);
106
-    /**
107
-     * Produces a Buffer backed by the same allocated memory as
108
-     * the given {ArrayBuffer}/{SharedArrayBuffer}.
109
-     *
110
-     *
111
-     * @param arrayBuffer The ArrayBuffer with which to share memory.
112
-     * @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
113
-     */
114
-    constructor(arrayBuffer: ArrayBuffer | SharedArrayBuffer);
115
-    /**
116
-     * Allocates a new buffer containing the given {array} of octets.
117
-     *
118
-     * @param array The octets to store.
119
-     * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
120
-     */
121
-    constructor(array: ReadonlyArray<any>);
122
-    /**
123
-     * Copies the passed {buffer} data onto a new {Buffer} instance.
124
-     *
125
-     * @param buffer The buffer to copy.
126
-     * @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
127
-     */
128
-    constructor(buffer: Buffer);
129
-    /**
130
-     * When passed a reference to the .buffer property of a TypedArray instance,
131
-     * the newly created Buffer will share the same allocated memory as the TypedArray.
132
-     * The optional {byteOffset} and {length} arguments specify a memory range
133
-     * within the {arrayBuffer} that will be shared by the Buffer.
134
-     *
135
-     * @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
136
-     */
137
-    static from(arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>, byteOffset?: number, length?: number): Buffer;
138
-    /**
139
-     * Creates a new Buffer using the passed {data}
140
-     * @param data data to create a new Buffer
141
-     */
142
-    static from(data: Uint8Array | ReadonlyArray<number>): Buffer;
143
-    static from(data: WithImplicitCoercion<Uint8Array | ReadonlyArray<number> | string>): Buffer;
144
-    /**
145
-     * Creates a new Buffer containing the given JavaScript string {str}.
146
-     * If provided, the {encoding} parameter identifies the character encoding.
147
-     * If not provided, {encoding} defaults to 'utf8'.
148
-     */
149
-    static from(str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: 'string'): string }, encoding?: BufferEncoding): Buffer;
150
-    /**
151
-     * Creates a new Buffer using the passed {data}
152
-     * @param values to create a new Buffer
153
-     */
154
-    static of(...items: number[]): Buffer;
155
-    /**
156
-     * Returns true if {obj} is a Buffer
157
-     *
158
-     * @param obj object to test.
159
-     */
160
-    static isBuffer(obj: any): obj is Buffer;
161
-    /**
162
-     * Returns true if {encoding} is a valid encoding argument.
163
-     * Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
164
-     *
165
-     * @param encoding string to test.
166
-     */
167
-    static isEncoding(encoding: string): encoding is BufferEncoding;
168
-    /**
169
-     * Gives the actual byte length of a string. encoding defaults to 'utf8'.
170
-     * This is not the same as String.prototype.length since that returns the number of characters in a string.
171
-     *
172
-     * @param string string to test.
173
-     * @param encoding encoding used to evaluate (defaults to 'utf8')
174
-     */
175
-    static byteLength(
176
-        string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
177
-        encoding?: BufferEncoding
178
-    ): number;
179
-    /**
180
-     * Returns a buffer which is the result of concatenating all the buffers in the list together.
181
-     *
182
-     * If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
183
-     * If the list has exactly one item, then the first item of the list is returned.
184
-     * If the list has more than one item, then a new Buffer is created.
185
-     *
186
-     * @param list An array of Buffer objects to concatenate
187
-     * @param totalLength Total length of the buffers when concatenated.
188
-     *   If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
189
-     */
190
-    static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
191
-    /**
192
-     * The same as buf1.compare(buf2).
193
-     */
194
-    static compare(buf1: Uint8Array, buf2: Uint8Array): number;
195
-    /**
196
-     * Allocates a new buffer of {size} octets.
197
-     *
198
-     * @param size count of octets to allocate.
199
-     * @param fill if specified, buffer will be initialized by calling buf.fill(fill).
200
-     *    If parameter is omitted, buffer will be filled with zeros.
201
-     * @param encoding encoding used for call to buf.fill while initalizing
202
-     */
203
-    static alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
204
-    /**
205
-     * Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
206
-     * of the newly created Buffer are unknown and may contain sensitive data.
207
-     *
208
-     * @param size count of octets to allocate
209
-     */
210
-    static allocUnsafe(size: number): Buffer;
211
-    /**
212
-     * Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
213
-     * of the newly created Buffer are unknown and may contain sensitive data.
214
-     *
215
-     * @param size count of octets to allocate
216
-     */
217
-    static allocUnsafeSlow(size: number): Buffer;
218
-    /**
219
-     * This is the number of bytes used to determine the size of pre-allocated, internal Buffer instances used for pooling. This value may be modified.
220
-     */
221
-    static poolSize: number;
222
-
223
-    write(string: string, encoding?: BufferEncoding): number;
224
-    write(string: string, offset: number, encoding?: BufferEncoding): number;
225
-    write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
226
-    toString(encoding?: BufferEncoding, start?: number, end?: number): string;
227
-    toJSON(): { type: 'Buffer'; data: number[] };
228
-    equals(otherBuffer: Uint8Array): boolean;
229
-    compare(
230
-        otherBuffer: Uint8Array,
231
-        targetStart?: number,
232
-        targetEnd?: number,
233
-        sourceStart?: number,
234
-        sourceEnd?: number
235
-    ): number;
236
-    copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
237
-    /**
238
-     * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
239
-     *
240
-     * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
241
-     *
242
-     * @param begin Where the new `Buffer` will start. Default: `0`.
243
-     * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
244
-     */
245
-    slice(begin?: number, end?: number): Buffer;
246
-    /**
247
-     * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
248
-     *
249
-     * This method is compatible with `Uint8Array#subarray()`.
250
-     *
251
-     * @param begin Where the new `Buffer` will start. Default: `0`.
252
-     * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
253
-     */
254
-    subarray(begin?: number, end?: number): Buffer;
255
-    writeBigInt64BE(value: bigint, offset?: number): number;
256
-    writeBigInt64LE(value: bigint, offset?: number): number;
257
-    writeBigUInt64BE(value: bigint, offset?: number): number;
258
-    writeBigUInt64LE(value: bigint, offset?: number): number;
259
-    writeUIntLE(value: number, offset: number, byteLength: number): number;
260
-    writeUIntBE(value: number, offset: number, byteLength: number): number;
261
-    writeIntLE(value: number, offset: number, byteLength: number): number;
262
-    writeIntBE(value: number, offset: number, byteLength: number): number;
263
-    readBigUInt64BE(offset?: number): bigint;
264
-    readBigUInt64LE(offset?: number): bigint;
265
-    readBigInt64BE(offset?: number): bigint;
266
-    readBigInt64LE(offset?: number): bigint;
267
-    readUIntLE(offset: number, byteLength: number): number;
268
-    readUIntBE(offset: number, byteLength: number): number;
269
-    readIntLE(offset: number, byteLength: number): number;
270
-    readIntBE(offset: number, byteLength: number): number;
271
-    readUInt8(offset?: number): number;
272
-    readUInt16LE(offset?: number): number;
273
-    readUInt16BE(offset?: number): number;
274
-    readUInt32LE(offset?: number): number;
275
-    readUInt32BE(offset?: number): number;
276
-    readInt8(offset?: number): number;
277
-    readInt16LE(offset?: number): number;
278
-    readInt16BE(offset?: number): number;
279
-    readInt32LE(offset?: number): number;
280
-    readInt32BE(offset?: number): number;
281
-    readFloatLE(offset?: number): number;
282
-    readFloatBE(offset?: number): number;
283
-    readDoubleLE(offset?: number): number;
284
-    readDoubleBE(offset?: number): number;
285
-    reverse(): this;
286
-    swap16(): Buffer;
287
-    swap32(): Buffer;
288
-    swap64(): Buffer;
289
-    writeUInt8(value: number, offset?: number): number;
290
-    writeUInt16LE(value: number, offset?: number): number;
291
-    writeUInt16BE(value: number, offset?: number): number;
292
-    writeUInt32LE(value: number, offset?: number): number;
293
-    writeUInt32BE(value: number, offset?: number): number;
294
-    writeInt8(value: number, offset?: number): number;
295
-    writeInt16LE(value: number, offset?: number): number;
296
-    writeInt16BE(value: number, offset?: number): number;
297
-    writeInt32LE(value: number, offset?: number): number;
298
-    writeInt32BE(value: number, offset?: number): number;
299
-    writeFloatLE(value: number, offset?: number): number;
300
-    writeFloatBE(value: number, offset?: number): number;
301
-    writeDoubleLE(value: number, offset?: number): number;
302
-    writeDoubleBE(value: number, offset?: number): number;
303
-
304
-    fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
305
-
306
-    indexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
307
-    lastIndexOf(value: string | number | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number;
308
-    entries(): IterableIterator<[number, number]>;
309
-    includes(value: string | number | Buffer, byteOffset?: number, encoding?: BufferEncoding): boolean;
310
-    keys(): IterableIterator<number>;
311
-    values(): IterableIterator<number>;
312
-}
313
-
314
-/*----------------------------------------------*
315
-*                                               *
316
-*               GLOBAL INTERFACES               *
317
-*                                               *
318
-*-----------------------------------------------*/
319
-declare namespace NodeJS {
320
-    interface InspectOptions {
321
-        /**
322
-         * If set to `true`, getters are going to be
323
-         * inspected as well. If set to `'get'` only getters without setter are going
324
-         * to be inspected. If set to `'set'` only getters having a corresponding
325
-         * setter are going to be inspected. This might cause side effects depending on
326
-         * the getter function.
327
-         * @default `false`
328
-         */
329
-        getters?: 'get' | 'set' | boolean;
330
-        showHidden?: boolean;
331
-        /**
332
-         * @default 2
333
-         */
334
-        depth?: number | null;
335
-        colors?: boolean;
336
-        customInspect?: boolean;
337
-        showProxy?: boolean;
338
-        maxArrayLength?: number | null;
339
-        /**
340
-         * Specifies the maximum number of characters to
341
-         * include when formatting. Set to `null` or `Infinity` to show all elements.
342
-         * Set to `0` or negative to show no characters.
343
-         * @default Infinity
344
-         */
345
-        maxStringLength?: number | null;
346
-        breakLength?: number;
347
-        /**
348
-         * Setting this to `false` causes each object key
349
-         * to be displayed on a new line. It will also add new lines to text that is
350
-         * longer than `breakLength`. If set to a number, the most `n` inner elements
351
-         * are united on a single line as long as all properties fit into
352
-         * `breakLength`. Short array elements are also grouped together. Note that no
353
-         * text will be reduced below 16 characters, no matter the `breakLength` size.
354
-         * For more information, see the example below.
355
-         * @default `true`
356
-         */
357
-        compact?: boolean | number;
358
-        sorted?: boolean | ((a: string, b: string) => number);
359
-    }
360
-
361
-    interface CallSite {
362
-        /**
363
-         * Value of "this"
364
-         */
365
-        getThis(): any;
366
-
367
-        /**
368
-         * Type of "this" as a string.
369
-         * This is the name of the function stored in the constructor field of
370
-         * "this", if available.  Otherwise the object's [[Class]] internal
371
-         * property.
372
-         */
373
-        getTypeName(): string | null;
374
-
375
-        /**
376
-         * Current function
377
-         */
378
-        getFunction(): Function | undefined;
379
-
380
-        /**
381
-         * Name of the current function, typically its name property.
382
-         * If a name property is not available an attempt will be made to try
383
-         * to infer a name from the function's context.
384
-         */
385
-        getFunctionName(): string | null;
386
-
387
-        /**
388
-         * Name of the property [of "this" or one of its prototypes] that holds
389
-         * the current function
390
-         */
391
-        getMethodName(): string | null;
392
-
393
-        /**
394
-         * Name of the script [if this function was defined in a script]
395
-         */
396
-        getFileName(): string | null;
397
-
398
-        /**
399
-         * Current line number [if this function was defined in a script]
400
-         */
401
-        getLineNumber(): number | null;
402
-
403
-        /**
404
-         * Current column number [if this function was defined in a script]
405
-         */
406
-        getColumnNumber(): number | null;
407
-
408
-        /**
409
-         * A call site object representing the location where eval was called
410
-         * [if this function was created using a call to eval]
411
-         */
412
-        getEvalOrigin(): string | undefined;
413
-
414
-        /**
415
-         * Is this a toplevel invocation, that is, is "this" the global object?
416
-         */
417
-        isToplevel(): boolean;
418
-
419
-        /**
420
-         * Does this call take place in code defined by a call to eval?
421
-         */
422
-        isEval(): boolean;
423
-
424
-        /**
425
-         * Is this call in native V8 code?
426
-         */
427
-        isNative(): boolean;
428
-
429
-        /**
430
-         * Is this a constructor call?
431
-         */
432
-        isConstructor(): boolean;
433
-    }
434
-
435
-    interface ErrnoException extends Error {
436
-        errno?: number;
437
-        code?: string;
438
-        path?: string;
439
-        syscall?: string;
440
-        stack?: string;
441
-    }
442
-
443
-    interface ReadableStream extends EventEmitter {
444
-        readable: boolean;
445
-        read(size?: number): string | Buffer;
446
-        setEncoding(encoding: BufferEncoding): this;
447
-        pause(): this;
448
-        resume(): this;
449
-        isPaused(): boolean;
450
-        pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
451
-        unpipe(destination?: WritableStream): this;
452
-        unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
453
-        wrap(oldStream: ReadableStream): this;
454
-        [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
455
-    }
456
-
457
-    interface WritableStream extends EventEmitter {
458
-        writable: boolean;
459
-        write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
460
-        write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
461
-        end(cb?: () => void): void;
462
-        end(data: string | Uint8Array, cb?: () => void): void;
463
-        end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
464
-    }
465
-
466
-    interface ReadWriteStream extends ReadableStream, WritableStream { }
467
-
468
-    interface Global {
469
-        Array: typeof Array;
470
-        ArrayBuffer: typeof ArrayBuffer;
471
-        Boolean: typeof Boolean;
472
-        Buffer: typeof Buffer;
473
-        DataView: typeof DataView;
474
-        Date: typeof Date;
475
-        Error: typeof Error;
476
-        EvalError: typeof EvalError;
477
-        Float32Array: typeof Float32Array;
478
-        Float64Array: typeof Float64Array;
479
-        Function: typeof Function;
480
-        Infinity: typeof Infinity;
481
-        Int16Array: typeof Int16Array;
482
-        Int32Array: typeof Int32Array;
483
-        Int8Array: typeof Int8Array;
484
-        Intl: typeof Intl;
485
-        JSON: typeof JSON;
486
-        Map: MapConstructor;
487
-        Math: typeof Math;
488
-        NaN: typeof NaN;
489
-        Number: typeof Number;
490
-        Object: typeof Object;
491
-        Promise: typeof Promise;
492
-        RangeError: typeof RangeError;
493
-        ReferenceError: typeof ReferenceError;
494
-        RegExp: typeof RegExp;
495
-        Set: SetConstructor;
496
-        String: typeof String;
497
-        Symbol: Function;
498
-        SyntaxError: typeof SyntaxError;
499
-        TypeError: typeof TypeError;
500
-        URIError: typeof URIError;
501
-        Uint16Array: typeof Uint16Array;
502
-        Uint32Array: typeof Uint32Array;
503
-        Uint8Array: typeof Uint8Array;
504
-        Uint8ClampedArray: typeof Uint8ClampedArray;
505
-        WeakMap: WeakMapConstructor;
506
-        WeakSet: WeakSetConstructor;
507
-        clearImmediate: (immediateId: Immediate) => void;
508
-        clearInterval: (intervalId: Timeout) => void;
509
-        clearTimeout: (timeoutId: Timeout) => void;
510
-        decodeURI: typeof decodeURI;
511
-        decodeURIComponent: typeof decodeURIComponent;
512
-        encodeURI: typeof encodeURI;
513
-        encodeURIComponent: typeof encodeURIComponent;
514
-        escape: (str: string) => string;
515
-        eval: typeof eval;
516
-        global: Global;
517
-        isFinite: typeof isFinite;
518
-        isNaN: typeof isNaN;
519
-        parseFloat: typeof parseFloat;
520
-        parseInt: typeof parseInt;
521
-        setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
522
-        setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
523
-        setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
524
-        queueMicrotask: typeof queueMicrotask;
525
-        undefined: typeof undefined;
526
-        unescape: (str: string) => string;
527
-        gc: () => void;
528
-        v8debug?: any;
529
-    }
530
-
531
-    interface RefCounted {
532
-        ref(): this;
533
-        unref(): this;
534
-    }
535
-
536
-    // compatibility with older typings
537
-    interface Timer extends RefCounted {
538
-        hasRef(): boolean;
539
-        refresh(): this;
540
-        [Symbol.toPrimitive](): number;
541
-    }
542
-
543
-    interface Immediate extends RefCounted {
544
-        hasRef(): boolean;
545
-        _onImmediate: Function; // to distinguish it from the Timeout class
546
-    }
547
-
548
-    interface Timeout extends Timer {
549
-        hasRef(): boolean;
550
-        refresh(): this;
551
-        [Symbol.toPrimitive](): number;
552
-    }
553
-
554
-    type TypedArray =
555
-        | Uint8Array
556
-        | Uint8ClampedArray
557
-        | Uint16Array
558
-        | Uint32Array
559
-        | Int8Array
560
-        | Int16Array
561
-        | Int32Array
562
-        | BigUint64Array
563
-        | BigInt64Array
564
-        | Float32Array
565
-        | Float64Array;
566
-    type ArrayBufferView = TypedArray | DataView;
567
-
568
-    interface Require {
569
-        (id: string): any;
570
-        resolve: RequireResolve;
571
-        cache: Dict<NodeModule>;
572
-        /**
573
-         * @deprecated
574
-         */
575
-        extensions: RequireExtensions;
576
-        main: Module | undefined;
577
-    }
578
-
579
-    interface RequireResolve {
580
-        (id: string, options?: { paths?: string[]; }): string;
581
-        paths(request: string): string[] | null;
582
-    }
583
-
584
-    interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
585
-        '.js': (m: Module, filename: string) => any;
586
-        '.json': (m: Module, filename: string) => any;
587
-        '.node': (m: Module, filename: string) => any;
588
-    }
589
-    interface Module {
590
-        exports: any;
591
-        require: Require;
592
-        id: string;
593
-        filename: string;
594
-        loaded: boolean;
595
-        /** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
596
-        parent: Module | null | undefined;
597
-        children: Module[];
598
-        /**
599
-         * @since 11.14.0
600
-         *
601
-         * The directory name of the module. This is usually the same as the path.dirname() of the module.id.
602
-         */
603
-        path: string;
604
-        paths: string[];
605
-    }
606
-
607
-    interface Dict<T> {
608
-        [key: string]: T | undefined;
609
-    }
610
-
611
-    interface ReadOnlyDict<T> {
612
-        readonly [key: string]: T | undefined;
613
-    }
614
-}
... ...
@@ -1 +0,0 @@
1
-declare var global: NodeJS.Global & typeof globalThis;
... ...
@@ -1,427 +0,0 @@
1
-declare module 'node:http' {
2
-    export * from 'http';
3
-}
4
-
5
-declare module 'http' {
6
-    import * as stream from 'node:stream';
7
-    import { URL } from 'node:url';
8
-    import { Socket, Server as NetServer } from 'node:net';
9
-
10
-    // incoming headers will never contain number
11
-    interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
12
-        'accept'?: string;
13
-        'accept-language'?: string;
14
-        'accept-patch'?: string;
15
-        'accept-ranges'?: string;
16
-        'access-control-allow-credentials'?: string;
17
-        'access-control-allow-headers'?: string;
18
-        'access-control-allow-methods'?: string;
19
-        'access-control-allow-origin'?: string;
20
-        'access-control-expose-headers'?: string;
21
-        'access-control-max-age'?: string;
22
-        'access-control-request-headers'?: string;
23
-        'access-control-request-method'?: string;
24
-        'age'?: string;
25
-        'allow'?: string;
26
-        'alt-svc'?: string;
27
-        'authorization'?: string;
28
-        'cache-control'?: string;
29
-        'connection'?: string;
30
-        'content-disposition'?: string;
31
-        'content-encoding'?: string;
32
-        'content-language'?: string;
33
-        'content-length'?: string;
34
-        'content-location'?: string;
35
-        'content-range'?: string;
36
-        'content-type'?: string;
37
-        'cookie'?: string;
38
-        'date'?: string;
39
-        'expect'?: string;
40
-        'expires'?: string;
41
-        'forwarded'?: string;
42
-        'from'?: string;
43
-        'host'?: string;
44
-        'if-match'?: string;
45
-        'if-modified-since'?: string;
46
-        'if-none-match'?: string;
47
-        'if-unmodified-since'?: string;
48
-        'last-modified'?: string;
49
-        'location'?: string;
50
-        'origin'?: string;
51
-        'pragma'?: string;
52
-        'proxy-authenticate'?: string;
53
-        'proxy-authorization'?: string;
54
-        'public-key-pins'?: string;
55
-        'range'?: string;
56
-        'referer'?: string;
57
-        'retry-after'?: string;
58
-        'sec-websocket-accept'?: string;
59
-        'sec-websocket-extensions'?: string;
60
-        'sec-websocket-key'?: string;
61
-        'sec-websocket-protocol'?: string;
62
-        'sec-websocket-version'?: string;
63
-        'set-cookie'?: string[];
64
-        'strict-transport-security'?: string;
65
-        'tk'?: string;
66
-        'trailer'?: string;
67
-        'transfer-encoding'?: string;
68
-        'upgrade'?: string;
69
-        'user-agent'?: string;
70
-        'vary'?: string;
71
-        'via'?: string;
72
-        'warning'?: string;
73
-        'www-authenticate'?: string;
74
-    }
75
-
76
-    // outgoing headers allows numbers (as they are converted internally to strings)
77
-    type OutgoingHttpHeader = number | string | string[];
78
-
79
-    interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
80
-    }
81
-
82
-    interface ClientRequestArgs {
83
-        protocol?: string | null;
84
-        host?: string | null;
85
-        hostname?: string | null;
86
-        family?: number;
87
-        port?: number | string | null;
88
-        defaultPort?: number | string;
89
-        localAddress?: string;
90
-        socketPath?: string;
91
-        /**
92
-         * @default 8192
93
-         */
94
-        maxHeaderSize?: number;
95
-        method?: string;
96
-        path?: string | null;
97
-        headers?: OutgoingHttpHeaders;
98
-        auth?: string | null;
99
-        agent?: Agent | boolean;
100
-        _defaultAgent?: Agent;
101
-        timeout?: number;
102
-        setHost?: boolean;
103
-        // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
104
-        createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket;
105
-    }
106
-
107
-    interface ServerOptions {
108
-        IncomingMessage?: typeof IncomingMessage;
109
-        ServerResponse?: typeof ServerResponse;
110
-        /**
111
-         * Optionally overrides the value of
112
-         * [`--max-http-header-size`][] for requests received by this server, i.e.
113
-         * the maximum length of request headers in bytes.
114
-         * @default 8192
115
-         */
116
-        maxHeaderSize?: number;
117
-        /**
118
-         * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
119
-         * Using the insecure parser should be avoided.
120
-         * See --insecure-http-parser for more information.
121
-         * @default false
122
-         */
123
-        insecureHTTPParser?: boolean;
124
-    }
125
-
126
-    type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
127
-
128
-    interface HttpBase {
129
-        setTimeout(msecs?: number, callback?: () => void): this;
130
-        setTimeout(callback: () => void): this;
131
-        /**
132
-         * Limits maximum incoming headers count. If set to 0, no limit will be applied.
133
-         * @default 2000
134
-         * {@link https://nodejs.org/api/http.html#http_server_maxheaderscount}
135
-         */
136
-        maxHeadersCount: number | null;
137
-        timeout: number;
138
-        /**
139
-         * Limit the amount of time the parser will wait to receive the complete HTTP headers.
140
-         * @default 60000
141
-         * {@link https://nodejs.org/api/http.html#http_server_headerstimeout}
142
-         */
143
-        headersTimeout: number;
144
-        keepAliveTimeout: number;
145
-        /**
146
-         * Sets the timeout value in milliseconds for receiving the entire request from the client.
147
-         * @default 0
148
-         * {@link https://nodejs.org/api/http.html#http_server_requesttimeout}
149
-         */
150
-        requestTimeout: number;
151
-    }
152
-
153
-    interface Server extends HttpBase {}
154
-    class Server extends NetServer {
155
-        constructor(requestListener?: RequestListener);
156
-        constructor(options: ServerOptions, requestListener?: RequestListener);
157
-    }
158
-
159
-    // https://github.com/nodejs/node/blob/master/lib/_http_outgoing.js
160
-    class OutgoingMessage extends stream.Writable {
161
-        upgrading: boolean;
162
-        chunkedEncoding: boolean;
163
-        shouldKeepAlive: boolean;
164
-        useChunkedEncodingByDefault: boolean;
165
-        sendDate: boolean;
166
-        /**
167
-         * @deprecated Use `writableEnded` instead.
168
-         */
169
-        finished: boolean;
170
-        headersSent: boolean;
171
-        /**
172
-         * @deprecate Use `socket` instead.
173
-         */
174
-        connection: Socket | null;
175
-        socket: Socket | null;
176
-
177
-        constructor();
178
-
179
-        setTimeout(msecs: number, callback?: () => void): this;
180
-        setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
181
-        getHeader(name: string): number | string | string[] | undefined;
182
-        getHeaders(): OutgoingHttpHeaders;
183
-        getHeaderNames(): string[];
184
-        hasHeader(name: string): boolean;
185
-        removeHeader(name: string): void;
186
-        addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
187
-        flushHeaders(): void;
188
-    }
189
-
190
-    // https://github.com/nodejs/node/blob/master/lib/_http_server.js#L108-L256
191
-    class ServerResponse extends OutgoingMessage {
192
-        statusCode: number;
193
-        statusMessage: string;
194
-
195
-        constructor(req: IncomingMessage);
196
-
197
-        assignSocket(socket: Socket): void;
198
-        detachSocket(socket: Socket): void;
199
-        // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
200
-        // no args in writeContinue callback
201
-        writeContinue(callback?: () => void): void;
202
-        writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
203
-        writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
204
-        writeProcessing(): void;
205
-    }
206
-
207
-    interface InformationEvent {
208
-        statusCode: number;
209
-        statusMessage: string;
210
-        httpVersion: string;
211
-        httpVersionMajor: number;
212
-        httpVersionMinor: number;
213
-        headers: IncomingHttpHeaders;
214
-        rawHeaders: string[];
215
-    }
216
-
217
-    // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
218
-    class ClientRequest extends OutgoingMessage {
219
-        aborted: boolean;
220
-        host: string;
221
-        protocol: string;
222
-
223
-        constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
224
-
225
-        method: string;
226
-        path: string;
227
-        /** @deprecated since v14.1.0 Use `request.destroy()` instead. */
228
-        abort(): void;
229
-        onSocket(socket: Socket): void;
230
-        setTimeout(timeout: number, callback?: () => void): this;
231
-        setNoDelay(noDelay?: boolean): void;
232
-        setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
233
-
234
-        addListener(event: 'abort', listener: () => void): this;
235
-        addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
236
-        addListener(event: 'continue', listener: () => void): this;
237
-        addListener(event: 'information', listener: (info: InformationEvent) => void): this;
238
-        addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
239
-        addListener(event: 'socket', listener: (socket: Socket) => void): this;
240
-        addListener(event: 'timeout', listener: () => void): this;
241
-        addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
242
-        addListener(event: 'close', listener: () => void): this;
243
-        addListener(event: 'drain', listener: () => void): this;
244
-        addListener(event: 'error', listener: (err: Error) => void): this;
245
-        addListener(event: 'finish', listener: () => void): this;
246
-        addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
247
-        addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
248
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
249
-
250
-        on(event: 'abort', listener: () => void): this;
251
-        on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
252
-        on(event: 'continue', listener: () => void): this;
253
-        on(event: 'information', listener: (info: InformationEvent) => void): this;
254
-        on(event: 'response', listener: (response: IncomingMessage) => void): this;
255
-        on(event: 'socket', listener: (socket: Socket) => void): this;
256
-        on(event: 'timeout', listener: () => void): this;
257
-        on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
258
-        on(event: 'close', listener: () => void): this;
259
-        on(event: 'drain', listener: () => void): this;
260
-        on(event: 'error', listener: (err: Error) => void): this;
261
-        on(event: 'finish', listener: () => void): this;
262
-        on(event: 'pipe', listener: (src: stream.Readable) => void): this;
263
-        on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
264
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
265
-
266
-        once(event: 'abort', listener: () => void): this;
267
-        once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
268
-        once(event: 'continue', listener: () => void): this;
269
-        once(event: 'information', listener: (info: InformationEvent) => void): this;
270
-        once(event: 'response', listener: (response: IncomingMessage) => void): this;
271
-        once(event: 'socket', listener: (socket: Socket) => void): this;
272
-        once(event: 'timeout', listener: () => void): this;
273
-        once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
274
-        once(event: 'close', listener: () => void): this;
275
-        once(event: 'drain', listener: () => void): this;
276
-        once(event: 'error', listener: (err: Error) => void): this;
277
-        once(event: 'finish', listener: () => void): this;
278
-        once(event: 'pipe', listener: (src: stream.Readable) => void): this;
279
-        once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
280
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
281
-
282
-        prependListener(event: 'abort', listener: () => void): this;
283
-        prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
284
-        prependListener(event: 'continue', listener: () => void): this;
285
-        prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
286
-        prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
287
-        prependListener(event: 'socket', listener: (socket: Socket) => void): this;
288
-        prependListener(event: 'timeout', listener: () => void): this;
289
-        prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
290
-        prependListener(event: 'close', listener: () => void): this;
291
-        prependListener(event: 'drain', listener: () => void): this;
292
-        prependListener(event: 'error', listener: (err: Error) => void): this;
293
-        prependListener(event: 'finish', listener: () => void): this;
294
-        prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
295
-        prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
296
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
297
-
298
-        prependOnceListener(event: 'abort', listener: () => void): this;
299
-        prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
300
-        prependOnceListener(event: 'continue', listener: () => void): this;
301
-        prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
302
-        prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
303
-        prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
304
-        prependOnceListener(event: 'timeout', listener: () => void): this;
305
-        prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
306
-        prependOnceListener(event: 'close', listener: () => void): this;
307
-        prependOnceListener(event: 'drain', listener: () => void): this;
308
-        prependOnceListener(event: 'error', listener: (err: Error) => void): this;
309
-        prependOnceListener(event: 'finish', listener: () => void): this;
310
-        prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
311
-        prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
312
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
313
-    }
314
-
315
-    class IncomingMessage extends stream.Readable {
316
-        constructor(socket: Socket);
317
-
318
-        aborted: boolean;
319
-        httpVersion: string;
320
-        httpVersionMajor: number;
321
-        httpVersionMinor: number;
322
-        complete: boolean;
323
-        /**
324
-         * @deprecated since v13.0.0 - Use `socket` instead.
325
-         */
326
-        connection: Socket;
327
-        socket: Socket;
328
-        headers: IncomingHttpHeaders;
329
-        rawHeaders: string[];
330
-        trailers: NodeJS.Dict<string>;
331
-        rawTrailers: string[];
332
-        setTimeout(msecs: number, callback?: () => void): this;
333
-        /**
334
-         * Only valid for request obtained from http.Server.
335
-         */
336
-        method?: string;
337
-        /**
338
-         * Only valid for request obtained from http.Server.
339
-         */
340
-        url?: string;
341
-        /**
342
-         * Only valid for response obtained from http.ClientRequest.
343
-         */
344
-        statusCode?: number;
345
-        /**
346
-         * Only valid for response obtained from http.ClientRequest.
347
-         */
348
-        statusMessage?: string;
349
-        destroy(error?: Error): void;
350
-    }
351
-
352
-    interface AgentOptions {
353
-        /**
354
-         * Keep sockets around in a pool to be used by other requests in the future. Default = false
355
-         */
356
-        keepAlive?: boolean;
357
-        /**
358
-         * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
359
-         * Only relevant if keepAlive is set to true.
360
-         */
361
-        keepAliveMsecs?: number;
362
-        /**
363
-         * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
364
-         */
365
-        maxSockets?: number;
366
-        /**
367
-         * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
368
-         */
369
-        maxTotalSockets?: number;
370
-        /**
371
-         * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
372
-         */
373
-        maxFreeSockets?: number;
374
-        /**
375
-         * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
376
-         */
377
-        timeout?: number;
378
-        /**
379
-         * Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
380
-         */
381
-        scheduling?: 'fifo' | 'lifo';
382
-    }
383
-
384
-    class Agent {
385
-        maxFreeSockets: number;
386
-        maxSockets: number;
387
-        maxTotalSockets: number;
388
-        readonly freeSockets: NodeJS.ReadOnlyDict<Socket[]>;
389
-        readonly sockets: NodeJS.ReadOnlyDict<Socket[]>;
390
-        readonly requests: NodeJS.ReadOnlyDict<IncomingMessage[]>;
391
-
392
-        constructor(opts?: AgentOptions);
393
-
394
-        /**
395
-         * Destroy any sockets that are currently in use by the agent.
396
-         * It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
397
-         * then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
398
-         * sockets may hang open for quite a long time before the server terminates them.
399
-         */
400
-        destroy(): void;
401
-    }
402
-
403
-    const METHODS: string[];
404
-
405
-    const STATUS_CODES: {
406
-        [errorCode: number]: string | undefined;
407
-        [errorCode: string]: string | undefined;
408
-    };
409
-
410
-    function createServer(requestListener?: RequestListener): Server;
411
-    function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
412
-
413
-    // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
414
-    // create interface RequestOptions would make the naming more clear to developers
415
-    interface RequestOptions extends ClientRequestArgs { }
416
-    function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
417
-    function request(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
418
-    function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
419
-    function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
420
-    let globalAgent: Agent;
421
-
422
-    /**
423
-     * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
424
-     * Defaults to 16KB. Configurable using the [`--max-http-header-size`][] CLI option.
425
-     */
426
-    const maxHeaderSize: number;
427
-}
... ...
@@ -1,962 +0,0 @@
1
-declare module 'node:http2' {
2
-    export * from 'http2';
3
-}
4
-
5
-declare module 'http2' {
6
-    import EventEmitter = require('node:events');
7
-    import * as fs from 'node:fs';
8
-    import * as net from 'node:net';
9
-    import * as stream from 'node:stream';
10
-    import * as tls from 'node:tls';
11
-    import * as url from 'node:url';
12
-
13
-    import {
14
-        IncomingHttpHeaders as Http1IncomingHttpHeaders,
15
-        OutgoingHttpHeaders,
16
-        IncomingMessage,
17
-        ServerResponse,
18
-    } from 'node:http';
19
-    export { OutgoingHttpHeaders } from 'node:http';
20
-
21
-    export interface IncomingHttpStatusHeader {
22
-        ":status"?: number;
23
-    }
24
-
25
-    export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
26
-        ":path"?: string;
27
-        ":method"?: string;
28
-        ":authority"?: string;
29
-        ":scheme"?: string;
30
-    }
31
-
32
-    // Http2Stream
33
-
34
-    export interface StreamPriorityOptions {
35
-        exclusive?: boolean;
36
-        parent?: number;
37
-        weight?: number;
38
-        silent?: boolean;
39
-    }
40
-
41
-    export interface StreamState {
42
-        localWindowSize?: number;
43
-        state?: number;
44
-        localClose?: number;
45
-        remoteClose?: number;
46
-        sumDependencyWeight?: number;
47
-        weight?: number;
48
-    }
49
-
50
-    export interface ServerStreamResponseOptions {
51
-        endStream?: boolean;
52
-        waitForTrailers?: boolean;
53
-    }
54
-
55
-    export interface StatOptions {
56
-        offset: number;
57
-        length: number;
58
-    }
59
-
60
-    export interface ServerStreamFileResponseOptions {
61
-        statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
62
-        waitForTrailers?: boolean;
63
-        offset?: number;
64
-        length?: number;
65
-    }
66
-
67
-    export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
68
-        onError?(err: NodeJS.ErrnoException): void;
69
-    }
70
-
71
-    export interface Http2Stream extends stream.Duplex {
72
-        readonly aborted: boolean;
73
-        readonly bufferSize: number;
74
-        readonly closed: boolean;
75
-        readonly destroyed: boolean;
76
-        /**
77
-         * Set the true if the END_STREAM flag was set in the request or response HEADERS frame received,
78
-         * indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
79
-         */
80
-        readonly endAfterHeaders: boolean;
81
-        readonly id?: number;
82
-        readonly pending: boolean;
83
-        readonly rstCode: number;
84
-        readonly sentHeaders: OutgoingHttpHeaders;
85
-        readonly sentInfoHeaders?: OutgoingHttpHeaders[];
86
-        readonly sentTrailers?: OutgoingHttpHeaders;
87
-        readonly session: Http2Session;
88
-        readonly state: StreamState;
89
-
90
-        close(code?: number, callback?: () => void): void;
91
-        priority(options: StreamPriorityOptions): void;
92
-        setTimeout(msecs: number, callback?: () => void): void;
93
-        sendTrailers(headers: OutgoingHttpHeaders): void;
94
-
95
-        addListener(event: "aborted", listener: () => void): this;
96
-        addListener(event: "close", listener: () => void): this;
97
-        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
98
-        addListener(event: "drain", listener: () => void): this;
99
-        addListener(event: "end", listener: () => void): this;
100
-        addListener(event: "error", listener: (err: Error) => void): this;
101
-        addListener(event: "finish", listener: () => void): this;
102
-        addListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
103
-        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
104
-        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
105
-        addListener(event: "streamClosed", listener: (code: number) => void): this;
106
-        addListener(event: "timeout", listener: () => void): this;
107
-        addListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
108
-        addListener(event: "wantTrailers", listener: () => void): this;
109
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
110
-
111
-        emit(event: "aborted"): boolean;
112
-        emit(event: "close"): boolean;
113
-        emit(event: "data", chunk: Buffer | string): boolean;
114
-        emit(event: "drain"): boolean;
115
-        emit(event: "end"): boolean;
116
-        emit(event: "error", err: Error): boolean;
117
-        emit(event: "finish"): boolean;
118
-        emit(event: "frameError", frameType: number, errorCode: number): boolean;
119
-        emit(event: "pipe", src: stream.Readable): boolean;
120
-        emit(event: "unpipe", src: stream.Readable): boolean;
121
-        emit(event: "streamClosed", code: number): boolean;
122
-        emit(event: "timeout"): boolean;
123
-        emit(event: "trailers", trailers: IncomingHttpHeaders, flags: number): boolean;
124
-        emit(event: "wantTrailers"): boolean;
125
-        emit(event: string | symbol, ...args: any[]): boolean;
126
-
127
-        on(event: "aborted", listener: () => void): this;
128
-        on(event: "close", listener: () => void): this;
129
-        on(event: "data", listener: (chunk: Buffer | string) => void): this;
130
-        on(event: "drain", listener: () => void): this;
131
-        on(event: "end", listener: () => void): this;
132
-        on(event: "error", listener: (err: Error) => void): this;
133
-        on(event: "finish", listener: () => void): this;
134
-        on(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
135
-        on(event: "pipe", listener: (src: stream.Readable) => void): this;
136
-        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
137
-        on(event: "streamClosed", listener: (code: number) => void): this;
138
-        on(event: "timeout", listener: () => void): this;
139
-        on(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
140
-        on(event: "wantTrailers", listener: () => void): this;
141
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
142
-
143
-        once(event: "aborted", listener: () => void): this;
144
-        once(event: "close", listener: () => void): this;
145
-        once(event: "data", listener: (chunk: Buffer | string) => void): this;
146
-        once(event: "drain", listener: () => void): this;
147
-        once(event: "end", listener: () => void): this;
148
-        once(event: "error", listener: (err: Error) => void): this;
149
-        once(event: "finish", listener: () => void): this;
150
-        once(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
151
-        once(event: "pipe", listener: (src: stream.Readable) => void): this;
152
-        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
153
-        once(event: "streamClosed", listener: (code: number) => void): this;
154
-        once(event: "timeout", listener: () => void): this;
155
-        once(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
156
-        once(event: "wantTrailers", listener: () => void): this;
157
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
158
-
159
-        prependListener(event: "aborted", listener: () => void): this;
160
-        prependListener(event: "close", listener: () => void): this;
161
-        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
162
-        prependListener(event: "drain", listener: () => void): this;
163
-        prependListener(event: "end", listener: () => void): this;
164
-        prependListener(event: "error", listener: (err: Error) => void): this;
165
-        prependListener(event: "finish", listener: () => void): this;
166
-        prependListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
167
-        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
168
-        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
169
-        prependListener(event: "streamClosed", listener: (code: number) => void): this;
170
-        prependListener(event: "timeout", listener: () => void): this;
171
-        prependListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
172
-        prependListener(event: "wantTrailers", listener: () => void): this;
173
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
174
-
175
-        prependOnceListener(event: "aborted", listener: () => void): this;
176
-        prependOnceListener(event: "close", listener: () => void): this;
177
-        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
178
-        prependOnceListener(event: "drain", listener: () => void): this;
179
-        prependOnceListener(event: "end", listener: () => void): this;
180
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
181
-        prependOnceListener(event: "finish", listener: () => void): this;
182
-        prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number) => void): this;
183
-        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
184
-        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
185
-        prependOnceListener(event: "streamClosed", listener: (code: number) => void): this;
186
-        prependOnceListener(event: "timeout", listener: () => void): this;
187
-        prependOnceListener(event: "trailers", listener: (trailers: IncomingHttpHeaders, flags: number) => void): this;
188
-        prependOnceListener(event: "wantTrailers", listener: () => void): this;
189
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
190
-    }
191
-
192
-    export interface ClientHttp2Stream extends Http2Stream {
193
-        addListener(event: "continue", listener: () => {}): this;
194
-        addListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
195
-        addListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
196
-        addListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
197
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
198
-
199
-        emit(event: "continue"): boolean;
200
-        emit(event: "headers", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
201
-        emit(event: "push", headers: IncomingHttpHeaders, flags: number): boolean;
202
-        emit(event: "response", headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
203
-        emit(event: string | symbol, ...args: any[]): boolean;
204
-
205
-        on(event: "continue", listener: () => {}): this;
206
-        on(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
207
-        on(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
208
-        on(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
209
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
210
-
211
-        once(event: "continue", listener: () => {}): this;
212
-        once(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
213
-        once(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
214
-        once(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
215
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
216
-
217
-        prependListener(event: "continue", listener: () => {}): this;
218
-        prependListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
219
-        prependListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
220
-        prependListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
221
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
222
-
223
-        prependOnceListener(event: "continue", listener: () => {}): this;
224
-        prependOnceListener(event: "headers", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
225
-        prependOnceListener(event: "push", listener: (headers: IncomingHttpHeaders, flags: number) => void): this;
226
-        prependOnceListener(event: "response", listener: (headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
227
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
228
-    }
229
-
230
-    export interface ServerHttp2Stream extends Http2Stream {
231
-        readonly headersSent: boolean;
232
-        readonly pushAllowed: boolean;
233
-        additionalHeaders(headers: OutgoingHttpHeaders): void;
234
-        pushStream(headers: OutgoingHttpHeaders, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
235
-        pushStream(headers: OutgoingHttpHeaders, options?: StreamPriorityOptions, callback?: (err: Error | null, pushStream: ServerHttp2Stream, headers: OutgoingHttpHeaders) => void): void;
236
-        respond(headers?: OutgoingHttpHeaders, options?: ServerStreamResponseOptions): void;
237
-        respondWithFD(fd: number | fs.promises.FileHandle, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptions): void;
238
-        respondWithFile(path: string, headers?: OutgoingHttpHeaders, options?: ServerStreamFileResponseOptionsWithError): void;
239
-    }
240
-
241
-    // Http2Session
242
-
243
-    export interface Settings {
244
-        headerTableSize?: number;
245
-        enablePush?: boolean;
246
-        initialWindowSize?: number;
247
-        maxFrameSize?: number;
248
-        maxConcurrentStreams?: number;
249
-        maxHeaderListSize?: number;
250
-        enableConnectProtocol?: boolean;
251
-    }
252
-
253
-    export interface ClientSessionRequestOptions {
254
-        endStream?: boolean;
255
-        exclusive?: boolean;
256
-        parent?: number;
257
-        weight?: number;
258
-        waitForTrailers?: boolean;
259
-    }
260
-
261
-    export interface SessionState {
262
-        effectiveLocalWindowSize?: number;
263
-        effectiveRecvDataLength?: number;
264
-        nextStreamID?: number;
265
-        localWindowSize?: number;
266
-        lastProcStreamID?: number;
267
-        remoteWindowSize?: number;
268
-        outboundQueueSize?: number;
269
-        deflateDynamicTableSize?: number;
270
-        inflateDynamicTableSize?: number;
271
-    }
272
-
273
-    export interface Http2Session extends EventEmitter {
274
-        readonly alpnProtocol?: string;
275
-        readonly closed: boolean;
276
-        readonly connecting: boolean;
277
-        readonly destroyed: boolean;
278
-        readonly encrypted?: boolean;
279
-        readonly localSettings: Settings;
280
-        readonly originSet?: string[];
281
-        readonly pendingSettingsAck: boolean;
282
-        readonly remoteSettings: Settings;
283
-        readonly socket: net.Socket | tls.TLSSocket;
284
-        readonly state: SessionState;
285
-        readonly type: number;
286
-
287
-        close(callback?: () => void): void;
288
-        destroy(error?: Error, code?: number): void;
289
-        goaway(code?: number, lastStreamID?: number, opaqueData?: NodeJS.ArrayBufferView): void;
290
-        ping(callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
291
-        ping(payload: NodeJS.ArrayBufferView, callback: (err: Error | null, duration: number, payload: Buffer) => void): boolean;
292
-        ref(): void;
293
-        setLocalWindowSize(windowSize: number): void;
294
-        setTimeout(msecs: number, callback?: () => void): void;
295
-        settings(settings: Settings): void;
296
-        unref(): void;
297
-
298
-        addListener(event: "close", listener: () => void): this;
299
-        addListener(event: "error", listener: (err: Error) => void): this;
300
-        addListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
301
-        addListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
302
-        addListener(event: "localSettings", listener: (settings: Settings) => void): this;
303
-        addListener(event: "ping", listener: () => void): this;
304
-        addListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
305
-        addListener(event: "timeout", listener: () => void): this;
306
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
307
-
308
-        emit(event: "close"): boolean;
309
-        emit(event: "error", err: Error): boolean;
310
-        emit(event: "frameError", frameType: number, errorCode: number, streamID: number): boolean;
311
-        emit(event: "goaway", errorCode: number, lastStreamID: number, opaqueData: Buffer): boolean;
312
-        emit(event: "localSettings", settings: Settings): boolean;
313
-        emit(event: "ping"): boolean;
314
-        emit(event: "remoteSettings", settings: Settings): boolean;
315
-        emit(event: "timeout"): boolean;
316
-        emit(event: string | symbol, ...args: any[]): boolean;
317
-
318
-        on(event: "close", listener: () => void): this;
319
-        on(event: "error", listener: (err: Error) => void): this;
320
-        on(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
321
-        on(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
322
-        on(event: "localSettings", listener: (settings: Settings) => void): this;
323
-        on(event: "ping", listener: () => void): this;
324
-        on(event: "remoteSettings", listener: (settings: Settings) => void): this;
325
-        on(event: "timeout", listener: () => void): this;
326
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
327
-
328
-        once(event: "close", listener: () => void): this;
329
-        once(event: "error", listener: (err: Error) => void): this;
330
-        once(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
331
-        once(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
332
-        once(event: "localSettings", listener: (settings: Settings) => void): this;
333
-        once(event: "ping", listener: () => void): this;
334
-        once(event: "remoteSettings", listener: (settings: Settings) => void): this;
335
-        once(event: "timeout", listener: () => void): this;
336
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
337
-
338
-        prependListener(event: "close", listener: () => void): this;
339
-        prependListener(event: "error", listener: (err: Error) => void): this;
340
-        prependListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
341
-        prependListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
342
-        prependListener(event: "localSettings", listener: (settings: Settings) => void): this;
343
-        prependListener(event: "ping", listener: () => void): this;
344
-        prependListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
345
-        prependListener(event: "timeout", listener: () => void): this;
346
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
347
-
348
-        prependOnceListener(event: "close", listener: () => void): this;
349
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
350
-        prependOnceListener(event: "frameError", listener: (frameType: number, errorCode: number, streamID: number) => void): this;
351
-        prependOnceListener(event: "goaway", listener: (errorCode: number, lastStreamID: number, opaqueData: Buffer) => void): this;
352
-        prependOnceListener(event: "localSettings", listener: (settings: Settings) => void): this;
353
-        prependOnceListener(event: "ping", listener: () => void): this;
354
-        prependOnceListener(event: "remoteSettings", listener: (settings: Settings) => void): this;
355
-        prependOnceListener(event: "timeout", listener: () => void): this;
356
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
357
-    }
358
-
359
-    export interface ClientHttp2Session extends Http2Session {
360
-        request(headers?: OutgoingHttpHeaders, options?: ClientSessionRequestOptions): ClientHttp2Stream;
361
-
362
-        addListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
363
-        addListener(event: "origin", listener: (origins: string[]) => void): this;
364
-        addListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
365
-        addListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
366
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
367
-
368
-        emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
369
-        emit(event: "origin", origins: ReadonlyArray<string>): boolean;
370
-        emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
371
-        emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
372
-        emit(event: string | symbol, ...args: any[]): boolean;
373
-
374
-        on(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
375
-        on(event: "origin", listener: (origins: string[]) => void): this;
376
-        on(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
377
-        on(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
378
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
379
-
380
-        once(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
381
-        once(event: "origin", listener: (origins: string[]) => void): this;
382
-        once(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
383
-        once(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
384
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
385
-
386
-        prependListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
387
-        prependListener(event: "origin", listener: (origins: string[]) => void): this;
388
-        prependListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
389
-        prependListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
390
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
391
-
392
-        prependOnceListener(event: "altsvc", listener: (alt: string, origin: string, stream: number) => void): this;
393
-        prependOnceListener(event: "origin", listener: (origins: string[]) => void): this;
394
-        prependOnceListener(event: "connect", listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
395
-        prependOnceListener(event: "stream", listener: (stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number) => void): this;
396
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
397
-    }
398
-
399
-    export interface AlternativeServiceOptions {
400
-        origin: number | string | url.URL;
401
-    }
402
-
403
-    export interface ServerHttp2Session extends Http2Session {
404
-        readonly server: Http2Server | Http2SecureServer;
405
-
406
-        altsvc(alt: string, originOrStream: number | string | url.URL | AlternativeServiceOptions): void;
407
-        origin(...args: Array<string | url.URL | { origin: string }>): void;
408
-
409
-        addListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
410
-        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
411
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
412
-
413
-        emit(event: "connect", session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
414
-        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
415
-        emit(event: string | symbol, ...args: any[]): boolean;
416
-
417
-        on(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
418
-        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
419
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
420
-
421
-        once(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
422
-        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
423
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
424
-
425
-        prependListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
426
-        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
427
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
428
-
429
-        prependOnceListener(event: "connect", listener: (session: ServerHttp2Session, socket: net.Socket | tls.TLSSocket) => void): this;
430
-        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
431
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
432
-    }
433
-
434
-    // Http2Server
435
-
436
-    export interface SessionOptions {
437
-        maxDeflateDynamicTableSize?: number;
438
-        maxSessionMemory?: number;
439
-        maxHeaderListPairs?: number;
440
-        maxOutstandingPings?: number;
441
-        maxSendHeaderBlockLength?: number;
442
-        paddingStrategy?: number;
443
-        peerMaxConcurrentStreams?: number;
444
-        settings?: Settings;
445
-
446
-        selectPadding?(frameLen: number, maxFrameLen: number): number;
447
-        createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
448
-    }
449
-
450
-    export interface ClientSessionOptions extends SessionOptions {
451
-        maxReservedRemoteStreams?: number;
452
-        createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
453
-        protocol?: 'http:' | 'https:';
454
-    }
455
-
456
-    export interface ServerSessionOptions extends SessionOptions {
457
-        Http1IncomingMessage?: typeof IncomingMessage;
458
-        Http1ServerResponse?: typeof ServerResponse;
459
-        Http2ServerRequest?: typeof Http2ServerRequest;
460
-        Http2ServerResponse?: typeof Http2ServerResponse;
461
-    }
462
-
463
-    export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
464
-    export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
465
-
466
-    export interface ServerOptions extends ServerSessionOptions { }
467
-
468
-    export interface SecureServerOptions extends SecureServerSessionOptions {
469
-        allowHTTP1?: boolean;
470
-        origins?: string[];
471
-    }
472
-
473
-    export interface Http2Server extends net.Server {
474
-        addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
475
-        addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
476
-        addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
477
-        addListener(event: "sessionError", listener: (err: Error) => void): this;
478
-        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
479
-        addListener(event: "timeout", listener: () => void): this;
480
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
481
-
482
-        emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
483
-        emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
484
-        emit(event: "session", session: ServerHttp2Session): boolean;
485
-        emit(event: "sessionError", err: Error): boolean;
486
-        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
487
-        emit(event: "timeout"): boolean;
488
-        emit(event: string | symbol, ...args: any[]): boolean;
489
-
490
-        on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
491
-        on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
492
-        on(event: "session", listener: (session: ServerHttp2Session) => void): this;
493
-        on(event: "sessionError", listener: (err: Error) => void): this;
494
-        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
495
-        on(event: "timeout", listener: () => void): this;
496
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
497
-
498
-        once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
499
-        once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
500
-        once(event: "session", listener: (session: ServerHttp2Session) => void): this;
501
-        once(event: "sessionError", listener: (err: Error) => void): this;
502
-        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
503
-        once(event: "timeout", listener: () => void): this;
504
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
505
-
506
-        prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
507
-        prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
508
-        prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
509
-        prependListener(event: "sessionError", listener: (err: Error) => void): this;
510
-        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
511
-        prependListener(event: "timeout", listener: () => void): this;
512
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
513
-
514
-        prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
515
-        prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
516
-        prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
517
-        prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
518
-        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
519
-        prependOnceListener(event: "timeout", listener: () => void): this;
520
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
521
-
522
-        setTimeout(msec?: number, callback?: () => void): this;
523
-    }
524
-
525
-    export interface Http2SecureServer extends tls.Server {
526
-        addListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
527
-        addListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
528
-        addListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
529
-        addListener(event: "sessionError", listener: (err: Error) => void): this;
530
-        addListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
531
-        addListener(event: "timeout", listener: () => void): this;
532
-        addListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
533
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
534
-
535
-        emit(event: "checkContinue", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
536
-        emit(event: "request", request: Http2ServerRequest, response: Http2ServerResponse): boolean;
537
-        emit(event: "session", session: ServerHttp2Session): boolean;
538
-        emit(event: "sessionError", err: Error): boolean;
539
-        emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
540
-        emit(event: "timeout"): boolean;
541
-        emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
542
-        emit(event: string | symbol, ...args: any[]): boolean;
543
-
544
-        on(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
545
-        on(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
546
-        on(event: "session", listener: (session: ServerHttp2Session) => void): this;
547
-        on(event: "sessionError", listener: (err: Error) => void): this;
548
-        on(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
549
-        on(event: "timeout", listener: () => void): this;
550
-        on(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
551
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
552
-
553
-        once(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
554
-        once(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
555
-        once(event: "session", listener: (session: ServerHttp2Session) => void): this;
556
-        once(event: "sessionError", listener: (err: Error) => void): this;
557
-        once(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
558
-        once(event: "timeout", listener: () => void): this;
559
-        once(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
560
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
561
-
562
-        prependListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
563
-        prependListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
564
-        prependListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
565
-        prependListener(event: "sessionError", listener: (err: Error) => void): this;
566
-        prependListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
567
-        prependListener(event: "timeout", listener: () => void): this;
568
-        prependListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
569
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
570
-
571
-        prependOnceListener(event: "checkContinue", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
572
-        prependOnceListener(event: "request", listener: (request: Http2ServerRequest, response: Http2ServerResponse) => void): this;
573
-        prependOnceListener(event: "session", listener: (session: ServerHttp2Session) => void): this;
574
-        prependOnceListener(event: "sessionError", listener: (err: Error) => void): this;
575
-        prependOnceListener(event: "stream", listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void): this;
576
-        prependOnceListener(event: "timeout", listener: () => void): this;
577
-        prependOnceListener(event: "unknownProtocol", listener: (socket: tls.TLSSocket) => void): this;
578
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
579
-
580
-        setTimeout(msec?: number, callback?: () => void): this;
581
-    }
582
-
583
-    export class Http2ServerRequest extends stream.Readable {
584
-        constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
585
-
586
-        readonly aborted: boolean;
587
-        readonly authority: string;
588
-        readonly connection: net.Socket | tls.TLSSocket;
589
-        readonly complete: boolean;
590
-        readonly headers: IncomingHttpHeaders;
591
-        readonly httpVersion: string;
592
-        readonly httpVersionMinor: number;
593
-        readonly httpVersionMajor: number;
594
-        readonly method: string;
595
-        readonly rawHeaders: string[];
596
-        readonly rawTrailers: string[];
597
-        readonly scheme: string;
598
-        readonly socket: net.Socket | tls.TLSSocket;
599
-        readonly stream: ServerHttp2Stream;
600
-        readonly trailers: IncomingHttpHeaders;
601
-        readonly url: string;
602
-
603
-        setTimeout(msecs: number, callback?: () => void): void;
604
-        read(size?: number): Buffer | string | null;
605
-
606
-        addListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
607
-        addListener(event: "close", listener: () => void): this;
608
-        addListener(event: "data", listener: (chunk: Buffer | string) => void): this;
609
-        addListener(event: "end", listener: () => void): this;
610
-        addListener(event: "readable", listener: () => void): this;
611
-        addListener(event: "error", listener: (err: Error) => void): this;
612
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
613
-
614
-        emit(event: "aborted", hadError: boolean, code: number): boolean;
615
-        emit(event: "close"): boolean;
616
-        emit(event: "data", chunk: Buffer | string): boolean;
617
-        emit(event: "end"): boolean;
618
-        emit(event: "readable"): boolean;
619
-        emit(event: "error", err: Error): boolean;
620
-        emit(event: string | symbol, ...args: any[]): boolean;
621
-
622
-        on(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
623
-        on(event: "close", listener: () => void): this;
624
-        on(event: "data", listener: (chunk: Buffer | string) => void): this;
625
-        on(event: "end", listener: () => void): this;
626
-        on(event: "readable", listener: () => void): this;
627
-        on(event: "error", listener: (err: Error) => void): this;
628
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
629
-
630
-        once(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
631
-        once(event: "close", listener: () => void): this;
632
-        once(event: "data", listener: (chunk: Buffer | string) => void): this;
633
-        once(event: "end", listener: () => void): this;
634
-        once(event: "readable", listener: () => void): this;
635
-        once(event: "error", listener: (err: Error) => void): this;
636
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
637
-
638
-        prependListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
639
-        prependListener(event: "close", listener: () => void): this;
640
-        prependListener(event: "data", listener: (chunk: Buffer | string) => void): this;
641
-        prependListener(event: "end", listener: () => void): this;
642
-        prependListener(event: "readable", listener: () => void): this;
643
-        prependListener(event: "error", listener: (err: Error) => void): this;
644
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
645
-
646
-        prependOnceListener(event: "aborted", listener: (hadError: boolean, code: number) => void): this;
647
-        prependOnceListener(event: "close", listener: () => void): this;
648
-        prependOnceListener(event: "data", listener: (chunk: Buffer | string) => void): this;
649
-        prependOnceListener(event: "end", listener: () => void): this;
650
-        prependOnceListener(event: "readable", listener: () => void): this;
651
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
652
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
653
-    }
654
-
655
-    export class Http2ServerResponse extends stream.Stream {
656
-        constructor(stream: ServerHttp2Stream);
657
-
658
-        readonly connection: net.Socket | tls.TLSSocket;
659
-        readonly finished: boolean;
660
-        readonly headersSent: boolean;
661
-        readonly socket: net.Socket | tls.TLSSocket;
662
-        readonly stream: ServerHttp2Stream;
663
-        sendDate: boolean;
664
-        statusCode: number;
665
-        statusMessage: '';
666
-        addTrailers(trailers: OutgoingHttpHeaders): void;
667
-        end(callback?: () => void): void;
668
-        end(data: string | Uint8Array, callback?: () => void): void;
669
-        end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void;
670
-        getHeader(name: string): string;
671
-        getHeaderNames(): string[];
672
-        getHeaders(): OutgoingHttpHeaders;
673
-        hasHeader(name: string): boolean;
674
-        removeHeader(name: string): void;
675
-        setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
676
-        setTimeout(msecs: number, callback?: () => void): void;
677
-        write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
678
-        write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
679
-        writeContinue(): void;
680
-        writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
681
-        writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
682
-        createPushResponse(headers: OutgoingHttpHeaders, callback: (err: Error | null, res: Http2ServerResponse) => void): void;
683
-
684
-        addListener(event: "close", listener: () => void): this;
685
-        addListener(event: "drain", listener: () => void): this;
686
-        addListener(event: "error", listener: (error: Error) => void): this;
687
-        addListener(event: "finish", listener: () => void): this;
688
-        addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
689
-        addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
690
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
691
-
692
-        emit(event: "close"): boolean;
693
-        emit(event: "drain"): boolean;
694
-        emit(event: "error", error: Error): boolean;
695
-        emit(event: "finish"): boolean;
696
-        emit(event: "pipe", src: stream.Readable): boolean;
697
-        emit(event: "unpipe", src: stream.Readable): boolean;
698
-        emit(event: string | symbol, ...args: any[]): boolean;
699
-
700
-        on(event: "close", listener: () => void): this;
701
-        on(event: "drain", listener: () => void): this;
702
-        on(event: "error", listener: (error: Error) => void): this;
703
-        on(event: "finish", listener: () => void): this;
704
-        on(event: "pipe", listener: (src: stream.Readable) => void): this;
705
-        on(event: "unpipe", listener: (src: stream.Readable) => void): this;
706
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
707
-
708
-        once(event: "close", listener: () => void): this;
709
-        once(event: "drain", listener: () => void): this;
710
-        once(event: "error", listener: (error: Error) => void): this;
711
-        once(event: "finish", listener: () => void): this;
712
-        once(event: "pipe", listener: (src: stream.Readable) => void): this;
713
-        once(event: "unpipe", listener: (src: stream.Readable) => void): this;
714
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
715
-
716
-        prependListener(event: "close", listener: () => void): this;
717
-        prependListener(event: "drain", listener: () => void): this;
718
-        prependListener(event: "error", listener: (error: Error) => void): this;
719
-        prependListener(event: "finish", listener: () => void): this;
720
-        prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
721
-        prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
722
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
723
-
724
-        prependOnceListener(event: "close", listener: () => void): this;
725
-        prependOnceListener(event: "drain", listener: () => void): this;
726
-        prependOnceListener(event: "error", listener: (error: Error) => void): this;
727
-        prependOnceListener(event: "finish", listener: () => void): this;
728
-        prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
729
-        prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
730
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
731
-    }
732
-
733
-    // Public API
734
-
735
-    export namespace constants {
736
-        const NGHTTP2_SESSION_SERVER: number;
737
-        const NGHTTP2_SESSION_CLIENT: number;
738
-        const NGHTTP2_STREAM_STATE_IDLE: number;
739
-        const NGHTTP2_STREAM_STATE_OPEN: number;
740
-        const NGHTTP2_STREAM_STATE_RESERVED_LOCAL: number;
741
-        const NGHTTP2_STREAM_STATE_RESERVED_REMOTE: number;
742
-        const NGHTTP2_STREAM_STATE_HALF_CLOSED_LOCAL: number;
743
-        const NGHTTP2_STREAM_STATE_HALF_CLOSED_REMOTE: number;
744
-        const NGHTTP2_STREAM_STATE_CLOSED: number;
745
-        const NGHTTP2_NO_ERROR: number;
746
-        const NGHTTP2_PROTOCOL_ERROR: number;
747
-        const NGHTTP2_INTERNAL_ERROR: number;
748
-        const NGHTTP2_FLOW_CONTROL_ERROR: number;
749
-        const NGHTTP2_SETTINGS_TIMEOUT: number;
750
-        const NGHTTP2_STREAM_CLOSED: number;
751
-        const NGHTTP2_FRAME_SIZE_ERROR: number;
752
-        const NGHTTP2_REFUSED_STREAM: number;
753
-        const NGHTTP2_CANCEL: number;
754
-        const NGHTTP2_COMPRESSION_ERROR: number;
755
-        const NGHTTP2_CONNECT_ERROR: number;
756
-        const NGHTTP2_ENHANCE_YOUR_CALM: number;
757
-        const NGHTTP2_INADEQUATE_SECURITY: number;
758
-        const NGHTTP2_HTTP_1_1_REQUIRED: number;
759
-        const NGHTTP2_ERR_FRAME_SIZE_ERROR: number;
760
-        const NGHTTP2_FLAG_NONE: number;
761
-        const NGHTTP2_FLAG_END_STREAM: number;
762
-        const NGHTTP2_FLAG_END_HEADERS: number;
763
-        const NGHTTP2_FLAG_ACK: number;
764
-        const NGHTTP2_FLAG_PADDED: number;
765
-        const NGHTTP2_FLAG_PRIORITY: number;
766
-        const DEFAULT_SETTINGS_HEADER_TABLE_SIZE: number;
767
-        const DEFAULT_SETTINGS_ENABLE_PUSH: number;
768
-        const DEFAULT_SETTINGS_INITIAL_WINDOW_SIZE: number;
769
-        const DEFAULT_SETTINGS_MAX_FRAME_SIZE: number;
770
-        const MAX_MAX_FRAME_SIZE: number;
771
-        const MIN_MAX_FRAME_SIZE: number;
772
-        const MAX_INITIAL_WINDOW_SIZE: number;
773
-        const NGHTTP2_DEFAULT_WEIGHT: number;
774
-        const NGHTTP2_SETTINGS_HEADER_TABLE_SIZE: number;
775
-        const NGHTTP2_SETTINGS_ENABLE_PUSH: number;
776
-        const NGHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS: number;
777
-        const NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE: number;
778
-        const NGHTTP2_SETTINGS_MAX_FRAME_SIZE: number;
779
-        const NGHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE: number;
780
-        const PADDING_STRATEGY_NONE: number;
781
-        const PADDING_STRATEGY_MAX: number;
782
-        const PADDING_STRATEGY_CALLBACK: number;
783
-        const HTTP2_HEADER_STATUS: string;
784
-        const HTTP2_HEADER_METHOD: string;
785
-        const HTTP2_HEADER_AUTHORITY: string;
786
-        const HTTP2_HEADER_SCHEME: string;
787
-        const HTTP2_HEADER_PATH: string;
788
-        const HTTP2_HEADER_ACCEPT_CHARSET: string;
789
-        const HTTP2_HEADER_ACCEPT_ENCODING: string;
790
-        const HTTP2_HEADER_ACCEPT_LANGUAGE: string;
791
-        const HTTP2_HEADER_ACCEPT_RANGES: string;
792
-        const HTTP2_HEADER_ACCEPT: string;
793
-        const HTTP2_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN: string;
794
-        const HTTP2_HEADER_AGE: string;
795
-        const HTTP2_HEADER_ALLOW: string;
796
-        const HTTP2_HEADER_AUTHORIZATION: string;
797
-        const HTTP2_HEADER_CACHE_CONTROL: string;
798
-        const HTTP2_HEADER_CONNECTION: string;
799
-        const HTTP2_HEADER_CONTENT_DISPOSITION: string;
800
-        const HTTP2_HEADER_CONTENT_ENCODING: string;
801
-        const HTTP2_HEADER_CONTENT_LANGUAGE: string;
802
-        const HTTP2_HEADER_CONTENT_LENGTH: string;
803
-        const HTTP2_HEADER_CONTENT_LOCATION: string;
804
-        const HTTP2_HEADER_CONTENT_MD5: string;
805
-        const HTTP2_HEADER_CONTENT_RANGE: string;
806
-        const HTTP2_HEADER_CONTENT_TYPE: string;
807
-        const HTTP2_HEADER_COOKIE: string;
808
-        const HTTP2_HEADER_DATE: string;
809
-        const HTTP2_HEADER_ETAG: string;
810
-        const HTTP2_HEADER_EXPECT: string;
811
-        const HTTP2_HEADER_EXPIRES: string;
812
-        const HTTP2_HEADER_FROM: string;
813
-        const HTTP2_HEADER_HOST: string;
814
-        const HTTP2_HEADER_IF_MATCH: string;
815
-        const HTTP2_HEADER_IF_MODIFIED_SINCE: string;
816
-        const HTTP2_HEADER_IF_NONE_MATCH: string;
817
-        const HTTP2_HEADER_IF_RANGE: string;
818
-        const HTTP2_HEADER_IF_UNMODIFIED_SINCE: string;
819
-        const HTTP2_HEADER_LAST_MODIFIED: string;
820
-        const HTTP2_HEADER_LINK: string;
821
-        const HTTP2_HEADER_LOCATION: string;
822
-        const HTTP2_HEADER_MAX_FORWARDS: string;
823
-        const HTTP2_HEADER_PREFER: string;
824
-        const HTTP2_HEADER_PROXY_AUTHENTICATE: string;
825
-        const HTTP2_HEADER_PROXY_AUTHORIZATION: string;
826
-        const HTTP2_HEADER_RANGE: string;
827
-        const HTTP2_HEADER_REFERER: string;
828
-        const HTTP2_HEADER_REFRESH: string;
829
-        const HTTP2_HEADER_RETRY_AFTER: string;
830
-        const HTTP2_HEADER_SERVER: string;
831
-        const HTTP2_HEADER_SET_COOKIE: string;
832
-        const HTTP2_HEADER_STRICT_TRANSPORT_SECURITY: string;
833
-        const HTTP2_HEADER_TRANSFER_ENCODING: string;
834
-        const HTTP2_HEADER_TE: string;
835
-        const HTTP2_HEADER_UPGRADE: string;
836
-        const HTTP2_HEADER_USER_AGENT: string;
837
-        const HTTP2_HEADER_VARY: string;
838
-        const HTTP2_HEADER_VIA: string;
839
-        const HTTP2_HEADER_WWW_AUTHENTICATE: string;
840
-        const HTTP2_HEADER_HTTP2_SETTINGS: string;
841
-        const HTTP2_HEADER_KEEP_ALIVE: string;
842
-        const HTTP2_HEADER_PROXY_CONNECTION: string;
843
-        const HTTP2_METHOD_ACL: string;
844
-        const HTTP2_METHOD_BASELINE_CONTROL: string;
845
-        const HTTP2_METHOD_BIND: string;
846
-        const HTTP2_METHOD_CHECKIN: string;
847
-        const HTTP2_METHOD_CHECKOUT: string;
848
-        const HTTP2_METHOD_CONNECT: string;
849
-        const HTTP2_METHOD_COPY: string;
850
-        const HTTP2_METHOD_DELETE: string;
851
-        const HTTP2_METHOD_GET: string;
852
-        const HTTP2_METHOD_HEAD: string;
853
-        const HTTP2_METHOD_LABEL: string;
854
-        const HTTP2_METHOD_LINK: string;
855
-        const HTTP2_METHOD_LOCK: string;
856
-        const HTTP2_METHOD_MERGE: string;
857
-        const HTTP2_METHOD_MKACTIVITY: string;
858
-        const HTTP2_METHOD_MKCALENDAR: string;
859
-        const HTTP2_METHOD_MKCOL: string;
860
-        const HTTP2_METHOD_MKREDIRECTREF: string;
861
-        const HTTP2_METHOD_MKWORKSPACE: string;
862
-        const HTTP2_METHOD_MOVE: string;
863
-        const HTTP2_METHOD_OPTIONS: string;
864
-        const HTTP2_METHOD_ORDERPATCH: string;
865
-        const HTTP2_METHOD_PATCH: string;
866
-        const HTTP2_METHOD_POST: string;
867
-        const HTTP2_METHOD_PRI: string;
868
-        const HTTP2_METHOD_PROPFIND: string;
869
-        const HTTP2_METHOD_PROPPATCH: string;
870
-        const HTTP2_METHOD_PUT: string;
871
-        const HTTP2_METHOD_REBIND: string;
872
-        const HTTP2_METHOD_REPORT: string;
873
-        const HTTP2_METHOD_SEARCH: string;
874
-        const HTTP2_METHOD_TRACE: string;
875
-        const HTTP2_METHOD_UNBIND: string;
876
-        const HTTP2_METHOD_UNCHECKOUT: string;
877
-        const HTTP2_METHOD_UNLINK: string;
878
-        const HTTP2_METHOD_UNLOCK: string;
879
-        const HTTP2_METHOD_UPDATE: string;
880
-        const HTTP2_METHOD_UPDATEREDIRECTREF: string;
881
-        const HTTP2_METHOD_VERSION_CONTROL: string;
882
-        const HTTP_STATUS_CONTINUE: number;
883
-        const HTTP_STATUS_SWITCHING_PROTOCOLS: number;
884
-        const HTTP_STATUS_PROCESSING: number;
885
-        const HTTP_STATUS_OK: number;
886
-        const HTTP_STATUS_CREATED: number;
887
-        const HTTP_STATUS_ACCEPTED: number;
888
-        const HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION: number;
889
-        const HTTP_STATUS_NO_CONTENT: number;
890
-        const HTTP_STATUS_RESET_CONTENT: number;
891
-        const HTTP_STATUS_PARTIAL_CONTENT: number;
892
-        const HTTP_STATUS_MULTI_STATUS: number;
893
-        const HTTP_STATUS_ALREADY_REPORTED: number;
894
-        const HTTP_STATUS_IM_USED: number;
895
-        const HTTP_STATUS_MULTIPLE_CHOICES: number;
896
-        const HTTP_STATUS_MOVED_PERMANENTLY: number;
897
-        const HTTP_STATUS_FOUND: number;
898
-        const HTTP_STATUS_SEE_OTHER: number;
899
-        const HTTP_STATUS_NOT_MODIFIED: number;
900
-        const HTTP_STATUS_USE_PROXY: number;
901
-        const HTTP_STATUS_TEMPORARY_REDIRECT: number;
902
-        const HTTP_STATUS_PERMANENT_REDIRECT: number;
903
-        const HTTP_STATUS_BAD_REQUEST: number;
904
-        const HTTP_STATUS_UNAUTHORIZED: number;
905
-        const HTTP_STATUS_PAYMENT_REQUIRED: number;
906
-        const HTTP_STATUS_FORBIDDEN: number;
907
-        const HTTP_STATUS_NOT_FOUND: number;
908
-        const HTTP_STATUS_METHOD_NOT_ALLOWED: number;
909
-        const HTTP_STATUS_NOT_ACCEPTABLE: number;
910
-        const HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED: number;
911
-        const HTTP_STATUS_REQUEST_TIMEOUT: number;
912
-        const HTTP_STATUS_CONFLICT: number;
913
-        const HTTP_STATUS_GONE: number;
914
-        const HTTP_STATUS_LENGTH_REQUIRED: number;
915
-        const HTTP_STATUS_PRECONDITION_FAILED: number;
916
-        const HTTP_STATUS_PAYLOAD_TOO_LARGE: number;
917
-        const HTTP_STATUS_URI_TOO_LONG: number;
918
-        const HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE: number;
919
-        const HTTP_STATUS_RANGE_NOT_SATISFIABLE: number;
920
-        const HTTP_STATUS_EXPECTATION_FAILED: number;
921
-        const HTTP_STATUS_TEAPOT: number;
922
-        const HTTP_STATUS_MISDIRECTED_REQUEST: number;
923
-        const HTTP_STATUS_UNPROCESSABLE_ENTITY: number;
924
-        const HTTP_STATUS_LOCKED: number;
925
-        const HTTP_STATUS_FAILED_DEPENDENCY: number;
926
-        const HTTP_STATUS_UNORDERED_COLLECTION: number;
927
-        const HTTP_STATUS_UPGRADE_REQUIRED: number;
928
-        const HTTP_STATUS_PRECONDITION_REQUIRED: number;
929
-        const HTTP_STATUS_TOO_MANY_REQUESTS: number;
930
-        const HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE: number;
931
-        const HTTP_STATUS_UNAVAILABLE_FOR_LEGAL_REASONS: number;
932
-        const HTTP_STATUS_INTERNAL_SERVER_ERROR: number;
933
-        const HTTP_STATUS_NOT_IMPLEMENTED: number;
934
-        const HTTP_STATUS_BAD_GATEWAY: number;
935
-        const HTTP_STATUS_SERVICE_UNAVAILABLE: number;
936
-        const HTTP_STATUS_GATEWAY_TIMEOUT: number;
937
-        const HTTP_STATUS_HTTP_VERSION_NOT_SUPPORTED: number;
938
-        const HTTP_STATUS_VARIANT_ALSO_NEGOTIATES: number;
939
-        const HTTP_STATUS_INSUFFICIENT_STORAGE: number;
940
-        const HTTP_STATUS_LOOP_DETECTED: number;
941
-        const HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED: number;
942
-        const HTTP_STATUS_NOT_EXTENDED: number;
943
-        const HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED: number;
944
-    }
945
-
946
-    export function getDefaultSettings(): Settings;
947
-    export function getPackedSettings(settings: Settings): Buffer;
948
-    export function getUnpackedSettings(buf: Uint8Array): Settings;
949
-
950
-    export function createServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
951
-    export function createServer(options: ServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2Server;
952
-
953
-    export function createSecureServer(onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
954
-    export function createSecureServer(options: SecureServerOptions, onRequestHandler?: (request: Http2ServerRequest, response: Http2ServerResponse) => void): Http2SecureServer;
955
-
956
-    export function connect(authority: string | url.URL, listener: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void): ClientHttp2Session;
957
-    export function connect(
958
-        authority: string | url.URL,
959
-        options?: ClientSessionOptions | SecureClientSessionOptions,
960
-        listener?: (session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket) => void
961
-    ): ClientHttp2Session;
962
-}
... ...
@@ -1,40 +0,0 @@
1
-declare module 'node:https' {
2
-    export * from 'https';
3
-}
4
-
5
-declare module 'https' {
6
-    import * as tls from 'node:tls';
7
-    import * as http from 'node:http';
8
-    import { URL } from 'node:url';
9
-
10
-    type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
11
-
12
-    type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
13
-        rejectUnauthorized?: boolean; // Defaults to true
14
-        servername?: string; // SNI TLS Extension
15
-    };
16
-
17
-    interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
18
-        rejectUnauthorized?: boolean;
19
-        maxCachedSessions?: number;
20
-    }
21
-
22
-    class Agent extends http.Agent {
23
-        constructor(options?: AgentOptions);
24
-        options: AgentOptions;
25
-    }
26
-
27
-    interface Server extends http.HttpBase {}
28
-    class Server extends tls.Server {
29
-        constructor(requestListener?: http.RequestListener);
30
-        constructor(options: ServerOptions, requestListener?: http.RequestListener);
31
-    }
32
-
33
-    function createServer(requestListener?: http.RequestListener): Server;
34
-    function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
35
-    function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
36
-    function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
37
-    function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
38
-    function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
39
-    let globalAgent: Agent;
40
-}
... ...
@@ -1,59 +0,0 @@
1
-// Type definitions for non-npm package Node.js 14.14
2
-// Project: http://nodejs.org/
3
-// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
-//                 DefinitelyTyped <https://github.com/DefinitelyTyped>
5
-//                 Alberto Schiabel <https://github.com/jkomyno>
6
-//                 Alvis HT Tang <https://github.com/alvis>
7
-//                 Andrew Makarov <https://github.com/r3nya>
8
-//                 Benjamin Toueg <https://github.com/btoueg>
9
-//                 Bruno Scheufler <https://github.com/brunoscheufler>
10
-//                 Chigozirim C. <https://github.com/smac89>
11
-//                 David Junger <https://github.com/touffy>
12
-//                 Deividas Bakanas <https://github.com/DeividasBakanas>
13
-//                 Eugene Y. Q. Shen <https://github.com/eyqs>
14
-//                 Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
15
-//                 Hoàng Văn Khải <https://github.com/KSXGitHub>
16
-//                 Huw <https://github.com/hoo29>
17
-//                 Kelvin Jin <https://github.com/kjin>
18
-//                 Klaus Meinhardt <https://github.com/ajafff>
19
-//                 Lishude <https://github.com/islishude>
20
-//                 Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
21
-//                 Mohsen Azimi <https://github.com/mohsen1>
22
-//                 Nicolas Even <https://github.com/n-e>
23
-//                 Nikita Galkin <https://github.com/galkin>
24
-//                 Parambir Singh <https://github.com/parambirs>
25
-//                 Sebastian Silbermann <https://github.com/eps1lon>
26
-//                 Simon Schick <https://github.com/SimonSchick>
27
-//                 Thomas den Hollander <https://github.com/ThomasdenH>
28
-//                 Wilco Bakker <https://github.com/WilcoBakker>
29
-//                 wwwy3y3 <https://github.com/wwwy3y3>
30
-//                 Samuel Ainsworth <https://github.com/samuela>
31
-//                 Kyle Uehlein <https://github.com/kuehlein>
32
-//                 Thanik Bhongbhibhat <https://github.com/bhongy>
33
-//                 Marcin Kopacz <https://github.com/chyzwar>
34
-//                 Trivikram Kamat <https://github.com/trivikr>
35
-//                 Minh Son Nguyen <https://github.com/nguymin4>
36
-//                 Junxiao Shi <https://github.com/yoursunny>
37
-//                 Ilia Baryshnikov <https://github.com/qwelias>
38
-//                 ExE Boss <https://github.com/ExE-Boss>
39
-//                 Surasak Chaisurin <https://github.com/Ryan-Willpower>
40
-//                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
41
-//                 Anna Henningsen <https://github.com/addaleax>
42
-//                 Jason Kwok <https://github.com/JasonHK>
43
-//                 Victor Perin <https://github.com/victorperin>
44
-//                 Yongsheng Zhang <https://github.com/ZYSzys>
45
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
46
-
47
-// NOTE: These definitions support NodeJS and TypeScript 3.7.
48
-// Typically type modifications should be made in base.d.ts instead of here
49
-
50
-/// <reference path="base.d.ts" />
51
-
52
-// NOTE: TypeScript version-specific augmentations can be found in the following paths:
53
-//          - ~/base.d.ts         - Shared definitions common to all TypeScript versions
54
-//          - ~/index.d.ts        - Definitions specific to TypeScript 2.8
55
-//          - ~/ts3.5/index.d.ts  - Definitions specific to TypeScript 3.5
56
-
57
-// NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides
58
-//       within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions
59
-//       prior to TypeScript 3.5, so the older definitions will be found here.
... ...
@@ -1,3048 +0,0 @@
1
-// tslint:disable-next-line:dt-header
2
-// Type definitions for inspector
3
-
4
-// These definitions are auto-generated.
5
-// Please see https://github.com/DefinitelyTyped/DefinitelyTyped/pull/19330
6
-// for more information.
7
-
8
-// tslint:disable:max-line-length
9
-
10
-/**
11
- * The inspector module provides an API for interacting with the V8 inspector.
12
- */
13
-declare module 'node:inspector' {
14
-    export * from 'inspector';
15
-}
16
-
17
-/**
18
- * The inspector module provides an API for interacting with the V8 inspector.
19
- */
20
-declare module 'inspector' {
21
-    import EventEmitter = require('node:events');
22
-
23
-    interface InspectorNotification<T> {
24
-        method: string;
25
-        params: T;
26
-    }
27
-
28
-    namespace Schema {
29
-        /**
30
-         * Description of the protocol domain.
31
-         */
32
-        interface Domain {
33
-            /**
34
-             * Domain name.
35
-             */
36
-            name: string;
37
-            /**
38
-             * Domain version.
39
-             */
40
-            version: string;
41
-        }
42
-
43
-        interface GetDomainsReturnType {
44
-            /**
45
-             * List of supported domains.
46
-             */
47
-            domains: Domain[];
48
-        }
49
-    }
50
-
51
-    namespace Runtime {
52
-        /**
53
-         * Unique script identifier.
54
-         */
55
-        type ScriptId = string;
56
-
57
-        /**
58
-         * Unique object identifier.
59
-         */
60
-        type RemoteObjectId = string;
61
-
62
-        /**
63
-         * Primitive value which cannot be JSON-stringified.
64
-         */
65
-        type UnserializableValue = string;
66
-
67
-        /**
68
-         * Mirror object referencing original JavaScript object.
69
-         */
70
-        interface RemoteObject {
71
-            /**
72
-             * Object type.
73
-             */
74
-            type: string;
75
-            /**
76
-             * Object subtype hint. Specified for <code>object</code> type values only.
77
-             */
78
-            subtype?: string;
79
-            /**
80
-             * Object class (constructor) name. Specified for <code>object</code> type values only.
81
-             */
82
-            className?: string;
83
-            /**
84
-             * Remote object value in case of primitive values or JSON values (if it was requested).
85
-             */
86
-            value?: any;
87
-            /**
88
-             * Primitive value which can not be JSON-stringified does not have <code>value</code>, but gets this property.
89
-             */
90
-            unserializableValue?: UnserializableValue;
91
-            /**
92
-             * String representation of the object.
93
-             */
94
-            description?: string;
95
-            /**
96
-             * Unique object identifier (for non-primitive values).
97
-             */
98
-            objectId?: RemoteObjectId;
99
-            /**
100
-             * Preview containing abbreviated property values. Specified for <code>object</code> type values only.
101
-             * @experimental
102
-             */
103
-            preview?: ObjectPreview;
104
-            /**
105
-             * @experimental
106
-             */
107
-            customPreview?: CustomPreview;
108
-        }
109
-
110
-        /**
111
-         * @experimental
112
-         */
113
-        interface CustomPreview {
114
-            header: string;
115
-            hasBody: boolean;
116
-            formatterObjectId: RemoteObjectId;
117
-            bindRemoteObjectFunctionId: RemoteObjectId;
118
-            configObjectId?: RemoteObjectId;
119
-        }
120
-
121
-        /**
122
-         * Object containing abbreviated remote object value.
123
-         * @experimental
124
-         */
125
-        interface ObjectPreview {
126
-            /**
127
-             * Object type.
128
-             */
129
-            type: string;
130
-            /**
131
-             * Object subtype hint. Specified for <code>object</code> type values only.
132
-             */
133
-            subtype?: string;
134
-            /**
135
-             * String representation of the object.
136
-             */
137
-            description?: string;
138
-            /**
139
-             * True iff some of the properties or entries of the original object did not fit.
140
-             */
141
-            overflow: boolean;
142
-            /**
143
-             * List of the properties.
144
-             */
145
-            properties: PropertyPreview[];
146
-            /**
147
-             * List of the entries. Specified for <code>map</code> and <code>set</code> subtype values only.
148
-             */
149
-            entries?: EntryPreview[];
150
-        }
151
-
152
-        /**
153
-         * @experimental
154
-         */
155
-        interface PropertyPreview {
156
-            /**
157
-             * Property name.
158
-             */
159
-            name: string;
160
-            /**
161
-             * Object type. Accessor means that the property itself is an accessor property.
162
-             */
163
-            type: string;
164
-            /**
165
-             * User-friendly property value string.
166
-             */
167
-            value?: string;
168
-            /**
169
-             * Nested value preview.
170
-             */
171
-            valuePreview?: ObjectPreview;
172
-            /**
173
-             * Object subtype hint. Specified for <code>object</code> type values only.
174
-             */
175
-            subtype?: string;
176
-        }
177
-
178
-        /**
179
-         * @experimental
180
-         */
181
-        interface EntryPreview {
182
-            /**
183
-             * Preview of the key. Specified for map-like collection entries.
184
-             */
185
-            key?: ObjectPreview;
186
-            /**
187
-             * Preview of the value.
188
-             */
189
-            value: ObjectPreview;
190
-        }
191
-
192
-        /**
193
-         * Object property descriptor.
194
-         */
195
-        interface PropertyDescriptor {
196
-            /**
197
-             * Property name or symbol description.
198
-             */
199
-            name: string;
200
-            /**
201
-             * The value associated with the property.
202
-             */
203
-            value?: RemoteObject;
204
-            /**
205
-             * True if the value associated with the property may be changed (data descriptors only).
206
-             */
207
-            writable?: boolean;
208
-            /**
209
-             * A function which serves as a getter for the property, or <code>undefined</code> if there is no getter (accessor descriptors only).
210
-             */
211
-            get?: RemoteObject;
212
-            /**
213
-             * A function which serves as a setter for the property, or <code>undefined</code> if there is no setter (accessor descriptors only).
214
-             */
215
-            set?: RemoteObject;
216
-            /**
217
-             * True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
218
-             */
219
-            configurable: boolean;
220
-            /**
221
-             * True if this property shows up during enumeration of the properties on the corresponding object.
222
-             */
223
-            enumerable: boolean;
224
-            /**
225
-             * True if the result was thrown during the evaluation.
226
-             */
227
-            wasThrown?: boolean;
228
-            /**
229
-             * True if the property is owned for the object.
230
-             */
231
-            isOwn?: boolean;
232
-            /**
233
-             * Property symbol object, if the property is of the <code>symbol</code> type.
234
-             */
235
-            symbol?: RemoteObject;
236
-        }
237
-
238
-        /**
239
-         * Object internal property descriptor. This property isn't normally visible in JavaScript code.
240
-         */
241
-        interface InternalPropertyDescriptor {
242
-            /**
243
-             * Conventional property name.
244
-             */
245
-            name: string;
246
-            /**
247
-             * The value associated with the property.
248
-             */
249
-            value?: RemoteObject;
250
-        }
251
-
252
-        /**
253
-         * Represents function call argument. Either remote object id <code>objectId</code>, primitive <code>value</code>, unserializable primitive value or neither of (for undefined) them should be specified.
254
-         */
255
-        interface CallArgument {
256
-            /**
257
-             * Primitive value or serializable javascript object.
258
-             */
259
-            value?: any;
260
-            /**
261
-             * Primitive value which can not be JSON-stringified.
262
-             */
263
-            unserializableValue?: UnserializableValue;
264
-            /**
265
-             * Remote object handle.
266
-             */
267
-            objectId?: RemoteObjectId;
268
-        }
269
-
270
-        /**
271
-         * Id of an execution context.
272
-         */
273
-        type ExecutionContextId = number;
274
-
275
-        /**
276
-         * Description of an isolated world.
277
-         */
278
-        interface ExecutionContextDescription {
279
-            /**
280
-             * Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
281
-             */
282
-            id: ExecutionContextId;
283
-            /**
284
-             * Execution context origin.
285
-             */
286
-            origin: string;
287
-            /**
288
-             * Human readable name describing given context.
289
-             */
290
-            name: string;
291
-            /**
292
-             * Embedder-specific auxiliary data.
293
-             */
294
-            auxData?: {};
295
-        }
296
-
297
-        /**
298
-         * Detailed information about exception (or error) that was thrown during script compilation or execution.
299
-         */
300
-        interface ExceptionDetails {
301
-            /**
302
-             * Exception id.
303
-             */
304
-            exceptionId: number;
305
-            /**
306
-             * Exception text, which should be used together with exception object when available.
307
-             */
308
-            text: string;
309
-            /**
310
-             * Line number of the exception location (0-based).
311
-             */
312
-            lineNumber: number;
313
-            /**
314
-             * Column number of the exception location (0-based).
315
-             */
316
-            columnNumber: number;
317
-            /**
318
-             * Script ID of the exception location.
319
-             */
320
-            scriptId?: ScriptId;
321
-            /**
322
-             * URL of the exception location, to be used when the script was not reported.
323
-             */
324
-            url?: string;
325
-            /**
326
-             * JavaScript stack trace if available.
327
-             */
328
-            stackTrace?: StackTrace;
329
-            /**
330
-             * Exception object if available.
331
-             */
332
-            exception?: RemoteObject;
333
-            /**
334
-             * Identifier of the context where exception happened.
335
-             */
336
-            executionContextId?: ExecutionContextId;
337
-        }
338
-
339
-        /**
340
-         * Number of milliseconds since epoch.
341
-         */
342
-        type Timestamp = number;
343
-
344
-        /**
345
-         * Stack entry for runtime errors and assertions.
346
-         */
347
-        interface CallFrame {
348
-            /**
349
-             * JavaScript function name.
350
-             */
351
-            functionName: string;
352
-            /**
353
-             * JavaScript script id.
354
-             */
355
-            scriptId: ScriptId;
356
-            /**
357
-             * JavaScript script name or url.
358
-             */
359
-            url: string;
360
-            /**
361
-             * JavaScript script line number (0-based).
362
-             */
363
-            lineNumber: number;
364
-            /**
365
-             * JavaScript script column number (0-based).
366
-             */
367
-            columnNumber: number;
368
-        }
369
-
370
-        /**
371
-         * Call frames for assertions or error messages.
372
-         */
373
-        interface StackTrace {
374
-            /**
375
-             * String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
376
-             */
377
-            description?: string;
378
-            /**
379
-             * JavaScript function name.
380
-             */
381
-            callFrames: CallFrame[];
382
-            /**
383
-             * Asynchronous JavaScript stack trace that preceded this stack, if available.
384
-             */
385
-            parent?: StackTrace;
386
-            /**
387
-             * Asynchronous JavaScript stack trace that preceded this stack, if available.
388
-             * @experimental
389
-             */
390
-            parentId?: StackTraceId;
391
-        }
392
-
393
-        /**
394
-         * Unique identifier of current debugger.
395
-         * @experimental
396
-         */
397
-        type UniqueDebuggerId = string;
398
-
399
-        /**
400
-         * If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.
401
-         * @experimental
402
-         */
403
-        interface StackTraceId {
404
-            id: string;
405
-            debuggerId?: UniqueDebuggerId;
406
-        }
407
-
408
-        interface EvaluateParameterType {
409
-            /**
410
-             * Expression to evaluate.
411
-             */
412
-            expression: string;
413
-            /**
414
-             * Symbolic group name that can be used to release multiple objects.
415
-             */
416
-            objectGroup?: string;
417
-            /**
418
-             * Determines whether Command Line API should be available during the evaluation.
419
-             */
420
-            includeCommandLineAPI?: boolean;
421
-            /**
422
-             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
423
-             */
424
-            silent?: boolean;
425
-            /**
426
-             * Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
427
-             */
428
-            contextId?: ExecutionContextId;
429
-            /**
430
-             * Whether the result is expected to be a JSON object that should be sent by value.
431
-             */
432
-            returnByValue?: boolean;
433
-            /**
434
-             * Whether preview should be generated for the result.
435
-             * @experimental
436
-             */
437
-            generatePreview?: boolean;
438
-            /**
439
-             * Whether execution should be treated as initiated by user in the UI.
440
-             */
441
-            userGesture?: boolean;
442
-            /**
443
-             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
444
-             */
445
-            awaitPromise?: boolean;
446
-        }
447
-
448
-        interface AwaitPromiseParameterType {
449
-            /**
450
-             * Identifier of the promise.
451
-             */
452
-            promiseObjectId: RemoteObjectId;
453
-            /**
454
-             * Whether the result is expected to be a JSON object that should be sent by value.
455
-             */
456
-            returnByValue?: boolean;
457
-            /**
458
-             * Whether preview should be generated for the result.
459
-             */
460
-            generatePreview?: boolean;
461
-        }
462
-
463
-        interface CallFunctionOnParameterType {
464
-            /**
465
-             * Declaration of the function to call.
466
-             */
467
-            functionDeclaration: string;
468
-            /**
469
-             * Identifier of the object to call function on. Either objectId or executionContextId should be specified.
470
-             */
471
-            objectId?: RemoteObjectId;
472
-            /**
473
-             * Call arguments. All call arguments must belong to the same JavaScript world as the target object.
474
-             */
475
-            arguments?: CallArgument[];
476
-            /**
477
-             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
478
-             */
479
-            silent?: boolean;
480
-            /**
481
-             * Whether the result is expected to be a JSON object which should be sent by value.
482
-             */
483
-            returnByValue?: boolean;
484
-            /**
485
-             * Whether preview should be generated for the result.
486
-             * @experimental
487
-             */
488
-            generatePreview?: boolean;
489
-            /**
490
-             * Whether execution should be treated as initiated by user in the UI.
491
-             */
492
-            userGesture?: boolean;
493
-            /**
494
-             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
495
-             */
496
-            awaitPromise?: boolean;
497
-            /**
498
-             * Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
499
-             */
500
-            executionContextId?: ExecutionContextId;
501
-            /**
502
-             * Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
503
-             */
504
-            objectGroup?: string;
505
-        }
506
-
507
-        interface GetPropertiesParameterType {
508
-            /**
509
-             * Identifier of the object to return properties for.
510
-             */
511
-            objectId: RemoteObjectId;
512
-            /**
513
-             * If true, returns properties belonging only to the element itself, not to its prototype chain.
514
-             */
515
-            ownProperties?: boolean;
516
-            /**
517
-             * If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
518
-             * @experimental
519
-             */
520
-            accessorPropertiesOnly?: boolean;
521
-            /**
522
-             * Whether preview should be generated for the results.
523
-             * @experimental
524
-             */
525
-            generatePreview?: boolean;
526
-        }
527
-
528
-        interface ReleaseObjectParameterType {
529
-            /**
530
-             * Identifier of the object to release.
531
-             */
532
-            objectId: RemoteObjectId;
533
-        }
534
-
535
-        interface ReleaseObjectGroupParameterType {
536
-            /**
537
-             * Symbolic object group name.
538
-             */
539
-            objectGroup: string;
540
-        }
541
-
542
-        interface SetCustomObjectFormatterEnabledParameterType {
543
-            enabled: boolean;
544
-        }
545
-
546
-        interface CompileScriptParameterType {
547
-            /**
548
-             * Expression to compile.
549
-             */
550
-            expression: string;
551
-            /**
552
-             * Source url to be set for the script.
553
-             */
554
-            sourceURL: string;
555
-            /**
556
-             * Specifies whether the compiled script should be persisted.
557
-             */
558
-            persistScript: boolean;
559
-            /**
560
-             * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
561
-             */
562
-            executionContextId?: ExecutionContextId;
563
-        }
564
-
565
-        interface RunScriptParameterType {
566
-            /**
567
-             * Id of the script to run.
568
-             */
569
-            scriptId: ScriptId;
570
-            /**
571
-             * Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
572
-             */
573
-            executionContextId?: ExecutionContextId;
574
-            /**
575
-             * Symbolic group name that can be used to release multiple objects.
576
-             */
577
-            objectGroup?: string;
578
-            /**
579
-             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
580
-             */
581
-            silent?: boolean;
582
-            /**
583
-             * Determines whether Command Line API should be available during the evaluation.
584
-             */
585
-            includeCommandLineAPI?: boolean;
586
-            /**
587
-             * Whether the result is expected to be a JSON object which should be sent by value.
588
-             */
589
-            returnByValue?: boolean;
590
-            /**
591
-             * Whether preview should be generated for the result.
592
-             */
593
-            generatePreview?: boolean;
594
-            /**
595
-             * Whether execution should <code>await</code> for resulting value and return once awaited promise is resolved.
596
-             */
597
-            awaitPromise?: boolean;
598
-        }
599
-
600
-        interface QueryObjectsParameterType {
601
-            /**
602
-             * Identifier of the prototype to return objects for.
603
-             */
604
-            prototypeObjectId: RemoteObjectId;
605
-        }
606
-
607
-        interface GlobalLexicalScopeNamesParameterType {
608
-            /**
609
-             * Specifies in which execution context to lookup global scope variables.
610
-             */
611
-            executionContextId?: ExecutionContextId;
612
-        }
613
-
614
-        interface EvaluateReturnType {
615
-            /**
616
-             * Evaluation result.
617
-             */
618
-            result: RemoteObject;
619
-            /**
620
-             * Exception details.
621
-             */
622
-            exceptionDetails?: ExceptionDetails;
623
-        }
624
-
625
-        interface AwaitPromiseReturnType {
626
-            /**
627
-             * Promise result. Will contain rejected value if promise was rejected.
628
-             */
629
-            result: RemoteObject;
630
-            /**
631
-             * Exception details if stack strace is available.
632
-             */
633
-            exceptionDetails?: ExceptionDetails;
634
-        }
635
-
636
-        interface CallFunctionOnReturnType {
637
-            /**
638
-             * Call result.
639
-             */
640
-            result: RemoteObject;
641
-            /**
642
-             * Exception details.
643
-             */
644
-            exceptionDetails?: ExceptionDetails;
645
-        }
646
-
647
-        interface GetPropertiesReturnType {
648
-            /**
649
-             * Object properties.
650
-             */
651
-            result: PropertyDescriptor[];
652
-            /**
653
-             * Internal object properties (only of the element itself).
654
-             */
655
-            internalProperties?: InternalPropertyDescriptor[];
656
-            /**
657
-             * Exception details.
658
-             */
659
-            exceptionDetails?: ExceptionDetails;
660
-        }
661
-
662
-        interface CompileScriptReturnType {
663
-            /**
664
-             * Id of the script.
665
-             */
666
-            scriptId?: ScriptId;
667
-            /**
668
-             * Exception details.
669
-             */
670
-            exceptionDetails?: ExceptionDetails;
671
-        }
672
-
673
-        interface RunScriptReturnType {
674
-            /**
675
-             * Run result.
676
-             */
677
-            result: RemoteObject;
678
-            /**
679
-             * Exception details.
680
-             */
681
-            exceptionDetails?: ExceptionDetails;
682
-        }
683
-
684
-        interface QueryObjectsReturnType {
685
-            /**
686
-             * Array with objects.
687
-             */
688
-            objects: RemoteObject;
689
-        }
690
-
691
-        interface GlobalLexicalScopeNamesReturnType {
692
-            names: string[];
693
-        }
694
-
695
-        interface ExecutionContextCreatedEventDataType {
696
-            /**
697
-             * A newly created execution context.
698
-             */
699
-            context: ExecutionContextDescription;
700
-        }
701
-
702
-        interface ExecutionContextDestroyedEventDataType {
703
-            /**
704
-             * Id of the destroyed context
705
-             */
706
-            executionContextId: ExecutionContextId;
707
-        }
708
-
709
-        interface ExceptionThrownEventDataType {
710
-            /**
711
-             * Timestamp of the exception.
712
-             */
713
-            timestamp: Timestamp;
714
-            exceptionDetails: ExceptionDetails;
715
-        }
716
-
717
-        interface ExceptionRevokedEventDataType {
718
-            /**
719
-             * Reason describing why exception was revoked.
720
-             */
721
-            reason: string;
722
-            /**
723
-             * The id of revoked exception, as reported in <code>exceptionThrown</code>.
724
-             */
725
-            exceptionId: number;
726
-        }
727
-
728
-        interface ConsoleAPICalledEventDataType {
729
-            /**
730
-             * Type of the call.
731
-             */
732
-            type: string;
733
-            /**
734
-             * Call arguments.
735
-             */
736
-            args: RemoteObject[];
737
-            /**
738
-             * Identifier of the context where the call was made.
739
-             */
740
-            executionContextId: ExecutionContextId;
741
-            /**
742
-             * Call timestamp.
743
-             */
744
-            timestamp: Timestamp;
745
-            /**
746
-             * Stack trace captured when the call was made.
747
-             */
748
-            stackTrace?: StackTrace;
749
-            /**
750
-             * Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
751
-             * @experimental
752
-             */
753
-            context?: string;
754
-        }
755
-
756
-        interface InspectRequestedEventDataType {
757
-            object: RemoteObject;
758
-            hints: {};
759
-        }
760
-    }
761
-
762
-    namespace Debugger {
763
-        /**
764
-         * Breakpoint identifier.
765
-         */
766
-        type BreakpointId = string;
767
-
768
-        /**
769
-         * Call frame identifier.
770
-         */
771
-        type CallFrameId = string;
772
-
773
-        /**
774
-         * Location in the source code.
775
-         */
776
-        interface Location {
777
-            /**
778
-             * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
779
-             */
780
-            scriptId: Runtime.ScriptId;
781
-            /**
782
-             * Line number in the script (0-based).
783
-             */
784
-            lineNumber: number;
785
-            /**
786
-             * Column number in the script (0-based).
787
-             */
788
-            columnNumber?: number;
789
-        }
790
-
791
-        /**
792
-         * Location in the source code.
793
-         * @experimental
794
-         */
795
-        interface ScriptPosition {
796
-            lineNumber: number;
797
-            columnNumber: number;
798
-        }
799
-
800
-        /**
801
-         * JavaScript call frame. Array of call frames form the call stack.
802
-         */
803
-        interface CallFrame {
804
-            /**
805
-             * Call frame identifier. This identifier is only valid while the virtual machine is paused.
806
-             */
807
-            callFrameId: CallFrameId;
808
-            /**
809
-             * Name of the JavaScript function called on this call frame.
810
-             */
811
-            functionName: string;
812
-            /**
813
-             * Location in the source code.
814
-             */
815
-            functionLocation?: Location;
816
-            /**
817
-             * Location in the source code.
818
-             */
819
-            location: Location;
820
-            /**
821
-             * JavaScript script name or url.
822
-             */
823
-            url: string;
824
-            /**
825
-             * Scope chain for this call frame.
826
-             */
827
-            scopeChain: Scope[];
828
-            /**
829
-             * <code>this</code> object for this call frame.
830
-             */
831
-            this: Runtime.RemoteObject;
832
-            /**
833
-             * The value being returned, if the function is at return point.
834
-             */
835
-            returnValue?: Runtime.RemoteObject;
836
-        }
837
-
838
-        /**
839
-         * Scope description.
840
-         */
841
-        interface Scope {
842
-            /**
843
-             * Scope type.
844
-             */
845
-            type: string;
846
-            /**
847
-             * Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
848
-             */
849
-            object: Runtime.RemoteObject;
850
-            name?: string;
851
-            /**
852
-             * Location in the source code where scope starts
853
-             */
854
-            startLocation?: Location;
855
-            /**
856
-             * Location in the source code where scope ends
857
-             */
858
-            endLocation?: Location;
859
-        }
860
-
861
-        /**
862
-         * Search match for resource.
863
-         */
864
-        interface SearchMatch {
865
-            /**
866
-             * Line number in resource content.
867
-             */
868
-            lineNumber: number;
869
-            /**
870
-             * Line with match content.
871
-             */
872
-            lineContent: string;
873
-        }
874
-
875
-        interface BreakLocation {
876
-            /**
877
-             * Script identifier as reported in the <code>Debugger.scriptParsed</code>.
878
-             */
879
-            scriptId: Runtime.ScriptId;
880
-            /**
881
-             * Line number in the script (0-based).
882
-             */
883
-            lineNumber: number;
884
-            /**
885
-             * Column number in the script (0-based).
886
-             */
887
-            columnNumber?: number;
888
-            type?: string;
889
-        }
890
-
891
-        interface SetBreakpointsActiveParameterType {
892
-            /**
893
-             * New value for breakpoints active state.
894
-             */
895
-            active: boolean;
896
-        }
897
-
898
-        interface SetSkipAllPausesParameterType {
899
-            /**
900
-             * New value for skip pauses state.
901
-             */
902
-            skip: boolean;
903
-        }
904
-
905
-        interface SetBreakpointByUrlParameterType {
906
-            /**
907
-             * Line number to set breakpoint at.
908
-             */
909
-            lineNumber: number;
910
-            /**
911
-             * URL of the resources to set breakpoint on.
912
-             */
913
-            url?: string;
914
-            /**
915
-             * Regex pattern for the URLs of the resources to set breakpoints on. Either <code>url</code> or <code>urlRegex</code> must be specified.
916
-             */
917
-            urlRegex?: string;
918
-            /**
919
-             * Script hash of the resources to set breakpoint on.
920
-             */
921
-            scriptHash?: string;
922
-            /**
923
-             * Offset in the line to set breakpoint at.
924
-             */
925
-            columnNumber?: number;
926
-            /**
927
-             * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
928
-             */
929
-            condition?: string;
930
-        }
931
-
932
-        interface SetBreakpointParameterType {
933
-            /**
934
-             * Location to set breakpoint in.
935
-             */
936
-            location: Location;
937
-            /**
938
-             * Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
939
-             */
940
-            condition?: string;
941
-        }
942
-
943
-        interface RemoveBreakpointParameterType {
944
-            breakpointId: BreakpointId;
945
-        }
946
-
947
-        interface GetPossibleBreakpointsParameterType {
948
-            /**
949
-             * Start of range to search possible breakpoint locations in.
950
-             */
951
-            start: Location;
952
-            /**
953
-             * End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
954
-             */
955
-            end?: Location;
956
-            /**
957
-             * Only consider locations which are in the same (non-nested) function as start.
958
-             */
959
-            restrictToFunction?: boolean;
960
-        }
961
-
962
-        interface ContinueToLocationParameterType {
963
-            /**
964
-             * Location to continue to.
965
-             */
966
-            location: Location;
967
-            targetCallFrames?: string;
968
-        }
969
-
970
-        interface PauseOnAsyncCallParameterType {
971
-            /**
972
-             * Debugger will pause when async call with given stack trace is started.
973
-             */
974
-            parentStackTraceId: Runtime.StackTraceId;
975
-        }
976
-
977
-        interface StepIntoParameterType {
978
-            /**
979
-             * Debugger will issue additional Debugger.paused notification if any async task is scheduled before next pause.
980
-             * @experimental
981
-             */
982
-            breakOnAsyncCall?: boolean;
983
-        }
984
-
985
-        interface GetStackTraceParameterType {
986
-            stackTraceId: Runtime.StackTraceId;
987
-        }
988
-
989
-        interface SearchInContentParameterType {
990
-            /**
991
-             * Id of the script to search in.
992
-             */
993
-            scriptId: Runtime.ScriptId;
994
-            /**
995
-             * String to search for.
996
-             */
997
-            query: string;
998
-            /**
999
-             * If true, search is case sensitive.
1000
-             */
1001
-            caseSensitive?: boolean;
1002
-            /**
1003
-             * If true, treats string parameter as regex.
1004
-             */
1005
-            isRegex?: boolean;
1006
-        }
1007
-
1008
-        interface SetScriptSourceParameterType {
1009
-            /**
1010
-             * Id of the script to edit.
1011
-             */
1012
-            scriptId: Runtime.ScriptId;
1013
-            /**
1014
-             * New content of the script.
1015
-             */
1016
-            scriptSource: string;
1017
-            /**
1018
-             *  If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
1019
-             */
1020
-            dryRun?: boolean;
1021
-        }
1022
-
1023
-        interface RestartFrameParameterType {
1024
-            /**
1025
-             * Call frame identifier to evaluate on.
1026
-             */
1027
-            callFrameId: CallFrameId;
1028
-        }
1029
-
1030
-        interface GetScriptSourceParameterType {
1031
-            /**
1032
-             * Id of the script to get source for.
1033
-             */
1034
-            scriptId: Runtime.ScriptId;
1035
-        }
1036
-
1037
-        interface SetPauseOnExceptionsParameterType {
1038
-            /**
1039
-             * Pause on exceptions mode.
1040
-             */
1041
-            state: string;
1042
-        }
1043
-
1044
-        interface EvaluateOnCallFrameParameterType {
1045
-            /**
1046
-             * Call frame identifier to evaluate on.
1047
-             */
1048
-            callFrameId: CallFrameId;
1049
-            /**
1050
-             * Expression to evaluate.
1051
-             */
1052
-            expression: string;
1053
-            /**
1054
-             * String object group name to put result into (allows rapid releasing resulting object handles using <code>releaseObjectGroup</code>).
1055
-             */
1056
-            objectGroup?: string;
1057
-            /**
1058
-             * Specifies whether command line API should be available to the evaluated expression, defaults to false.
1059
-             */
1060
-            includeCommandLineAPI?: boolean;
1061
-            /**
1062
-             * In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides <code>setPauseOnException</code> state.
1063
-             */
1064
-            silent?: boolean;
1065
-            /**
1066
-             * Whether the result is expected to be a JSON object that should be sent by value.
1067
-             */
1068
-            returnByValue?: boolean;
1069
-            /**
1070
-             * Whether preview should be generated for the result.
1071
-             * @experimental
1072
-             */
1073
-            generatePreview?: boolean;
1074
-            /**
1075
-             * Whether to throw an exception if side effect cannot be ruled out during evaluation.
1076
-             */
1077
-            throwOnSideEffect?: boolean;
1078
-        }
1079
-
1080
-        interface SetVariableValueParameterType {
1081
-            /**
1082
-             * 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
1083
-             */
1084
-            scopeNumber: number;
1085
-            /**
1086
-             * Variable name.
1087
-             */
1088
-            variableName: string;
1089
-            /**
1090
-             * New variable value.
1091
-             */
1092
-            newValue: Runtime.CallArgument;
1093
-            /**
1094
-             * Id of callframe that holds variable.
1095
-             */
1096
-            callFrameId: CallFrameId;
1097
-        }
1098
-
1099
-        interface SetReturnValueParameterType {
1100
-            /**
1101
-             * New return value.
1102
-             */
1103
-            newValue: Runtime.CallArgument;
1104
-        }
1105
-
1106
-        interface SetAsyncCallStackDepthParameterType {
1107
-            /**
1108
-             * Maximum depth of async call stacks. Setting to <code>0</code> will effectively disable collecting async call stacks (default).
1109
-             */
1110
-            maxDepth: number;
1111
-        }
1112
-
1113
-        interface SetBlackboxPatternsParameterType {
1114
-            /**
1115
-             * Array of regexps that will be used to check script url for blackbox state.
1116
-             */
1117
-            patterns: string[];
1118
-        }
1119
-
1120
-        interface SetBlackboxedRangesParameterType {
1121
-            /**
1122
-             * Id of the script.
1123
-             */
1124
-            scriptId: Runtime.ScriptId;
1125
-            positions: ScriptPosition[];
1126
-        }
1127
-
1128
-        interface EnableReturnType {
1129
-            /**
1130
-             * Unique identifier of the debugger.
1131
-             * @experimental
1132
-             */
1133
-            debuggerId: Runtime.UniqueDebuggerId;
1134
-        }
1135
-
1136
-        interface SetBreakpointByUrlReturnType {
1137
-            /**
1138
-             * Id of the created breakpoint for further reference.
1139
-             */
1140
-            breakpointId: BreakpointId;
1141
-            /**
1142
-             * List of the locations this breakpoint resolved into upon addition.
1143
-             */
1144
-            locations: Location[];
1145
-        }
1146
-
1147
-        interface SetBreakpointReturnType {
1148
-            /**
1149
-             * Id of the created breakpoint for further reference.
1150
-             */
1151
-            breakpointId: BreakpointId;
1152
-            /**
1153
-             * Location this breakpoint resolved into.
1154
-             */
1155
-            actualLocation: Location;
1156
-        }
1157
-
1158
-        interface GetPossibleBreakpointsReturnType {
1159
-            /**
1160
-             * List of the possible breakpoint locations.
1161
-             */
1162
-            locations: BreakLocation[];
1163
-        }
1164
-
1165
-        interface GetStackTraceReturnType {
1166
-            stackTrace: Runtime.StackTrace;
1167
-        }
1168
-
1169
-        interface SearchInContentReturnType {
1170
-            /**
1171
-             * List of search matches.
1172
-             */
1173
-            result: SearchMatch[];
1174
-        }
1175
-
1176
-        interface SetScriptSourceReturnType {
1177
-            /**
1178
-             * New stack trace in case editing has happened while VM was stopped.
1179
-             */
1180
-            callFrames?: CallFrame[];
1181
-            /**
1182
-             * Whether current call stack  was modified after applying the changes.
1183
-             */
1184
-            stackChanged?: boolean;
1185
-            /**
1186
-             * Async stack trace, if any.
1187
-             */
1188
-            asyncStackTrace?: Runtime.StackTrace;
1189
-            /**
1190
-             * Async stack trace, if any.
1191
-             * @experimental
1192
-             */
1193
-            asyncStackTraceId?: Runtime.StackTraceId;
1194
-            /**
1195
-             * Exception details if any.
1196
-             */
1197
-            exceptionDetails?: Runtime.ExceptionDetails;
1198
-        }
1199
-
1200
-        interface RestartFrameReturnType {
1201
-            /**
1202
-             * New stack trace.
1203
-             */
1204
-            callFrames: CallFrame[];
1205
-            /**
1206
-             * Async stack trace, if any.
1207
-             */
1208
-            asyncStackTrace?: Runtime.StackTrace;
1209
-            /**
1210
-             * Async stack trace, if any.
1211
-             * @experimental
1212
-             */
1213
-            asyncStackTraceId?: Runtime.StackTraceId;
1214
-        }
1215
-
1216
-        interface GetScriptSourceReturnType {
1217
-            /**
1218
-             * Script source.
1219
-             */
1220
-            scriptSource: string;
1221
-        }
1222
-
1223
-        interface EvaluateOnCallFrameReturnType {
1224
-            /**
1225
-             * Object wrapper for the evaluation result.
1226
-             */
1227
-            result: Runtime.RemoteObject;
1228
-            /**
1229
-             * Exception details.
1230
-             */
1231
-            exceptionDetails?: Runtime.ExceptionDetails;
1232
-        }
1233
-
1234
-        interface ScriptParsedEventDataType {
1235
-            /**
1236
-             * Identifier of the script parsed.
1237
-             */
1238
-            scriptId: Runtime.ScriptId;
1239
-            /**
1240
-             * URL or name of the script parsed (if any).
1241
-             */
1242
-            url: string;
1243
-            /**
1244
-             * Line offset of the script within the resource with given URL (for script tags).
1245
-             */
1246
-            startLine: number;
1247
-            /**
1248
-             * Column offset of the script within the resource with given URL.
1249
-             */
1250
-            startColumn: number;
1251
-            /**
1252
-             * Last line of the script.
1253
-             */
1254
-            endLine: number;
1255
-            /**
1256
-             * Length of the last line of the script.
1257
-             */
1258
-            endColumn: number;
1259
-            /**
1260
-             * Specifies script creation context.
1261
-             */
1262
-            executionContextId: Runtime.ExecutionContextId;
1263
-            /**
1264
-             * Content hash of the script.
1265
-             */
1266
-            hash: string;
1267
-            /**
1268
-             * Embedder-specific auxiliary data.
1269
-             */
1270
-            executionContextAuxData?: {};
1271
-            /**
1272
-             * True, if this script is generated as a result of the live edit operation.
1273
-             * @experimental
1274
-             */
1275
-            isLiveEdit?: boolean;
1276
-            /**
1277
-             * URL of source map associated with script (if any).
1278
-             */
1279
-            sourceMapURL?: string;
1280
-            /**
1281
-             * True, if this script has sourceURL.
1282
-             */
1283
-            hasSourceURL?: boolean;
1284
-            /**
1285
-             * True, if this script is ES6 module.
1286
-             */
1287
-            isModule?: boolean;
1288
-            /**
1289
-             * This script length.
1290
-             */
1291
-            length?: number;
1292
-            /**
1293
-             * JavaScript top stack frame of where the script parsed event was triggered if available.
1294
-             * @experimental
1295
-             */
1296
-            stackTrace?: Runtime.StackTrace;
1297
-        }
1298
-
1299
-        interface ScriptFailedToParseEventDataType {
1300
-            /**
1301
-             * Identifier of the script parsed.
1302
-             */
1303
-            scriptId: Runtime.ScriptId;
1304
-            /**
1305
-             * URL or name of the script parsed (if any).
1306
-             */
1307
-            url: string;
1308
-            /**
1309
-             * Line offset of the script within the resource with given URL (for script tags).
1310
-             */
1311
-            startLine: number;
1312
-            /**
1313
-             * Column offset of the script within the resource with given URL.
1314
-             */
1315
-            startColumn: number;
1316
-            /**
1317
-             * Last line of the script.
1318
-             */
1319
-            endLine: number;
1320
-            /**
1321
-             * Length of the last line of the script.
1322
-             */
1323
-            endColumn: number;
1324
-            /**
1325
-             * Specifies script creation context.
1326
-             */
1327
-            executionContextId: Runtime.ExecutionContextId;
1328
-            /**
1329
-             * Content hash of the script.
1330
-             */
1331
-            hash: string;
1332
-            /**
1333
-             * Embedder-specific auxiliary data.
1334
-             */
1335
-            executionContextAuxData?: {};
1336
-            /**
1337
-             * URL of source map associated with script (if any).
1338
-             */
1339
-            sourceMapURL?: string;
1340
-            /**
1341
-             * True, if this script has sourceURL.
1342
-             */
1343
-            hasSourceURL?: boolean;
1344
-            /**
1345
-             * True, if this script is ES6 module.
1346
-             */
1347
-            isModule?: boolean;
1348
-            /**
1349
-             * This script length.
1350
-             */
1351
-            length?: number;
1352
-            /**
1353
-             * JavaScript top stack frame of where the script parsed event was triggered if available.
1354
-             * @experimental
1355
-             */
1356
-            stackTrace?: Runtime.StackTrace;
1357
-        }
1358
-
1359
-        interface BreakpointResolvedEventDataType {
1360
-            /**
1361
-             * Breakpoint unique identifier.
1362
-             */
1363
-            breakpointId: BreakpointId;
1364
-            /**
1365
-             * Actual breakpoint location.
1366
-             */
1367
-            location: Location;
1368
-        }
1369
-
1370
-        interface PausedEventDataType {
1371
-            /**
1372
-             * Call stack the virtual machine stopped on.
1373
-             */
1374
-            callFrames: CallFrame[];
1375
-            /**
1376
-             * Pause reason.
1377
-             */
1378
-            reason: string;
1379
-            /**
1380
-             * Object containing break-specific auxiliary properties.
1381
-             */
1382
-            data?: {};
1383
-            /**
1384
-             * Hit breakpoints IDs
1385
-             */
1386
-            hitBreakpoints?: string[];
1387
-            /**
1388
-             * Async stack trace, if any.
1389
-             */
1390
-            asyncStackTrace?: Runtime.StackTrace;
1391
-            /**
1392
-             * Async stack trace, if any.
1393
-             * @experimental
1394
-             */
1395
-            asyncStackTraceId?: Runtime.StackTraceId;
1396
-            /**
1397
-             * Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag.
1398
-             * @experimental
1399
-             */
1400
-            asyncCallStackTraceId?: Runtime.StackTraceId;
1401
-        }
1402
-    }
1403
-
1404
-    namespace Console {
1405
-        /**
1406
-         * Console message.
1407
-         */
1408
-        interface ConsoleMessage {
1409
-            /**
1410
-             * Message source.
1411
-             */
1412
-            source: string;
1413
-            /**
1414
-             * Message severity.
1415
-             */
1416
-            level: string;
1417
-            /**
1418
-             * Message text.
1419
-             */
1420
-            text: string;
1421
-            /**
1422
-             * URL of the message origin.
1423
-             */
1424
-            url?: string;
1425
-            /**
1426
-             * Line number in the resource that generated this message (1-based).
1427
-             */
1428
-            line?: number;
1429
-            /**
1430
-             * Column number in the resource that generated this message (1-based).
1431
-             */
1432
-            column?: number;
1433
-        }
1434
-
1435
-        interface MessageAddedEventDataType {
1436
-            /**
1437
-             * Console message that has been added.
1438
-             */
1439
-            message: ConsoleMessage;
1440
-        }
1441
-    }
1442
-
1443
-    namespace Profiler {
1444
-        /**
1445
-         * Profile node. Holds callsite information, execution statistics and child nodes.
1446
-         */
1447
-        interface ProfileNode {
1448
-            /**
1449
-             * Unique id of the node.
1450
-             */
1451
-            id: number;
1452
-            /**
1453
-             * Function location.
1454
-             */
1455
-            callFrame: Runtime.CallFrame;
1456
-            /**
1457
-             * Number of samples where this node was on top of the call stack.
1458
-             */
1459
-            hitCount?: number;
1460
-            /**
1461
-             * Child node ids.
1462
-             */
1463
-            children?: number[];
1464
-            /**
1465
-             * The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
1466
-             */
1467
-            deoptReason?: string;
1468
-            /**
1469
-             * An array of source position ticks.
1470
-             */
1471
-            positionTicks?: PositionTickInfo[];
1472
-        }
1473
-
1474
-        /**
1475
-         * Profile.
1476
-         */
1477
-        interface Profile {
1478
-            /**
1479
-             * The list of profile nodes. First item is the root node.
1480
-             */
1481
-            nodes: ProfileNode[];
1482
-            /**
1483
-             * Profiling start timestamp in microseconds.
1484
-             */
1485
-            startTime: number;
1486
-            /**
1487
-             * Profiling end timestamp in microseconds.
1488
-             */
1489
-            endTime: number;
1490
-            /**
1491
-             * Ids of samples top nodes.
1492
-             */
1493
-            samples?: number[];
1494
-            /**
1495
-             * Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
1496
-             */
1497
-            timeDeltas?: number[];
1498
-        }
1499
-
1500
-        /**
1501
-         * Specifies a number of samples attributed to a certain source position.
1502
-         */
1503
-        interface PositionTickInfo {
1504
-            /**
1505
-             * Source line number (1-based).
1506
-             */
1507
-            line: number;
1508
-            /**
1509
-             * Number of samples attributed to the source line.
1510
-             */
1511
-            ticks: number;
1512
-        }
1513
-
1514
-        /**
1515
-         * Coverage data for a source range.
1516
-         */
1517
-        interface CoverageRange {
1518
-            /**
1519
-             * JavaScript script source offset for the range start.
1520
-             */
1521
-            startOffset: number;
1522
-            /**
1523
-             * JavaScript script source offset for the range end.
1524
-             */
1525
-            endOffset: number;
1526
-            /**
1527
-             * Collected execution count of the source range.
1528
-             */
1529
-            count: number;
1530
-        }
1531
-
1532
-        /**
1533
-         * Coverage data for a JavaScript function.
1534
-         */
1535
-        interface FunctionCoverage {
1536
-            /**
1537
-             * JavaScript function name.
1538
-             */
1539
-            functionName: string;
1540
-            /**
1541
-             * Source ranges inside the function with coverage data.
1542
-             */
1543
-            ranges: CoverageRange[];
1544
-            /**
1545
-             * Whether coverage data for this function has block granularity.
1546
-             */
1547
-            isBlockCoverage: boolean;
1548
-        }
1549
-
1550
-        /**
1551
-         * Coverage data for a JavaScript script.
1552
-         */
1553
-        interface ScriptCoverage {
1554
-            /**
1555
-             * JavaScript script id.
1556
-             */
1557
-            scriptId: Runtime.ScriptId;
1558
-            /**
1559
-             * JavaScript script name or url.
1560
-             */
1561
-            url: string;
1562
-            /**
1563
-             * Functions contained in the script that has coverage data.
1564
-             */
1565
-            functions: FunctionCoverage[];
1566
-        }
1567
-
1568
-        /**
1569
-         * Describes a type collected during runtime.
1570
-         * @experimental
1571
-         */
1572
-        interface TypeObject {
1573
-            /**
1574
-             * Name of a type collected with type profiling.
1575
-             */
1576
-            name: string;
1577
-        }
1578
-
1579
-        /**
1580
-         * Source offset and types for a parameter or return value.
1581
-         * @experimental
1582
-         */
1583
-        interface TypeProfileEntry {
1584
-            /**
1585
-             * Source offset of the parameter or end of function for return values.
1586
-             */
1587
-            offset: number;
1588
-            /**
1589
-             * The types for this parameter or return value.
1590
-             */
1591
-            types: TypeObject[];
1592
-        }
1593
-
1594
-        /**
1595
-         * Type profile data collected during runtime for a JavaScript script.
1596
-         * @experimental
1597
-         */
1598
-        interface ScriptTypeProfile {
1599
-            /**
1600
-             * JavaScript script id.
1601
-             */
1602
-            scriptId: Runtime.ScriptId;
1603
-            /**
1604
-             * JavaScript script name or url.
1605
-             */
1606
-            url: string;
1607
-            /**
1608
-             * Type profile entries for parameters and return values of the functions in the script.
1609
-             */
1610
-            entries: TypeProfileEntry[];
1611
-        }
1612
-
1613
-        interface SetSamplingIntervalParameterType {
1614
-            /**
1615
-             * New sampling interval in microseconds.
1616
-             */
1617
-            interval: number;
1618
-        }
1619
-
1620
-        interface StartPreciseCoverageParameterType {
1621
-            /**
1622
-             * Collect accurate call counts beyond simple 'covered' or 'not covered'.
1623
-             */
1624
-            callCount?: boolean;
1625
-            /**
1626
-             * Collect block-based coverage.
1627
-             */
1628
-            detailed?: boolean;
1629
-        }
1630
-
1631
-        interface StopReturnType {
1632
-            /**
1633
-             * Recorded profile.
1634
-             */
1635
-            profile: Profile;
1636
-        }
1637
-
1638
-        interface TakePreciseCoverageReturnType {
1639
-            /**
1640
-             * Coverage data for the current isolate.
1641
-             */
1642
-            result: ScriptCoverage[];
1643
-        }
1644
-
1645
-        interface GetBestEffortCoverageReturnType {
1646
-            /**
1647
-             * Coverage data for the current isolate.
1648
-             */
1649
-            result: ScriptCoverage[];
1650
-        }
1651
-
1652
-        interface TakeTypeProfileReturnType {
1653
-            /**
1654
-             * Type profile for all scripts since startTypeProfile() was turned on.
1655
-             */
1656
-            result: ScriptTypeProfile[];
1657
-        }
1658
-
1659
-        interface ConsoleProfileStartedEventDataType {
1660
-            id: string;
1661
-            /**
1662
-             * Location of console.profile().
1663
-             */
1664
-            location: Debugger.Location;
1665
-            /**
1666
-             * Profile title passed as an argument to console.profile().
1667
-             */
1668
-            title?: string;
1669
-        }
1670
-
1671
-        interface ConsoleProfileFinishedEventDataType {
1672
-            id: string;
1673
-            /**
1674
-             * Location of console.profileEnd().
1675
-             */
1676
-            location: Debugger.Location;
1677
-            profile: Profile;
1678
-            /**
1679
-             * Profile title passed as an argument to console.profile().
1680
-             */
1681
-            title?: string;
1682
-        }
1683
-    }
1684
-
1685
-    namespace HeapProfiler {
1686
-        /**
1687
-         * Heap snapshot object id.
1688
-         */
1689
-        type HeapSnapshotObjectId = string;
1690
-
1691
-        /**
1692
-         * Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.
1693
-         */
1694
-        interface SamplingHeapProfileNode {
1695
-            /**
1696
-             * Function location.
1697
-             */
1698
-            callFrame: Runtime.CallFrame;
1699
-            /**
1700
-             * Allocations size in bytes for the node excluding children.
1701
-             */
1702
-            selfSize: number;
1703
-            /**
1704
-             * Child nodes.
1705
-             */
1706
-            children: SamplingHeapProfileNode[];
1707
-        }
1708
-
1709
-        /**
1710
-         * Profile.
1711
-         */
1712
-        interface SamplingHeapProfile {
1713
-            head: SamplingHeapProfileNode;
1714
-        }
1715
-
1716
-        interface StartTrackingHeapObjectsParameterType {
1717
-            trackAllocations?: boolean;
1718
-        }
1719
-
1720
-        interface StopTrackingHeapObjectsParameterType {
1721
-            /**
1722
-             * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
1723
-             */
1724
-            reportProgress?: boolean;
1725
-        }
1726
-
1727
-        interface TakeHeapSnapshotParameterType {
1728
-            /**
1729
-             * If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
1730
-             */
1731
-            reportProgress?: boolean;
1732
-        }
1733
-
1734
-        interface GetObjectByHeapObjectIdParameterType {
1735
-            objectId: HeapSnapshotObjectId;
1736
-            /**
1737
-             * Symbolic group name that can be used to release multiple objects.
1738
-             */
1739
-            objectGroup?: string;
1740
-        }
1741
-
1742
-        interface AddInspectedHeapObjectParameterType {
1743
-            /**
1744
-             * Heap snapshot object id to be accessible by means of $x command line API.
1745
-             */
1746
-            heapObjectId: HeapSnapshotObjectId;
1747
-        }
1748
-
1749
-        interface GetHeapObjectIdParameterType {
1750
-            /**
1751
-             * Identifier of the object to get heap object id for.
1752
-             */
1753
-            objectId: Runtime.RemoteObjectId;
1754
-        }
1755
-
1756
-        interface StartSamplingParameterType {
1757
-            /**
1758
-             * Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
1759
-             */
1760
-            samplingInterval?: number;
1761
-        }
1762
-
1763
-        interface GetObjectByHeapObjectIdReturnType {
1764
-            /**
1765
-             * Evaluation result.
1766
-             */
1767
-            result: Runtime.RemoteObject;
1768
-        }
1769
-
1770
-        interface GetHeapObjectIdReturnType {
1771
-            /**
1772
-             * Id of the heap snapshot object corresponding to the passed remote object id.
1773
-             */
1774
-            heapSnapshotObjectId: HeapSnapshotObjectId;
1775
-        }
1776
-
1777
-        interface StopSamplingReturnType {
1778
-            /**
1779
-             * Recorded sampling heap profile.
1780
-             */
1781
-            profile: SamplingHeapProfile;
1782
-        }
1783
-
1784
-        interface GetSamplingProfileReturnType {
1785
-            /**
1786
-             * Return the sampling profile being collected.
1787
-             */
1788
-            profile: SamplingHeapProfile;
1789
-        }
1790
-
1791
-        interface AddHeapSnapshotChunkEventDataType {
1792
-            chunk: string;
1793
-        }
1794
-
1795
-        interface ReportHeapSnapshotProgressEventDataType {
1796
-            done: number;
1797
-            total: number;
1798
-            finished?: boolean;
1799
-        }
1800
-
1801
-        interface LastSeenObjectIdEventDataType {
1802
-            lastSeenObjectId: number;
1803
-            timestamp: number;
1804
-        }
1805
-
1806
-        interface HeapStatsUpdateEventDataType {
1807
-            /**
1808
-             * An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
1809
-             */
1810
-            statsUpdate: number[];
1811
-        }
1812
-    }
1813
-
1814
-    namespace NodeTracing {
1815
-        interface TraceConfig {
1816
-            /**
1817
-             * Controls how the trace buffer stores data.
1818
-             */
1819
-            recordMode?: string;
1820
-            /**
1821
-             * Included category filters.
1822
-             */
1823
-            includedCategories: string[];
1824
-        }
1825
-
1826
-        interface StartParameterType {
1827
-            traceConfig: TraceConfig;
1828
-        }
1829
-
1830
-        interface GetCategoriesReturnType {
1831
-            /**
1832
-             * A list of supported tracing categories.
1833
-             */
1834
-            categories: string[];
1835
-        }
1836
-
1837
-        interface DataCollectedEventDataType {
1838
-            value: Array<{}>;
1839
-        }
1840
-    }
1841
-
1842
-    namespace NodeWorker {
1843
-        type WorkerID = string;
1844
-
1845
-        /**
1846
-         * Unique identifier of attached debugging session.
1847
-         */
1848
-        type SessionID = string;
1849
-
1850
-        interface WorkerInfo {
1851
-            workerId: WorkerID;
1852
-            type: string;
1853
-            title: string;
1854
-            url: string;
1855
-        }
1856
-
1857
-        interface SendMessageToWorkerParameterType {
1858
-            message: string;
1859
-            /**
1860
-             * Identifier of the session.
1861
-             */
1862
-            sessionId: SessionID;
1863
-        }
1864
-
1865
-        interface EnableParameterType {
1866
-            /**
1867
-             * Whether to new workers should be paused until the frontend sends `Runtime.runIfWaitingForDebugger`
1868
-             * message to run them.
1869
-             */
1870
-            waitForDebuggerOnStart: boolean;
1871
-        }
1872
-
1873
-        interface DetachParameterType {
1874
-            sessionId: SessionID;
1875
-        }
1876
-
1877
-        interface AttachedToWorkerEventDataType {
1878
-            /**
1879
-             * Identifier assigned to the session used to send/receive messages.
1880
-             */
1881
-            sessionId: SessionID;
1882
-            workerInfo: WorkerInfo;
1883
-            waitingForDebugger: boolean;
1884
-        }
1885
-
1886
-        interface DetachedFromWorkerEventDataType {
1887
-            /**
1888
-             * Detached session identifier.
1889
-             */
1890
-            sessionId: SessionID;
1891
-        }
1892
-
1893
-        interface ReceivedMessageFromWorkerEventDataType {
1894
-            /**
1895
-             * Identifier of a session which sends a message.
1896
-             */
1897
-            sessionId: SessionID;
1898
-            message: string;
1899
-        }
1900
-    }
1901
-
1902
-    namespace NodeRuntime {
1903
-        interface NotifyWhenWaitingForDisconnectParameterType {
1904
-            enabled: boolean;
1905
-        }
1906
-    }
1907
-
1908
-    /**
1909
-     * The inspector.Session is used for dispatching messages to the V8 inspector back-end and receiving message responses and notifications.
1910
-     */
1911
-    class Session extends EventEmitter {
1912
-        /**
1913
-         * Create a new instance of the inspector.Session class.
1914
-         * The inspector session needs to be connected through session.connect() before the messages can be dispatched to the inspector backend.
1915
-         */
1916
-        constructor();
1917
-
1918
-        /**
1919
-         * Connects a session to the inspector back-end.
1920
-         * An exception will be thrown if there is already a connected session established either
1921
-         * through the API or by a front-end connected to the Inspector WebSocket port.
1922
-         */
1923
-        connect(): void;
1924
-
1925
-        /**
1926
-         * Immediately close the session. All pending message callbacks will be called with an error.
1927
-         * session.connect() will need to be called to be able to send messages again.
1928
-         * Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
1929
-         */
1930
-        disconnect(): void;
1931
-
1932
-        /**
1933
-         * Posts a message to the inspector back-end. callback will be notified when a response is received.
1934
-         * callback is a function that accepts two optional arguments - error and message-specific result.
1935
-         */
1936
-        post(method: string, params?: {}, callback?: (err: Error | null, params?: {}) => void): void;
1937
-        post(method: string, callback?: (err: Error | null, params?: {}) => void): void;
1938
-
1939
-        /**
1940
-         * Returns supported domains.
1941
-         */
1942
-        post(method: "Schema.getDomains", callback?: (err: Error | null, params: Schema.GetDomainsReturnType) => void): void;
1943
-
1944
-        /**
1945
-         * Evaluates expression on global object.
1946
-         */
1947
-        post(method: "Runtime.evaluate", params?: Runtime.EvaluateParameterType, callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1948
-        post(method: "Runtime.evaluate", callback?: (err: Error | null, params: Runtime.EvaluateReturnType) => void): void;
1949
-
1950
-        /**
1951
-         * Add handler to promise with given promise object id.
1952
-         */
1953
-        post(method: "Runtime.awaitPromise", params?: Runtime.AwaitPromiseParameterType, callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1954
-        post(method: "Runtime.awaitPromise", callback?: (err: Error | null, params: Runtime.AwaitPromiseReturnType) => void): void;
1955
-
1956
-        /**
1957
-         * Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
1958
-         */
1959
-        post(method: "Runtime.callFunctionOn", params?: Runtime.CallFunctionOnParameterType, callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1960
-        post(method: "Runtime.callFunctionOn", callback?: (err: Error | null, params: Runtime.CallFunctionOnReturnType) => void): void;
1961
-
1962
-        /**
1963
-         * Returns properties of a given object. Object group of the result is inherited from the target object.
1964
-         */
1965
-        post(method: "Runtime.getProperties", params?: Runtime.GetPropertiesParameterType, callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1966
-        post(method: "Runtime.getProperties", callback?: (err: Error | null, params: Runtime.GetPropertiesReturnType) => void): void;
1967
-
1968
-        /**
1969
-         * Releases remote object with given id.
1970
-         */
1971
-        post(method: "Runtime.releaseObject", params?: Runtime.ReleaseObjectParameterType, callback?: (err: Error | null) => void): void;
1972
-        post(method: "Runtime.releaseObject", callback?: (err: Error | null) => void): void;
1973
-
1974
-        /**
1975
-         * Releases all remote objects that belong to a given group.
1976
-         */
1977
-        post(method: "Runtime.releaseObjectGroup", params?: Runtime.ReleaseObjectGroupParameterType, callback?: (err: Error | null) => void): void;
1978
-        post(method: "Runtime.releaseObjectGroup", callback?: (err: Error | null) => void): void;
1979
-
1980
-        /**
1981
-         * Tells inspected instance to run if it was waiting for debugger to attach.
1982
-         */
1983
-        post(method: "Runtime.runIfWaitingForDebugger", callback?: (err: Error | null) => void): void;
1984
-
1985
-        /**
1986
-         * Enables reporting of execution contexts creation by means of <code>executionContextCreated</code> event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
1987
-         */
1988
-        post(method: "Runtime.enable", callback?: (err: Error | null) => void): void;
1989
-
1990
-        /**
1991
-         * Disables reporting of execution contexts creation.
1992
-         */
1993
-        post(method: "Runtime.disable", callback?: (err: Error | null) => void): void;
1994
-
1995
-        /**
1996
-         * Discards collected exceptions and console API calls.
1997
-         */
1998
-        post(method: "Runtime.discardConsoleEntries", callback?: (err: Error | null) => void): void;
1999
-
2000
-        /**
2001
-         * @experimental
2002
-         */
2003
-        post(method: "Runtime.setCustomObjectFormatterEnabled", params?: Runtime.SetCustomObjectFormatterEnabledParameterType, callback?: (err: Error | null) => void): void;
2004
-        post(method: "Runtime.setCustomObjectFormatterEnabled", callback?: (err: Error | null) => void): void;
2005
-
2006
-        /**
2007
-         * Compiles expression.
2008
-         */
2009
-        post(method: "Runtime.compileScript", params?: Runtime.CompileScriptParameterType, callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
2010
-        post(method: "Runtime.compileScript", callback?: (err: Error | null, params: Runtime.CompileScriptReturnType) => void): void;
2011
-
2012
-        /**
2013
-         * Runs script with given id in a given context.
2014
-         */
2015
-        post(method: "Runtime.runScript", params?: Runtime.RunScriptParameterType, callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2016
-        post(method: "Runtime.runScript", callback?: (err: Error | null, params: Runtime.RunScriptReturnType) => void): void;
2017
-
2018
-        post(method: "Runtime.queryObjects", params?: Runtime.QueryObjectsParameterType, callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
2019
-        post(method: "Runtime.queryObjects", callback?: (err: Error | null, params: Runtime.QueryObjectsReturnType) => void): void;
2020
-
2021
-        /**
2022
-         * Returns all let, const and class variables from global scope.
2023
-         */
2024
-        post(
2025
-            method: "Runtime.globalLexicalScopeNames",
2026
-            params?: Runtime.GlobalLexicalScopeNamesParameterType,
2027
-            callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void
2028
-        ): void;
2029
-        post(method: "Runtime.globalLexicalScopeNames", callback?: (err: Error | null, params: Runtime.GlobalLexicalScopeNamesReturnType) => void): void;
2030
-
2031
-        /**
2032
-         * Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received.
2033
-         */
2034
-        post(method: "Debugger.enable", callback?: (err: Error | null, params: Debugger.EnableReturnType) => void): void;
2035
-
2036
-        /**
2037
-         * Disables debugger for given page.
2038
-         */
2039
-        post(method: "Debugger.disable", callback?: (err: Error | null) => void): void;
2040
-
2041
-        /**
2042
-         * Activates / deactivates all breakpoints on the page.
2043
-         */
2044
-        post(method: "Debugger.setBreakpointsActive", params?: Debugger.SetBreakpointsActiveParameterType, callback?: (err: Error | null) => void): void;
2045
-        post(method: "Debugger.setBreakpointsActive", callback?: (err: Error | null) => void): void;
2046
-
2047
-        /**
2048
-         * Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).
2049
-         */
2050
-        post(method: "Debugger.setSkipAllPauses", params?: Debugger.SetSkipAllPausesParameterType, callback?: (err: Error | null) => void): void;
2051
-        post(method: "Debugger.setSkipAllPauses", callback?: (err: Error | null) => void): void;
2052
-
2053
-        /**
2054
-         * Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in <code>locations</code> property. Further matching script parsing will result in subsequent <code>breakpointResolved</code> events issued. This logical breakpoint will survive page reloads.
2055
-         */
2056
-        post(method: "Debugger.setBreakpointByUrl", params?: Debugger.SetBreakpointByUrlParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
2057
-        post(method: "Debugger.setBreakpointByUrl", callback?: (err: Error | null, params: Debugger.SetBreakpointByUrlReturnType) => void): void;
2058
-
2059
-        /**
2060
-         * Sets JavaScript breakpoint at a given location.
2061
-         */
2062
-        post(method: "Debugger.setBreakpoint", params?: Debugger.SetBreakpointParameterType, callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
2063
-        post(method: "Debugger.setBreakpoint", callback?: (err: Error | null, params: Debugger.SetBreakpointReturnType) => void): void;
2064
-
2065
-        /**
2066
-         * Removes JavaScript breakpoint.
2067
-         */
2068
-        post(method: "Debugger.removeBreakpoint", params?: Debugger.RemoveBreakpointParameterType, callback?: (err: Error | null) => void): void;
2069
-        post(method: "Debugger.removeBreakpoint", callback?: (err: Error | null) => void): void;
2070
-
2071
-        /**
2072
-         * Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.
2073
-         */
2074
-        post(
2075
-            method: "Debugger.getPossibleBreakpoints",
2076
-            params?: Debugger.GetPossibleBreakpointsParameterType,
2077
-            callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void
2078
-        ): void;
2079
-        post(method: "Debugger.getPossibleBreakpoints", callback?: (err: Error | null, params: Debugger.GetPossibleBreakpointsReturnType) => void): void;
2080
-
2081
-        /**
2082
-         * Continues execution until specific location is reached.
2083
-         */
2084
-        post(method: "Debugger.continueToLocation", params?: Debugger.ContinueToLocationParameterType, callback?: (err: Error | null) => void): void;
2085
-        post(method: "Debugger.continueToLocation", callback?: (err: Error | null) => void): void;
2086
-
2087
-        /**
2088
-         * @experimental
2089
-         */
2090
-        post(method: "Debugger.pauseOnAsyncCall", params?: Debugger.PauseOnAsyncCallParameterType, callback?: (err: Error | null) => void): void;
2091
-        post(method: "Debugger.pauseOnAsyncCall", callback?: (err: Error | null) => void): void;
2092
-
2093
-        /**
2094
-         * Steps over the statement.
2095
-         */
2096
-        post(method: "Debugger.stepOver", callback?: (err: Error | null) => void): void;
2097
-
2098
-        /**
2099
-         * Steps into the function call.
2100
-         */
2101
-        post(method: "Debugger.stepInto", params?: Debugger.StepIntoParameterType, callback?: (err: Error | null) => void): void;
2102
-        post(method: "Debugger.stepInto", callback?: (err: Error | null) => void): void;
2103
-
2104
-        /**
2105
-         * Steps out of the function call.
2106
-         */
2107
-        post(method: "Debugger.stepOut", callback?: (err: Error | null) => void): void;
2108
-
2109
-        /**
2110
-         * Stops on the next JavaScript statement.
2111
-         */
2112
-        post(method: "Debugger.pause", callback?: (err: Error | null) => void): void;
2113
-
2114
-        /**
2115
-         * This method is deprecated - use Debugger.stepInto with breakOnAsyncCall and Debugger.pauseOnAsyncTask instead. Steps into next scheduled async task if any is scheduled before next pause. Returns success when async task is actually scheduled, returns error if no task were scheduled or another scheduleStepIntoAsync was called.
2116
-         * @experimental
2117
-         */
2118
-        post(method: "Debugger.scheduleStepIntoAsync", callback?: (err: Error | null) => void): void;
2119
-
2120
-        /**
2121
-         * Resumes JavaScript execution.
2122
-         */
2123
-        post(method: "Debugger.resume", callback?: (err: Error | null) => void): void;
2124
-
2125
-        /**
2126
-         * Returns stack trace with given <code>stackTraceId</code>.
2127
-         * @experimental
2128
-         */
2129
-        post(method: "Debugger.getStackTrace", params?: Debugger.GetStackTraceParameterType, callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
2130
-        post(method: "Debugger.getStackTrace", callback?: (err: Error | null, params: Debugger.GetStackTraceReturnType) => void): void;
2131
-
2132
-        /**
2133
-         * Searches for given string in script content.
2134
-         */
2135
-        post(method: "Debugger.searchInContent", params?: Debugger.SearchInContentParameterType, callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
2136
-        post(method: "Debugger.searchInContent", callback?: (err: Error | null, params: Debugger.SearchInContentReturnType) => void): void;
2137
-
2138
-        /**
2139
-         * Edits JavaScript source live.
2140
-         */
2141
-        post(method: "Debugger.setScriptSource", params?: Debugger.SetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
2142
-        post(method: "Debugger.setScriptSource", callback?: (err: Error | null, params: Debugger.SetScriptSourceReturnType) => void): void;
2143
-
2144
-        /**
2145
-         * Restarts particular call frame from the beginning.
2146
-         */
2147
-        post(method: "Debugger.restartFrame", params?: Debugger.RestartFrameParameterType, callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
2148
-        post(method: "Debugger.restartFrame", callback?: (err: Error | null, params: Debugger.RestartFrameReturnType) => void): void;
2149
-
2150
-        /**
2151
-         * Returns source for the script with given id.
2152
-         */
2153
-        post(method: "Debugger.getScriptSource", params?: Debugger.GetScriptSourceParameterType, callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
2154
-        post(method: "Debugger.getScriptSource", callback?: (err: Error | null, params: Debugger.GetScriptSourceReturnType) => void): void;
2155
-
2156
-        /**
2157
-         * Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions or no exceptions. Initial pause on exceptions state is <code>none</code>.
2158
-         */
2159
-        post(method: "Debugger.setPauseOnExceptions", params?: Debugger.SetPauseOnExceptionsParameterType, callback?: (err: Error | null) => void): void;
2160
-        post(method: "Debugger.setPauseOnExceptions", callback?: (err: Error | null) => void): void;
2161
-
2162
-        /**
2163
-         * Evaluates expression on a given call frame.
2164
-         */
2165
-        post(method: "Debugger.evaluateOnCallFrame", params?: Debugger.EvaluateOnCallFrameParameterType, callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
2166
-        post(method: "Debugger.evaluateOnCallFrame", callback?: (err: Error | null, params: Debugger.EvaluateOnCallFrameReturnType) => void): void;
2167
-
2168
-        /**
2169
-         * Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.
2170
-         */
2171
-        post(method: "Debugger.setVariableValue", params?: Debugger.SetVariableValueParameterType, callback?: (err: Error | null) => void): void;
2172
-        post(method: "Debugger.setVariableValue", callback?: (err: Error | null) => void): void;
2173
-
2174
-        /**
2175
-         * Changes return value in top frame. Available only at return break position.
2176
-         * @experimental
2177
-         */
2178
-        post(method: "Debugger.setReturnValue", params?: Debugger.SetReturnValueParameterType, callback?: (err: Error | null) => void): void;
2179
-        post(method: "Debugger.setReturnValue", callback?: (err: Error | null) => void): void;
2180
-
2181
-        /**
2182
-         * Enables or disables async call stacks tracking.
2183
-         */
2184
-        post(method: "Debugger.setAsyncCallStackDepth", params?: Debugger.SetAsyncCallStackDepthParameterType, callback?: (err: Error | null) => void): void;
2185
-        post(method: "Debugger.setAsyncCallStackDepth", callback?: (err: Error | null) => void): void;
2186
-
2187
-        /**
2188
-         * Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.
2189
-         * @experimental
2190
-         */
2191
-        post(method: "Debugger.setBlackboxPatterns", params?: Debugger.SetBlackboxPatternsParameterType, callback?: (err: Error | null) => void): void;
2192
-        post(method: "Debugger.setBlackboxPatterns", callback?: (err: Error | null) => void): void;
2193
-
2194
-        /**
2195
-         * Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.
2196
-         * @experimental
2197
-         */
2198
-        post(method: "Debugger.setBlackboxedRanges", params?: Debugger.SetBlackboxedRangesParameterType, callback?: (err: Error | null) => void): void;
2199
-        post(method: "Debugger.setBlackboxedRanges", callback?: (err: Error | null) => void): void;
2200
-
2201
-        /**
2202
-         * Enables console domain, sends the messages collected so far to the client by means of the <code>messageAdded</code> notification.
2203
-         */
2204
-        post(method: "Console.enable", callback?: (err: Error | null) => void): void;
2205
-
2206
-        /**
2207
-         * Disables console domain, prevents further console messages from being reported to the client.
2208
-         */
2209
-        post(method: "Console.disable", callback?: (err: Error | null) => void): void;
2210
-
2211
-        /**
2212
-         * Does nothing.
2213
-         */
2214
-        post(method: "Console.clearMessages", callback?: (err: Error | null) => void): void;
2215
-
2216
-        post(method: "Profiler.enable", callback?: (err: Error | null) => void): void;
2217
-
2218
-        post(method: "Profiler.disable", callback?: (err: Error | null) => void): void;
2219
-
2220
-        /**
2221
-         * Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.
2222
-         */
2223
-        post(method: "Profiler.setSamplingInterval", params?: Profiler.SetSamplingIntervalParameterType, callback?: (err: Error | null) => void): void;
2224
-        post(method: "Profiler.setSamplingInterval", callback?: (err: Error | null) => void): void;
2225
-
2226
-        post(method: "Profiler.start", callback?: (err: Error | null) => void): void;
2227
-
2228
-        post(method: "Profiler.stop", callback?: (err: Error | null, params: Profiler.StopReturnType) => void): void;
2229
-
2230
-        /**
2231
-         * Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.
2232
-         */
2233
-        post(method: "Profiler.startPreciseCoverage", params?: Profiler.StartPreciseCoverageParameterType, callback?: (err: Error | null) => void): void;
2234
-        post(method: "Profiler.startPreciseCoverage", callback?: (err: Error | null) => void): void;
2235
-
2236
-        /**
2237
-         * Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.
2238
-         */
2239
-        post(method: "Profiler.stopPreciseCoverage", callback?: (err: Error | null) => void): void;
2240
-
2241
-        /**
2242
-         * Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.
2243
-         */
2244
-        post(method: "Profiler.takePreciseCoverage", callback?: (err: Error | null, params: Profiler.TakePreciseCoverageReturnType) => void): void;
2245
-
2246
-        /**
2247
-         * Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.
2248
-         */
2249
-        post(method: "Profiler.getBestEffortCoverage", callback?: (err: Error | null, params: Profiler.GetBestEffortCoverageReturnType) => void): void;
2250
-
2251
-        /**
2252
-         * Enable type profile.
2253
-         * @experimental
2254
-         */
2255
-        post(method: "Profiler.startTypeProfile", callback?: (err: Error | null) => void): void;
2256
-
2257
-        /**
2258
-         * Disable type profile. Disabling releases type profile data collected so far.
2259
-         * @experimental
2260
-         */
2261
-        post(method: "Profiler.stopTypeProfile", callback?: (err: Error | null) => void): void;
2262
-
2263
-        /**
2264
-         * Collect type profile.
2265
-         * @experimental
2266
-         */
2267
-        post(method: "Profiler.takeTypeProfile", callback?: (err: Error | null, params: Profiler.TakeTypeProfileReturnType) => void): void;
2268
-
2269
-        post(method: "HeapProfiler.enable", callback?: (err: Error | null) => void): void;
2270
-
2271
-        post(method: "HeapProfiler.disable", callback?: (err: Error | null) => void): void;
2272
-
2273
-        post(method: "HeapProfiler.startTrackingHeapObjects", params?: HeapProfiler.StartTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2274
-        post(method: "HeapProfiler.startTrackingHeapObjects", callback?: (err: Error | null) => void): void;
2275
-
2276
-        post(method: "HeapProfiler.stopTrackingHeapObjects", params?: HeapProfiler.StopTrackingHeapObjectsParameterType, callback?: (err: Error | null) => void): void;
2277
-        post(method: "HeapProfiler.stopTrackingHeapObjects", callback?: (err: Error | null) => void): void;
2278
-
2279
-        post(method: "HeapProfiler.takeHeapSnapshot", params?: HeapProfiler.TakeHeapSnapshotParameterType, callback?: (err: Error | null) => void): void;
2280
-        post(method: "HeapProfiler.takeHeapSnapshot", callback?: (err: Error | null) => void): void;
2281
-
2282
-        post(method: "HeapProfiler.collectGarbage", callback?: (err: Error | null) => void): void;
2283
-
2284
-        post(
2285
-            method: "HeapProfiler.getObjectByHeapObjectId",
2286
-            params?: HeapProfiler.GetObjectByHeapObjectIdParameterType,
2287
-            callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void
2288
-        ): void;
2289
-        post(method: "HeapProfiler.getObjectByHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetObjectByHeapObjectIdReturnType) => void): void;
2290
-
2291
-        /**
2292
-         * Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).
2293
-         */
2294
-        post(method: "HeapProfiler.addInspectedHeapObject", params?: HeapProfiler.AddInspectedHeapObjectParameterType, callback?: (err: Error | null) => void): void;
2295
-        post(method: "HeapProfiler.addInspectedHeapObject", callback?: (err: Error | null) => void): void;
2296
-
2297
-        post(method: "HeapProfiler.getHeapObjectId", params?: HeapProfiler.GetHeapObjectIdParameterType, callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2298
-        post(method: "HeapProfiler.getHeapObjectId", callback?: (err: Error | null, params: HeapProfiler.GetHeapObjectIdReturnType) => void): void;
2299
-
2300
-        post(method: "HeapProfiler.startSampling", params?: HeapProfiler.StartSamplingParameterType, callback?: (err: Error | null) => void): void;
2301
-        post(method: "HeapProfiler.startSampling", callback?: (err: Error | null) => void): void;
2302
-
2303
-        post(method: "HeapProfiler.stopSampling", callback?: (err: Error | null, params: HeapProfiler.StopSamplingReturnType) => void): void;
2304
-
2305
-        post(method: "HeapProfiler.getSamplingProfile", callback?: (err: Error | null, params: HeapProfiler.GetSamplingProfileReturnType) => void): void;
2306
-
2307
-        /**
2308
-         * Gets supported tracing categories.
2309
-         */
2310
-        post(method: "NodeTracing.getCategories", callback?: (err: Error | null, params: NodeTracing.GetCategoriesReturnType) => void): void;
2311
-
2312
-        /**
2313
-         * Start trace events collection.
2314
-         */
2315
-        post(method: "NodeTracing.start", params?: NodeTracing.StartParameterType, callback?: (err: Error | null) => void): void;
2316
-        post(method: "NodeTracing.start", callback?: (err: Error | null) => void): void;
2317
-
2318
-        /**
2319
-         * Stop trace events collection. Remaining collected events will be sent as a sequence of
2320
-         * dataCollected events followed by tracingComplete event.
2321
-         */
2322
-        post(method: "NodeTracing.stop", callback?: (err: Error | null) => void): void;
2323
-
2324
-        /**
2325
-         * Sends protocol message over session with given id.
2326
-         */
2327
-        post(method: "NodeWorker.sendMessageToWorker", params?: NodeWorker.SendMessageToWorkerParameterType, callback?: (err: Error | null) => void): void;
2328
-        post(method: "NodeWorker.sendMessageToWorker", callback?: (err: Error | null) => void): void;
2329
-
2330
-        /**
2331
-         * Instructs the inspector to attach to running workers. Will also attach to new workers
2332
-         * as they start
2333
-         */
2334
-        post(method: "NodeWorker.enable", params?: NodeWorker.EnableParameterType, callback?: (err: Error | null) => void): void;
2335
-        post(method: "NodeWorker.enable", callback?: (err: Error | null) => void): void;
2336
-
2337
-        /**
2338
-         * Detaches from all running workers and disables attaching to new workers as they are started.
2339
-         */
2340
-        post(method: "NodeWorker.disable", callback?: (err: Error | null) => void): void;
2341
-
2342
-        /**
2343
-         * Detached from the worker with given sessionId.
2344
-         */
2345
-        post(method: "NodeWorker.detach", params?: NodeWorker.DetachParameterType, callback?: (err: Error | null) => void): void;
2346
-        post(method: "NodeWorker.detach", callback?: (err: Error | null) => void): void;
2347
-
2348
-        /**
2349
-         * Enable the `NodeRuntime.waitingForDisconnect`.
2350
-         */
2351
-        post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", params?: NodeRuntime.NotifyWhenWaitingForDisconnectParameterType, callback?: (err: Error | null) => void): void;
2352
-        post(method: "NodeRuntime.notifyWhenWaitingForDisconnect", callback?: (err: Error | null) => void): void;
2353
-
2354
-        // Events
2355
-
2356
-        addListener(event: string, listener: (...args: any[]) => void): this;
2357
-
2358
-        /**
2359
-         * Emitted when any notification from the V8 Inspector is received.
2360
-         */
2361
-        addListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2362
-
2363
-        /**
2364
-         * Issued when new execution context is created.
2365
-         */
2366
-        addListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2367
-
2368
-        /**
2369
-         * Issued when execution context is destroyed.
2370
-         */
2371
-        addListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2372
-
2373
-        /**
2374
-         * Issued when all executionContexts were cleared in browser
2375
-         */
2376
-        addListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2377
-
2378
-        /**
2379
-         * Issued when exception was thrown and unhandled.
2380
-         */
2381
-        addListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2382
-
2383
-        /**
2384
-         * Issued when unhandled exception was revoked.
2385
-         */
2386
-        addListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2387
-
2388
-        /**
2389
-         * Issued when console API was called.
2390
-         */
2391
-        addListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2392
-
2393
-        /**
2394
-         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2395
-         */
2396
-        addListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2397
-
2398
-        /**
2399
-         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2400
-         */
2401
-        addListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2402
-
2403
-        /**
2404
-         * Fired when virtual machine fails to parse the script.
2405
-         */
2406
-        addListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2407
-
2408
-        /**
2409
-         * Fired when breakpoint is resolved to an actual script and location.
2410
-         */
2411
-        addListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2412
-
2413
-        /**
2414
-         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2415
-         */
2416
-        addListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2417
-
2418
-        /**
2419
-         * Fired when the virtual machine resumed execution.
2420
-         */
2421
-        addListener(event: "Debugger.resumed", listener: () => void): this;
2422
-
2423
-        /**
2424
-         * Issued when new console message is added.
2425
-         */
2426
-        addListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2427
-
2428
-        /**
2429
-         * Sent when new profile recording is started using console.profile() call.
2430
-         */
2431
-        addListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2432
-
2433
-        addListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2434
-        addListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2435
-        addListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2436
-        addListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2437
-
2438
-        /**
2439
-         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2440
-         */
2441
-        addListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2442
-
2443
-        /**
2444
-         * If heap objects tracking has been started then backend may send update for one or more fragments
2445
-         */
2446
-        addListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2447
-
2448
-        /**
2449
-         * Contains an bucket of collected trace events.
2450
-         */
2451
-        addListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2452
-
2453
-        /**
2454
-         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2455
-         * delivered via dataCollected events.
2456
-         */
2457
-        addListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2458
-
2459
-        /**
2460
-         * Issued when attached to a worker.
2461
-         */
2462
-        addListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2463
-
2464
-        /**
2465
-         * Issued when detached from the worker.
2466
-         */
2467
-        addListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2468
-
2469
-        /**
2470
-         * Notifies about a new protocol message received from the session
2471
-         * (session ID is provided in attachedToWorker notification).
2472
-         */
2473
-        addListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2474
-
2475
-        /**
2476
-         * This event is fired instead of `Runtime.executionContextDestroyed` when
2477
-         * enabled.
2478
-         * It is fired when the Node process finished all code execution and is
2479
-         * waiting for all frontends to disconnect.
2480
-         */
2481
-        addListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2482
-
2483
-        emit(event: string | symbol, ...args: any[]): boolean;
2484
-        emit(event: "inspectorNotification", message: InspectorNotification<{}>): boolean;
2485
-        emit(event: "Runtime.executionContextCreated", message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>): boolean;
2486
-        emit(event: "Runtime.executionContextDestroyed", message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>): boolean;
2487
-        emit(event: "Runtime.executionContextsCleared"): boolean;
2488
-        emit(event: "Runtime.exceptionThrown", message: InspectorNotification<Runtime.ExceptionThrownEventDataType>): boolean;
2489
-        emit(event: "Runtime.exceptionRevoked", message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>): boolean;
2490
-        emit(event: "Runtime.consoleAPICalled", message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>): boolean;
2491
-        emit(event: "Runtime.inspectRequested", message: InspectorNotification<Runtime.InspectRequestedEventDataType>): boolean;
2492
-        emit(event: "Debugger.scriptParsed", message: InspectorNotification<Debugger.ScriptParsedEventDataType>): boolean;
2493
-        emit(event: "Debugger.scriptFailedToParse", message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>): boolean;
2494
-        emit(event: "Debugger.breakpointResolved", message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>): boolean;
2495
-        emit(event: "Debugger.paused", message: InspectorNotification<Debugger.PausedEventDataType>): boolean;
2496
-        emit(event: "Debugger.resumed"): boolean;
2497
-        emit(event: "Console.messageAdded", message: InspectorNotification<Console.MessageAddedEventDataType>): boolean;
2498
-        emit(event: "Profiler.consoleProfileStarted", message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>): boolean;
2499
-        emit(event: "Profiler.consoleProfileFinished", message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>): boolean;
2500
-        emit(event: "HeapProfiler.addHeapSnapshotChunk", message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>): boolean;
2501
-        emit(event: "HeapProfiler.resetProfiles"): boolean;
2502
-        emit(event: "HeapProfiler.reportHeapSnapshotProgress", message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>): boolean;
2503
-        emit(event: "HeapProfiler.lastSeenObjectId", message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>): boolean;
2504
-        emit(event: "HeapProfiler.heapStatsUpdate", message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>): boolean;
2505
-        emit(event: "NodeTracing.dataCollected", message: InspectorNotification<NodeTracing.DataCollectedEventDataType>): boolean;
2506
-        emit(event: "NodeTracing.tracingComplete"): boolean;
2507
-        emit(event: "NodeWorker.attachedToWorker", message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>): boolean;
2508
-        emit(event: "NodeWorker.detachedFromWorker", message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>): boolean;
2509
-        emit(event: "NodeWorker.receivedMessageFromWorker", message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>): boolean;
2510
-        emit(event: "NodeRuntime.waitingForDisconnect"): boolean;
2511
-
2512
-        on(event: string, listener: (...args: any[]) => void): this;
2513
-
2514
-        /**
2515
-         * Emitted when any notification from the V8 Inspector is received.
2516
-         */
2517
-        on(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2518
-
2519
-        /**
2520
-         * Issued when new execution context is created.
2521
-         */
2522
-        on(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2523
-
2524
-        /**
2525
-         * Issued when execution context is destroyed.
2526
-         */
2527
-        on(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2528
-
2529
-        /**
2530
-         * Issued when all executionContexts were cleared in browser
2531
-         */
2532
-        on(event: "Runtime.executionContextsCleared", listener: () => void): this;
2533
-
2534
-        /**
2535
-         * Issued when exception was thrown and unhandled.
2536
-         */
2537
-        on(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2538
-
2539
-        /**
2540
-         * Issued when unhandled exception was revoked.
2541
-         */
2542
-        on(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2543
-
2544
-        /**
2545
-         * Issued when console API was called.
2546
-         */
2547
-        on(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2548
-
2549
-        /**
2550
-         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2551
-         */
2552
-        on(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2553
-
2554
-        /**
2555
-         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2556
-         */
2557
-        on(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2558
-
2559
-        /**
2560
-         * Fired when virtual machine fails to parse the script.
2561
-         */
2562
-        on(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2563
-
2564
-        /**
2565
-         * Fired when breakpoint is resolved to an actual script and location.
2566
-         */
2567
-        on(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2568
-
2569
-        /**
2570
-         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2571
-         */
2572
-        on(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2573
-
2574
-        /**
2575
-         * Fired when the virtual machine resumed execution.
2576
-         */
2577
-        on(event: "Debugger.resumed", listener: () => void): this;
2578
-
2579
-        /**
2580
-         * Issued when new console message is added.
2581
-         */
2582
-        on(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2583
-
2584
-        /**
2585
-         * Sent when new profile recording is started using console.profile() call.
2586
-         */
2587
-        on(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2588
-
2589
-        on(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2590
-        on(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2591
-        on(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2592
-        on(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2593
-
2594
-        /**
2595
-         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2596
-         */
2597
-        on(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2598
-
2599
-        /**
2600
-         * If heap objects tracking has been started then backend may send update for one or more fragments
2601
-         */
2602
-        on(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2603
-
2604
-        /**
2605
-         * Contains an bucket of collected trace events.
2606
-         */
2607
-        on(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2608
-
2609
-        /**
2610
-         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2611
-         * delivered via dataCollected events.
2612
-         */
2613
-        on(event: "NodeTracing.tracingComplete", listener: () => void): this;
2614
-
2615
-        /**
2616
-         * Issued when attached to a worker.
2617
-         */
2618
-        on(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2619
-
2620
-        /**
2621
-         * Issued when detached from the worker.
2622
-         */
2623
-        on(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2624
-
2625
-        /**
2626
-         * Notifies about a new protocol message received from the session
2627
-         * (session ID is provided in attachedToWorker notification).
2628
-         */
2629
-        on(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2630
-
2631
-        /**
2632
-         * This event is fired instead of `Runtime.executionContextDestroyed` when
2633
-         * enabled.
2634
-         * It is fired when the Node process finished all code execution and is
2635
-         * waiting for all frontends to disconnect.
2636
-         */
2637
-        on(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2638
-
2639
-        once(event: string, listener: (...args: any[]) => void): this;
2640
-
2641
-        /**
2642
-         * Emitted when any notification from the V8 Inspector is received.
2643
-         */
2644
-        once(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2645
-
2646
-        /**
2647
-         * Issued when new execution context is created.
2648
-         */
2649
-        once(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2650
-
2651
-        /**
2652
-         * Issued when execution context is destroyed.
2653
-         */
2654
-        once(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2655
-
2656
-        /**
2657
-         * Issued when all executionContexts were cleared in browser
2658
-         */
2659
-        once(event: "Runtime.executionContextsCleared", listener: () => void): this;
2660
-
2661
-        /**
2662
-         * Issued when exception was thrown and unhandled.
2663
-         */
2664
-        once(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2665
-
2666
-        /**
2667
-         * Issued when unhandled exception was revoked.
2668
-         */
2669
-        once(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2670
-
2671
-        /**
2672
-         * Issued when console API was called.
2673
-         */
2674
-        once(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2675
-
2676
-        /**
2677
-         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2678
-         */
2679
-        once(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2680
-
2681
-        /**
2682
-         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2683
-         */
2684
-        once(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2685
-
2686
-        /**
2687
-         * Fired when virtual machine fails to parse the script.
2688
-         */
2689
-        once(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2690
-
2691
-        /**
2692
-         * Fired when breakpoint is resolved to an actual script and location.
2693
-         */
2694
-        once(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2695
-
2696
-        /**
2697
-         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2698
-         */
2699
-        once(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2700
-
2701
-        /**
2702
-         * Fired when the virtual machine resumed execution.
2703
-         */
2704
-        once(event: "Debugger.resumed", listener: () => void): this;
2705
-
2706
-        /**
2707
-         * Issued when new console message is added.
2708
-         */
2709
-        once(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2710
-
2711
-        /**
2712
-         * Sent when new profile recording is started using console.profile() call.
2713
-         */
2714
-        once(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2715
-
2716
-        once(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2717
-        once(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2718
-        once(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2719
-        once(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2720
-
2721
-        /**
2722
-         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2723
-         */
2724
-        once(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2725
-
2726
-        /**
2727
-         * If heap objects tracking has been started then backend may send update for one or more fragments
2728
-         */
2729
-        once(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2730
-
2731
-        /**
2732
-         * Contains an bucket of collected trace events.
2733
-         */
2734
-        once(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2735
-
2736
-        /**
2737
-         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2738
-         * delivered via dataCollected events.
2739
-         */
2740
-        once(event: "NodeTracing.tracingComplete", listener: () => void): this;
2741
-
2742
-        /**
2743
-         * Issued when attached to a worker.
2744
-         */
2745
-        once(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2746
-
2747
-        /**
2748
-         * Issued when detached from the worker.
2749
-         */
2750
-        once(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2751
-
2752
-        /**
2753
-         * Notifies about a new protocol message received from the session
2754
-         * (session ID is provided in attachedToWorker notification).
2755
-         */
2756
-        once(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2757
-
2758
-        /**
2759
-         * This event is fired instead of `Runtime.executionContextDestroyed` when
2760
-         * enabled.
2761
-         * It is fired when the Node process finished all code execution and is
2762
-         * waiting for all frontends to disconnect.
2763
-         */
2764
-        once(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2765
-
2766
-        prependListener(event: string, listener: (...args: any[]) => void): this;
2767
-
2768
-        /**
2769
-         * Emitted when any notification from the V8 Inspector is received.
2770
-         */
2771
-        prependListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2772
-
2773
-        /**
2774
-         * Issued when new execution context is created.
2775
-         */
2776
-        prependListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2777
-
2778
-        /**
2779
-         * Issued when execution context is destroyed.
2780
-         */
2781
-        prependListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2782
-
2783
-        /**
2784
-         * Issued when all executionContexts were cleared in browser
2785
-         */
2786
-        prependListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2787
-
2788
-        /**
2789
-         * Issued when exception was thrown and unhandled.
2790
-         */
2791
-        prependListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2792
-
2793
-        /**
2794
-         * Issued when unhandled exception was revoked.
2795
-         */
2796
-        prependListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2797
-
2798
-        /**
2799
-         * Issued when console API was called.
2800
-         */
2801
-        prependListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2802
-
2803
-        /**
2804
-         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2805
-         */
2806
-        prependListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2807
-
2808
-        /**
2809
-         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2810
-         */
2811
-        prependListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2812
-
2813
-        /**
2814
-         * Fired when virtual machine fails to parse the script.
2815
-         */
2816
-        prependListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2817
-
2818
-        /**
2819
-         * Fired when breakpoint is resolved to an actual script and location.
2820
-         */
2821
-        prependListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2822
-
2823
-        /**
2824
-         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2825
-         */
2826
-        prependListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2827
-
2828
-        /**
2829
-         * Fired when the virtual machine resumed execution.
2830
-         */
2831
-        prependListener(event: "Debugger.resumed", listener: () => void): this;
2832
-
2833
-        /**
2834
-         * Issued when new console message is added.
2835
-         */
2836
-        prependListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2837
-
2838
-        /**
2839
-         * Sent when new profile recording is started using console.profile() call.
2840
-         */
2841
-        prependListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2842
-
2843
-        prependListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2844
-        prependListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2845
-        prependListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2846
-        prependListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2847
-
2848
-        /**
2849
-         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2850
-         */
2851
-        prependListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2852
-
2853
-        /**
2854
-         * If heap objects tracking has been started then backend may send update for one or more fragments
2855
-         */
2856
-        prependListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2857
-
2858
-        /**
2859
-         * Contains an bucket of collected trace events.
2860
-         */
2861
-        prependListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2862
-
2863
-        /**
2864
-         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2865
-         * delivered via dataCollected events.
2866
-         */
2867
-        prependListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2868
-
2869
-        /**
2870
-         * Issued when attached to a worker.
2871
-         */
2872
-        prependListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
2873
-
2874
-        /**
2875
-         * Issued when detached from the worker.
2876
-         */
2877
-        prependListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
2878
-
2879
-        /**
2880
-         * Notifies about a new protocol message received from the session
2881
-         * (session ID is provided in attachedToWorker notification).
2882
-         */
2883
-        prependListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
2884
-
2885
-        /**
2886
-         * This event is fired instead of `Runtime.executionContextDestroyed` when
2887
-         * enabled.
2888
-         * It is fired when the Node process finished all code execution and is
2889
-         * waiting for all frontends to disconnect.
2890
-         */
2891
-        prependListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
2892
-
2893
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
2894
-
2895
-        /**
2896
-         * Emitted when any notification from the V8 Inspector is received.
2897
-         */
2898
-        prependOnceListener(event: "inspectorNotification", listener: (message: InspectorNotification<{}>) => void): this;
2899
-
2900
-        /**
2901
-         * Issued when new execution context is created.
2902
-         */
2903
-        prependOnceListener(event: "Runtime.executionContextCreated", listener: (message: InspectorNotification<Runtime.ExecutionContextCreatedEventDataType>) => void): this;
2904
-
2905
-        /**
2906
-         * Issued when execution context is destroyed.
2907
-         */
2908
-        prependOnceListener(event: "Runtime.executionContextDestroyed", listener: (message: InspectorNotification<Runtime.ExecutionContextDestroyedEventDataType>) => void): this;
2909
-
2910
-        /**
2911
-         * Issued when all executionContexts were cleared in browser
2912
-         */
2913
-        prependOnceListener(event: "Runtime.executionContextsCleared", listener: () => void): this;
2914
-
2915
-        /**
2916
-         * Issued when exception was thrown and unhandled.
2917
-         */
2918
-        prependOnceListener(event: "Runtime.exceptionThrown", listener: (message: InspectorNotification<Runtime.ExceptionThrownEventDataType>) => void): this;
2919
-
2920
-        /**
2921
-         * Issued when unhandled exception was revoked.
2922
-         */
2923
-        prependOnceListener(event: "Runtime.exceptionRevoked", listener: (message: InspectorNotification<Runtime.ExceptionRevokedEventDataType>) => void): this;
2924
-
2925
-        /**
2926
-         * Issued when console API was called.
2927
-         */
2928
-        prependOnceListener(event: "Runtime.consoleAPICalled", listener: (message: InspectorNotification<Runtime.ConsoleAPICalledEventDataType>) => void): this;
2929
-
2930
-        /**
2931
-         * Issued when object should be inspected (for example, as a result of inspect() command line API call).
2932
-         */
2933
-        prependOnceListener(event: "Runtime.inspectRequested", listener: (message: InspectorNotification<Runtime.InspectRequestedEventDataType>) => void): this;
2934
-
2935
-        /**
2936
-         * Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.
2937
-         */
2938
-        prependOnceListener(event: "Debugger.scriptParsed", listener: (message: InspectorNotification<Debugger.ScriptParsedEventDataType>) => void): this;
2939
-
2940
-        /**
2941
-         * Fired when virtual machine fails to parse the script.
2942
-         */
2943
-        prependOnceListener(event: "Debugger.scriptFailedToParse", listener: (message: InspectorNotification<Debugger.ScriptFailedToParseEventDataType>) => void): this;
2944
-
2945
-        /**
2946
-         * Fired when breakpoint is resolved to an actual script and location.
2947
-         */
2948
-        prependOnceListener(event: "Debugger.breakpointResolved", listener: (message: InspectorNotification<Debugger.BreakpointResolvedEventDataType>) => void): this;
2949
-
2950
-        /**
2951
-         * Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.
2952
-         */
2953
-        prependOnceListener(event: "Debugger.paused", listener: (message: InspectorNotification<Debugger.PausedEventDataType>) => void): this;
2954
-
2955
-        /**
2956
-         * Fired when the virtual machine resumed execution.
2957
-         */
2958
-        prependOnceListener(event: "Debugger.resumed", listener: () => void): this;
2959
-
2960
-        /**
2961
-         * Issued when new console message is added.
2962
-         */
2963
-        prependOnceListener(event: "Console.messageAdded", listener: (message: InspectorNotification<Console.MessageAddedEventDataType>) => void): this;
2964
-
2965
-        /**
2966
-         * Sent when new profile recording is started using console.profile() call.
2967
-         */
2968
-        prependOnceListener(event: "Profiler.consoleProfileStarted", listener: (message: InspectorNotification<Profiler.ConsoleProfileStartedEventDataType>) => void): this;
2969
-
2970
-        prependOnceListener(event: "Profiler.consoleProfileFinished", listener: (message: InspectorNotification<Profiler.ConsoleProfileFinishedEventDataType>) => void): this;
2971
-        prependOnceListener(event: "HeapProfiler.addHeapSnapshotChunk", listener: (message: InspectorNotification<HeapProfiler.AddHeapSnapshotChunkEventDataType>) => void): this;
2972
-        prependOnceListener(event: "HeapProfiler.resetProfiles", listener: () => void): this;
2973
-        prependOnceListener(event: "HeapProfiler.reportHeapSnapshotProgress", listener: (message: InspectorNotification<HeapProfiler.ReportHeapSnapshotProgressEventDataType>) => void): this;
2974
-
2975
-        /**
2976
-         * If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.
2977
-         */
2978
-        prependOnceListener(event: "HeapProfiler.lastSeenObjectId", listener: (message: InspectorNotification<HeapProfiler.LastSeenObjectIdEventDataType>) => void): this;
2979
-
2980
-        /**
2981
-         * If heap objects tracking has been started then backend may send update for one or more fragments
2982
-         */
2983
-        prependOnceListener(event: "HeapProfiler.heapStatsUpdate", listener: (message: InspectorNotification<HeapProfiler.HeapStatsUpdateEventDataType>) => void): this;
2984
-
2985
-        /**
2986
-         * Contains an bucket of collected trace events.
2987
-         */
2988
-        prependOnceListener(event: "NodeTracing.dataCollected", listener: (message: InspectorNotification<NodeTracing.DataCollectedEventDataType>) => void): this;
2989
-
2990
-        /**
2991
-         * Signals that tracing is stopped and there is no trace buffers pending flush, all data were
2992
-         * delivered via dataCollected events.
2993
-         */
2994
-        prependOnceListener(event: "NodeTracing.tracingComplete", listener: () => void): this;
2995
-
2996
-        /**
2997
-         * Issued when attached to a worker.
2998
-         */
2999
-        prependOnceListener(event: "NodeWorker.attachedToWorker", listener: (message: InspectorNotification<NodeWorker.AttachedToWorkerEventDataType>) => void): this;
3000
-
3001
-        /**
3002
-         * Issued when detached from the worker.
3003
-         */
3004
-        prependOnceListener(event: "NodeWorker.detachedFromWorker", listener: (message: InspectorNotification<NodeWorker.DetachedFromWorkerEventDataType>) => void): this;
3005
-
3006
-        /**
3007
-         * Notifies about a new protocol message received from the session
3008
-         * (session ID is provided in attachedToWorker notification).
3009
-         */
3010
-        prependOnceListener(event: "NodeWorker.receivedMessageFromWorker", listener: (message: InspectorNotification<NodeWorker.ReceivedMessageFromWorkerEventDataType>) => void): this;
3011
-
3012
-        /**
3013
-         * This event is fired instead of `Runtime.executionContextDestroyed` when
3014
-         * enabled.
3015
-         * It is fired when the Node process finished all code execution and is
3016
-         * waiting for all frontends to disconnect.
3017
-         */
3018
-        prependOnceListener(event: "NodeRuntime.waitingForDisconnect", listener: () => void): this;
3019
-    }
3020
-
3021
-    // Top Level API
3022
-
3023
-    /**
3024
-     * Activate inspector on host and port. Equivalent to node --inspect=[[host:]port], but can be done programatically after node has started.
3025
-     * If wait is true, will block until a client has connected to the inspect port and flow control has been passed to the debugger client.
3026
-     * @param port Port to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
3027
-     * @param host Host to listen on for inspector connections. Optional, defaults to what was specified on the CLI.
3028
-     * @param wait Block until a client has connected. Optional, defaults to false.
3029
-     */
3030
-    function open(port?: number, host?: string, wait?: boolean): void;
3031
-
3032
-    /**
3033
-     * Deactivate the inspector. Blocks until there are no active connections.
3034
-     */
3035
-    function close(): void;
3036
-
3037
-    /**
3038
-     * Return the URL of the active inspector, or `undefined` if there is none.
3039
-     */
3040
-    function url(): string | undefined;
3041
-
3042
-    /**
3043
-     * Blocks until a client (existing or connected later) has sent
3044
-     * `Runtime.runIfWaitingForDebugger` command.
3045
-     * An exception will be thrown if there is no active inspector.
3046
-     */
3047
-    function waitForDebugger(): void;
3048
-}
... ...
@@ -1,57 +0,0 @@
1
-declare module 'node:module' {
2
-    import Module = require('module');
3
-    export = Module;
4
-}
5
-
6
-declare module 'module' {
7
-    import { URL } from 'node:url';
8
-    namespace Module {
9
-        /**
10
-         * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
11
-         * It does not add or remove exported names from the ES Modules.
12
-         */
13
-        function syncBuiltinESMExports(): void;
14
-
15
-        function findSourceMap(path: string, error?: Error): SourceMap;
16
-        interface SourceMapPayload {
17
-            file: string;
18
-            version: number;
19
-            sources: string[];
20
-            sourcesContent: string[];
21
-            names: string[];
22
-            mappings: string;
23
-            sourceRoot: string;
24
-        }
25
-
26
-        interface SourceMapping {
27
-            generatedLine: number;
28
-            generatedColumn: number;
29
-            originalSource: string;
30
-            originalLine: number;
31
-            originalColumn: number;
32
-        }
33
-
34
-        class SourceMap {
35
-            readonly payload: SourceMapPayload;
36
-            constructor(payload: SourceMapPayload);
37
-            findEntry(line: number, column: number): SourceMapping;
38
-        }
39
-    }
40
-    interface Module extends NodeModule {}
41
-    class Module {
42
-        static runMain(): void;
43
-        static wrap(code: string): string;
44
-
45
-        /**
46
-         * @deprecated Deprecated since: v12.2.0. Please use createRequire() instead.
47
-         */
48
-        static createRequireFromPath(path: string): NodeRequire;
49
-        static createRequire(path: string | URL): NodeRequire;
50
-        static builtinModules: string[];
51
-
52
-        static Module: typeof Module;
53
-
54
-        constructor(id: string, parent?: Module);
55
-    }
56
-    export = Module;
57
-}
... ...
@@ -1,289 +0,0 @@
1
-declare module 'node:net' {
2
-    export * from 'net';
3
-}
4
-
5
-declare module 'net' {
6
-    import * as stream from 'node:stream';
7
-    import EventEmitter = require('node:events');
8
-    import * as dns from 'node:dns';
9
-
10
-    type LookupFunction = (
11
-        hostname: string,
12
-        options: dns.LookupOneOptions,
13
-        callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
14
-    ) => void;
15
-
16
-    interface AddressInfo {
17
-        address: string;
18
-        family: string;
19
-        port: number;
20
-    }
21
-
22
-    interface SocketConstructorOpts {
23
-        fd?: number;
24
-        allowHalfOpen?: boolean;
25
-        readable?: boolean;
26
-        writable?: boolean;
27
-    }
28
-
29
-    interface OnReadOpts {
30
-        buffer: Uint8Array | (() => Uint8Array);
31
-        /**
32
-         * This function is called for every chunk of incoming data.
33
-         * Two arguments are passed to it: the number of bytes written to buffer and a reference to buffer.
34
-         * Return false from this function to implicitly pause() the socket.
35
-         */
36
-        callback(bytesWritten: number, buf: Uint8Array): boolean;
37
-    }
38
-
39
-    interface ConnectOpts {
40
-        /**
41
-         * If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket.
42
-         * Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
43
-         * still be emitted as normal and methods like pause() and resume() will also behave as expected.
44
-         */
45
-        onread?: OnReadOpts;
46
-    }
47
-
48
-    interface TcpSocketConnectOpts extends ConnectOpts {
49
-        port: number;
50
-        host?: string;
51
-        localAddress?: string;
52
-        localPort?: number;
53
-        hints?: number;
54
-        family?: number;
55
-        lookup?: LookupFunction;
56
-    }
57
-
58
-    interface IpcSocketConnectOpts extends ConnectOpts {
59
-        path: string;
60
-    }
61
-
62
-    type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
63
-
64
-    class Socket extends stream.Duplex {
65
-        constructor(options?: SocketConstructorOpts);
66
-
67
-        // Extended base methods
68
-        write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
69
-        write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
70
-
71
-        connect(options: SocketConnectOpts, connectionListener?: () => void): this;
72
-        connect(port: number, host: string, connectionListener?: () => void): this;
73
-        connect(port: number, connectionListener?: () => void): this;
74
-        connect(path: string, connectionListener?: () => void): this;
75
-
76
-        setEncoding(encoding?: BufferEncoding): this;
77
-        pause(): this;
78
-        resume(): this;
79
-        setTimeout(timeout: number, callback?: () => void): this;
80
-        setNoDelay(noDelay?: boolean): this;
81
-        setKeepAlive(enable?: boolean, initialDelay?: number): this;
82
-        address(): AddressInfo | {};
83
-        unref(): this;
84
-        ref(): this;
85
-
86
-        /** @deprecated since v14.6.0 - Use `writableLength` instead. */
87
-        readonly bufferSize: number;
88
-        readonly bytesRead: number;
89
-        readonly bytesWritten: number;
90
-        readonly connecting: boolean;
91
-        readonly destroyed: boolean;
92
-        readonly localAddress: string;
93
-        readonly localPort: number;
94
-        readonly remoteAddress?: string;
95
-        readonly remoteFamily?: string;
96
-        readonly remotePort?: number;
97
-
98
-        // Extended base methods
99
-        end(cb?: () => void): void;
100
-        end(buffer: Uint8Array | string, cb?: () => void): void;
101
-        end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): void;
102
-
103
-        /**
104
-         * events.EventEmitter
105
-         *   1. close
106
-         *   2. connect
107
-         *   3. data
108
-         *   4. drain
109
-         *   5. end
110
-         *   6. error
111
-         *   7. lookup
112
-         *   8. timeout
113
-         */
114
-        addListener(event: string, listener: (...args: any[]) => void): this;
115
-        addListener(event: "close", listener: (had_error: boolean) => void): this;
116
-        addListener(event: "connect", listener: () => void): this;
117
-        addListener(event: "data", listener: (data: Buffer) => void): this;
118
-        addListener(event: "drain", listener: () => void): this;
119
-        addListener(event: "end", listener: () => void): this;
120
-        addListener(event: "error", listener: (err: Error) => void): this;
121
-        addListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
122
-        addListener(event: "timeout", listener: () => void): this;
123
-
124
-        emit(event: string | symbol, ...args: any[]): boolean;
125
-        emit(event: "close", had_error: boolean): boolean;
126
-        emit(event: "connect"): boolean;
127
-        emit(event: "data", data: Buffer): boolean;
128
-        emit(event: "drain"): boolean;
129
-        emit(event: "end"): boolean;
130
-        emit(event: "error", err: Error): boolean;
131
-        emit(event: "lookup", err: Error, address: string, family: string | number, host: string): boolean;
132
-        emit(event: "timeout"): boolean;
133
-
134
-        on(event: string, listener: (...args: any[]) => void): this;
135
-        on(event: "close", listener: (had_error: boolean) => void): this;
136
-        on(event: "connect", listener: () => void): this;
137
-        on(event: "data", listener: (data: Buffer) => void): this;
138
-        on(event: "drain", listener: () => void): this;
139
-        on(event: "end", listener: () => void): this;
140
-        on(event: "error", listener: (err: Error) => void): this;
141
-        on(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
142
-        on(event: "timeout", listener: () => void): this;
143
-
144
-        once(event: string, listener: (...args: any[]) => void): this;
145
-        once(event: "close", listener: (had_error: boolean) => void): this;
146
-        once(event: "connect", listener: () => void): this;
147
-        once(event: "data", listener: (data: Buffer) => void): this;
148
-        once(event: "drain", listener: () => void): this;
149
-        once(event: "end", listener: () => void): this;
150
-        once(event: "error", listener: (err: Error) => void): this;
151
-        once(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
152
-        once(event: "timeout", listener: () => void): this;
153
-
154
-        prependListener(event: string, listener: (...args: any[]) => void): this;
155
-        prependListener(event: "close", listener: (had_error: boolean) => void): this;
156
-        prependListener(event: "connect", listener: () => void): this;
157
-        prependListener(event: "data", listener: (data: Buffer) => void): this;
158
-        prependListener(event: "drain", listener: () => void): this;
159
-        prependListener(event: "end", listener: () => void): this;
160
-        prependListener(event: "error", listener: (err: Error) => void): this;
161
-        prependListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
162
-        prependListener(event: "timeout", listener: () => void): this;
163
-
164
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
165
-        prependOnceListener(event: "close", listener: (had_error: boolean) => void): this;
166
-        prependOnceListener(event: "connect", listener: () => void): this;
167
-        prependOnceListener(event: "data", listener: (data: Buffer) => void): this;
168
-        prependOnceListener(event: "drain", listener: () => void): this;
169
-        prependOnceListener(event: "end", listener: () => void): this;
170
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
171
-        prependOnceListener(event: "lookup", listener: (err: Error, address: string, family: string | number, host: string) => void): this;
172
-        prependOnceListener(event: "timeout", listener: () => void): this;
173
-    }
174
-
175
-    interface ListenOptions {
176
-        port?: number;
177
-        host?: string;
178
-        backlog?: number;
179
-        path?: string;
180
-        exclusive?: boolean;
181
-        readableAll?: boolean;
182
-        writableAll?: boolean;
183
-        /**
184
-         * @default false
185
-         */
186
-        ipv6Only?: boolean;
187
-    }
188
-
189
-    interface ServerOpts {
190
-        /**
191
-         * Indicates whether half-opened TCP connections are allowed. __Default:__ `false`.
192
-         */
193
-        allowHalfOpen?: boolean;
194
-
195
-        /**
196
-         * Indicates whether the socket should be paused on incoming connections. __Default:__ `false`.
197
-         */
198
-        pauseOnConnect?: boolean;
199
-    }
200
-
201
-    // https://github.com/nodejs/node/blob/master/lib/net.js
202
-    class Server extends EventEmitter {
203
-        constructor(connectionListener?: (socket: Socket) => void);
204
-        constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
205
-
206
-        listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
207
-        listen(port?: number, hostname?: string, listeningListener?: () => void): this;
208
-        listen(port?: number, backlog?: number, listeningListener?: () => void): this;
209
-        listen(port?: number, listeningListener?: () => void): this;
210
-        listen(path: string, backlog?: number, listeningListener?: () => void): this;
211
-        listen(path: string, listeningListener?: () => void): this;
212
-        listen(options: ListenOptions, listeningListener?: () => void): this;
213
-        listen(handle: any, backlog?: number, listeningListener?: () => void): this;
214
-        listen(handle: any, listeningListener?: () => void): this;
215
-        close(callback?: (err?: Error) => void): this;
216
-        address(): AddressInfo | string | null;
217
-        getConnections(cb: (error: Error | null, count: number) => void): void;
218
-        ref(): this;
219
-        unref(): this;
220
-        maxConnections: number;
221
-        connections: number;
222
-        listening: boolean;
223
-
224
-        /**
225
-         * events.EventEmitter
226
-         *   1. close
227
-         *   2. connection
228
-         *   3. error
229
-         *   4. listening
230
-         */
231
-        addListener(event: string, listener: (...args: any[]) => void): this;
232
-        addListener(event: "close", listener: () => void): this;
233
-        addListener(event: "connection", listener: (socket: Socket) => void): this;
234
-        addListener(event: "error", listener: (err: Error) => void): this;
235
-        addListener(event: "listening", listener: () => void): this;
236
-
237
-        emit(event: string | symbol, ...args: any[]): boolean;
238
-        emit(event: "close"): boolean;
239
-        emit(event: "connection", socket: Socket): boolean;
240
-        emit(event: "error", err: Error): boolean;
241
-        emit(event: "listening"): boolean;
242
-
243
-        on(event: string, listener: (...args: any[]) => void): this;
244
-        on(event: "close", listener: () => void): this;
245
-        on(event: "connection", listener: (socket: Socket) => void): this;
246
-        on(event: "error", listener: (err: Error) => void): this;
247
-        on(event: "listening", listener: () => void): this;
248
-
249
-        once(event: string, listener: (...args: any[]) => void): this;
250
-        once(event: "close", listener: () => void): this;
251
-        once(event: "connection", listener: (socket: Socket) => void): this;
252
-        once(event: "error", listener: (err: Error) => void): this;
253
-        once(event: "listening", listener: () => void): this;
254
-
255
-        prependListener(event: string, listener: (...args: any[]) => void): this;
256
-        prependListener(event: "close", listener: () => void): this;
257
-        prependListener(event: "connection", listener: (socket: Socket) => void): this;
258
-        prependListener(event: "error", listener: (err: Error) => void): this;
259
-        prependListener(event: "listening", listener: () => void): this;
260
-
261
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
262
-        prependOnceListener(event: "close", listener: () => void): this;
263
-        prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
264
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
265
-        prependOnceListener(event: "listening", listener: () => void): this;
266
-    }
267
-
268
-    interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
269
-        timeout?: number;
270
-    }
271
-
272
-    interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
273
-        timeout?: number;
274
-    }
275
-
276
-    type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
277
-
278
-    function createServer(connectionListener?: (socket: Socket) => void): Server;
279
-    function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
280
-    function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
281
-    function connect(port: number, host?: string, connectionListener?: () => void): Socket;
282
-    function connect(path: string, connectionListener?: () => void): Socket;
283
-    function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
284
-    function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
285
-    function createConnection(path: string, connectionListener?: () => void): Socket;
286
-    function isIP(input: string): number;
287
-    function isIPv4(input: string): boolean;
288
-    function isIPv6(input: string): boolean;
289
-}
... ...
@@ -1,243 +0,0 @@
1
-declare module 'node:os' {
2
-    export * from 'os';
3
-}
4
-
5
-declare module 'os' {
6
-    interface CpuInfo {
7
-        model: string;
8
-        speed: number;
9
-        times: {
10
-            user: number;
11
-            nice: number;
12
-            sys: number;
13
-            idle: number;
14
-            irq: number;
15
-        };
16
-    }
17
-
18
-    interface NetworkInterfaceBase {
19
-        address: string;
20
-        netmask: string;
21
-        mac: string;
22
-        internal: boolean;
23
-        cidr: string | null;
24
-    }
25
-
26
-    interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
27
-        family: "IPv4";
28
-    }
29
-
30
-    interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
31
-        family: "IPv6";
32
-        scopeid: number;
33
-    }
34
-
35
-    interface UserInfo<T> {
36
-        username: T;
37
-        uid: number;
38
-        gid: number;
39
-        shell: T;
40
-        homedir: T;
41
-    }
42
-
43
-    type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
44
-
45
-    function hostname(): string;
46
-    function loadavg(): number[];
47
-    function uptime(): number;
48
-    function freemem(): number;
49
-    function totalmem(): number;
50
-    function cpus(): CpuInfo[];
51
-    function type(): string;
52
-    function release(): string;
53
-    function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
54
-    function homedir(): string;
55
-    function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
56
-    function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
57
-
58
-    type SignalConstants = {
59
-        [key in NodeJS.Signals]: number;
60
-    };
61
-
62
-    namespace constants {
63
-        const UV_UDP_REUSEADDR: number;
64
-        namespace signals {}
65
-        const signals: SignalConstants;
66
-        namespace errno {
67
-            const E2BIG: number;
68
-            const EACCES: number;
69
-            const EADDRINUSE: number;
70
-            const EADDRNOTAVAIL: number;
71
-            const EAFNOSUPPORT: number;
72
-            const EAGAIN: number;
73
-            const EALREADY: number;
74
-            const EBADF: number;
75
-            const EBADMSG: number;
76
-            const EBUSY: number;
77
-            const ECANCELED: number;
78
-            const ECHILD: number;
79
-            const ECONNABORTED: number;
80
-            const ECONNREFUSED: number;
81
-            const ECONNRESET: number;
82
-            const EDEADLK: number;
83
-            const EDESTADDRREQ: number;
84
-            const EDOM: number;
85
-            const EDQUOT: number;
86
-            const EEXIST: number;
87
-            const EFAULT: number;
88
-            const EFBIG: number;
89
-            const EHOSTUNREACH: number;
90
-            const EIDRM: number;
91
-            const EILSEQ: number;
92
-            const EINPROGRESS: number;
93
-            const EINTR: number;
94
-            const EINVAL: number;
95
-            const EIO: number;
96
-            const EISCONN: number;
97
-            const EISDIR: number;
98
-            const ELOOP: number;
99
-            const EMFILE: number;
100
-            const EMLINK: number;
101
-            const EMSGSIZE: number;
102
-            const EMULTIHOP: number;
103
-            const ENAMETOOLONG: number;
104
-            const ENETDOWN: number;
105
-            const ENETRESET: number;
106
-            const ENETUNREACH: number;
107
-            const ENFILE: number;
108
-            const ENOBUFS: number;
109
-            const ENODATA: number;
110
-            const ENODEV: number;
111
-            const ENOENT: number;
112
-            const ENOEXEC: number;
113
-            const ENOLCK: number;
114
-            const ENOLINK: number;
115
-            const ENOMEM: number;
116
-            const ENOMSG: number;
117
-            const ENOPROTOOPT: number;
118
-            const ENOSPC: number;
119
-            const ENOSR: number;
120
-            const ENOSTR: number;
121
-            const ENOSYS: number;
122
-            const ENOTCONN: number;
123
-            const ENOTDIR: number;
124
-            const ENOTEMPTY: number;
125
-            const ENOTSOCK: number;
126
-            const ENOTSUP: number;
127
-            const ENOTTY: number;
128
-            const ENXIO: number;
129
-            const EOPNOTSUPP: number;
130
-            const EOVERFLOW: number;
131
-            const EPERM: number;
132
-            const EPIPE: number;
133
-            const EPROTO: number;
134
-            const EPROTONOSUPPORT: number;
135
-            const EPROTOTYPE: number;
136
-            const ERANGE: number;
137
-            const EROFS: number;
138
-            const ESPIPE: number;
139
-            const ESRCH: number;
140
-            const ESTALE: number;
141
-            const ETIME: number;
142
-            const ETIMEDOUT: number;
143
-            const ETXTBSY: number;
144
-            const EWOULDBLOCK: number;
145
-            const EXDEV: number;
146
-            const WSAEINTR: number;
147
-            const WSAEBADF: number;
148
-            const WSAEACCES: number;
149
-            const WSAEFAULT: number;
150
-            const WSAEINVAL: number;
151
-            const WSAEMFILE: number;
152
-            const WSAEWOULDBLOCK: number;
153
-            const WSAEINPROGRESS: number;
154
-            const WSAEALREADY: number;
155
-            const WSAENOTSOCK: number;
156
-            const WSAEDESTADDRREQ: number;
157
-            const WSAEMSGSIZE: number;
158
-            const WSAEPROTOTYPE: number;
159
-            const WSAENOPROTOOPT: number;
160
-            const WSAEPROTONOSUPPORT: number;
161
-            const WSAESOCKTNOSUPPORT: number;
162
-            const WSAEOPNOTSUPP: number;
163
-            const WSAEPFNOSUPPORT: number;
164
-            const WSAEAFNOSUPPORT: number;
165
-            const WSAEADDRINUSE: number;
166
-            const WSAEADDRNOTAVAIL: number;
167
-            const WSAENETDOWN: number;
168
-            const WSAENETUNREACH: number;
169
-            const WSAENETRESET: number;
170
-            const WSAECONNABORTED: number;
171
-            const WSAECONNRESET: number;
172
-            const WSAENOBUFS: number;
173
-            const WSAEISCONN: number;
174
-            const WSAENOTCONN: number;
175
-            const WSAESHUTDOWN: number;
176
-            const WSAETOOMANYREFS: number;
177
-            const WSAETIMEDOUT: number;
178
-            const WSAECONNREFUSED: number;
179
-            const WSAELOOP: number;
180
-            const WSAENAMETOOLONG: number;
181
-            const WSAEHOSTDOWN: number;
182
-            const WSAEHOSTUNREACH: number;
183
-            const WSAENOTEMPTY: number;
184
-            const WSAEPROCLIM: number;
185
-            const WSAEUSERS: number;
186
-            const WSAEDQUOT: number;
187
-            const WSAESTALE: number;
188
-            const WSAEREMOTE: number;
189
-            const WSASYSNOTREADY: number;
190
-            const WSAVERNOTSUPPORTED: number;
191
-            const WSANOTINITIALISED: number;
192
-            const WSAEDISCON: number;
193
-            const WSAENOMORE: number;
194
-            const WSAECANCELLED: number;
195
-            const WSAEINVALIDPROCTABLE: number;
196
-            const WSAEINVALIDPROVIDER: number;
197
-            const WSAEPROVIDERFAILEDINIT: number;
198
-            const WSASYSCALLFAILURE: number;
199
-            const WSASERVICE_NOT_FOUND: number;
200
-            const WSATYPE_NOT_FOUND: number;
201
-            const WSA_E_NO_MORE: number;
202
-            const WSA_E_CANCELLED: number;
203
-            const WSAEREFUSED: number;
204
-        }
205
-        namespace priority {
206
-            const PRIORITY_LOW: number;
207
-            const PRIORITY_BELOW_NORMAL: number;
208
-            const PRIORITY_NORMAL: number;
209
-            const PRIORITY_ABOVE_NORMAL: number;
210
-            const PRIORITY_HIGH: number;
211
-            const PRIORITY_HIGHEST: number;
212
-        }
213
-    }
214
-
215
-    function arch(): string;
216
-    /**
217
-     * Returns a string identifying the kernel version.
218
-     * On POSIX systems, the operating system release is determined by calling
219
-     * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
220
-     * `GetVersionExW()` will be used. See
221
-     * https://en.wikipedia.org/wiki/Uname#Examples for more information.
222
-     */
223
-    function version(): string;
224
-    function platform(): NodeJS.Platform;
225
-    function tmpdir(): string;
226
-    const EOL: string;
227
-    function endianness(): "BE" | "LE";
228
-    /**
229
-     * Gets the priority of a process.
230
-     * Defaults to current process.
231
-     */
232
-    function getPriority(pid?: number): number;
233
-    /**
234
-     * Sets the priority of the current process.
235
-     * @param priority Must be in range of -20 to 19
236
-     */
237
-    function setPriority(priority: number): void;
238
-    /**
239
-     * Sets the priority of the process specified process.
240
-     * @param priority Must be in range of -20 to 19
241
-     */
242
-    function setPriority(pid: number, priority: number): void;
243
-}
... ...
@@ -1,241 +0,0 @@
1
-{
2
-    "name": "@types/node",
3
-    "version": "14.14.31",
4
-    "description": "TypeScript definitions for Node.js",
5
-    "license": "MIT",
6
-    "contributors": [
7
-        {
8
-            "name": "Microsoft TypeScript",
9
-            "url": "https://github.com/Microsoft",
10
-            "githubUsername": "Microsoft"
11
-        },
12
-        {
13
-            "name": "DefinitelyTyped",
14
-            "url": "https://github.com/DefinitelyTyped",
15
-            "githubUsername": "DefinitelyTyped"
16
-        },
17
-        {
18
-            "name": "Alberto Schiabel",
19
-            "url": "https://github.com/jkomyno",
20
-            "githubUsername": "jkomyno"
21
-        },
22
-        {
23
-            "name": "Alvis HT Tang",
24
-            "url": "https://github.com/alvis",
25
-            "githubUsername": "alvis"
26
-        },
27
-        {
28
-            "name": "Andrew Makarov",
29
-            "url": "https://github.com/r3nya",
30
-            "githubUsername": "r3nya"
31
-        },
32
-        {
33
-            "name": "Benjamin Toueg",
34
-            "url": "https://github.com/btoueg",
35
-            "githubUsername": "btoueg"
36
-        },
37
-        {
38
-            "name": "Bruno Scheufler",
39
-            "url": "https://github.com/brunoscheufler",
40
-            "githubUsername": "brunoscheufler"
41
-        },
42
-        {
43
-            "name": "Chigozirim C.",
44
-            "url": "https://github.com/smac89",
45
-            "githubUsername": "smac89"
46
-        },
47
-        {
48
-            "name": "David Junger",
49
-            "url": "https://github.com/touffy",
50
-            "githubUsername": "touffy"
51
-        },
52
-        {
53
-            "name": "Deividas Bakanas",
54
-            "url": "https://github.com/DeividasBakanas",
55
-            "githubUsername": "DeividasBakanas"
56
-        },
57
-        {
58
-            "name": "Eugene Y. Q. Shen",
59
-            "url": "https://github.com/eyqs",
60
-            "githubUsername": "eyqs"
61
-        },
62
-        {
63
-            "name": "Hannes Magnusson",
64
-            "url": "https://github.com/Hannes-Magnusson-CK",
65
-            "githubUsername": "Hannes-Magnusson-CK"
66
-        },
67
-        {
68
-            "name": "Hoàng Văn Khải",
69
-            "url": "https://github.com/KSXGitHub",
70
-            "githubUsername": "KSXGitHub"
71
-        },
72
-        {
73
-            "name": "Huw",
74
-            "url": "https://github.com/hoo29",
75
-            "githubUsername": "hoo29"
76
-        },
77
-        {
78
-            "name": "Kelvin Jin",
79
-            "url": "https://github.com/kjin",
80
-            "githubUsername": "kjin"
81
-        },
82
-        {
83
-            "name": "Klaus Meinhardt",
84
-            "url": "https://github.com/ajafff",
85
-            "githubUsername": "ajafff"
86
-        },
87
-        {
88
-            "name": "Lishude",
89
-            "url": "https://github.com/islishude",
90
-            "githubUsername": "islishude"
91
-        },
92
-        {
93
-            "name": "Mariusz Wiktorczyk",
94
-            "url": "https://github.com/mwiktorczyk",
95
-            "githubUsername": "mwiktorczyk"
96
-        },
97
-        {
98
-            "name": "Mohsen Azimi",
99
-            "url": "https://github.com/mohsen1",
100
-            "githubUsername": "mohsen1"
101
-        },
102
-        {
103
-            "name": "Nicolas Even",
104
-            "url": "https://github.com/n-e",
105
-            "githubUsername": "n-e"
106
-        },
107
-        {
108
-            "name": "Nikita Galkin",
109
-            "url": "https://github.com/galkin",
110
-            "githubUsername": "galkin"
111
-        },
112
-        {
113
-            "name": "Parambir Singh",
114
-            "url": "https://github.com/parambirs",
115
-            "githubUsername": "parambirs"
116
-        },
117
-        {
118
-            "name": "Sebastian Silbermann",
119
-            "url": "https://github.com/eps1lon",
120
-            "githubUsername": "eps1lon"
121
-        },
122
-        {
123
-            "name": "Simon Schick",
124
-            "url": "https://github.com/SimonSchick",
125
-            "githubUsername": "SimonSchick"
126
-        },
127
-        {
128
-            "name": "Thomas den Hollander",
129
-            "url": "https://github.com/ThomasdenH",
130
-            "githubUsername": "ThomasdenH"
131
-        },
132
-        {
133
-            "name": "Wilco Bakker",
134
-            "url": "https://github.com/WilcoBakker",
135
-            "githubUsername": "WilcoBakker"
136
-        },
137
-        {
138
-            "name": "wwwy3y3",
139
-            "url": "https://github.com/wwwy3y3",
140
-            "githubUsername": "wwwy3y3"
141
-        },
142
-        {
143
-            "name": "Samuel Ainsworth",
144
-            "url": "https://github.com/samuela",
145
-            "githubUsername": "samuela"
146
-        },
147
-        {
148
-            "name": "Kyle Uehlein",
149
-            "url": "https://github.com/kuehlein",
150
-            "githubUsername": "kuehlein"
151
-        },
152
-        {
153
-            "name": "Thanik Bhongbhibhat",
154
-            "url": "https://github.com/bhongy",
155
-            "githubUsername": "bhongy"
156
-        },
157
-        {
158
-            "name": "Marcin Kopacz",
159
-            "url": "https://github.com/chyzwar",
160
-            "githubUsername": "chyzwar"
161
-        },
162
-        {
163
-            "name": "Trivikram Kamat",
164
-            "url": "https://github.com/trivikr",
165
-            "githubUsername": "trivikr"
166
-        },
167
-        {
168
-            "name": "Minh Son Nguyen",
169
-            "url": "https://github.com/nguymin4",
170
-            "githubUsername": "nguymin4"
171
-        },
172
-        {
173
-            "name": "Junxiao Shi",
174
-            "url": "https://github.com/yoursunny",
175
-            "githubUsername": "yoursunny"
176
-        },
177
-        {
178
-            "name": "Ilia Baryshnikov",
179
-            "url": "https://github.com/qwelias",
180
-            "githubUsername": "qwelias"
181
-        },
182
-        {
183
-            "name": "ExE Boss",
184
-            "url": "https://github.com/ExE-Boss",
185
-            "githubUsername": "ExE-Boss"
186
-        },
187
-        {
188
-            "name": "Surasak Chaisurin",
189
-            "url": "https://github.com/Ryan-Willpower",
190
-            "githubUsername": "Ryan-Willpower"
191
-        },
192
-        {
193
-            "name": "Piotr Błażejewicz",
194
-            "url": "https://github.com/peterblazejewicz",
195
-            "githubUsername": "peterblazejewicz"
196
-        },
197
-        {
198
-            "name": "Anna Henningsen",
199
-            "url": "https://github.com/addaleax",
200
-            "githubUsername": "addaleax"
201
-        },
202
-        {
203
-            "name": "Jason Kwok",
204
-            "url": "https://github.com/JasonHK",
205
-            "githubUsername": "JasonHK"
206
-        },
207
-        {
208
-            "name": "Victor Perin",
209
-            "url": "https://github.com/victorperin",
210
-            "githubUsername": "victorperin"
211
-        },
212
-        {
213
-            "name": "Yongsheng Zhang",
214
-            "url": "https://github.com/ZYSzys",
215
-            "githubUsername": "ZYSzys"
216
-        }
217
-    ],
218
-    "main": "",
219
-    "types": "index.d.ts",
220
-    "typesVersions": {
221
-        "<=3.4": {
222
-            "*": [
223
-                "ts3.4/*"
224
-            ]
225
-        },
226
-        "<=3.6": {
227
-            "*": [
228
-                "ts3.6/*"
229
-            ]
230
-        }
231
-    },
232
-    "repository": {
233
-        "type": "git",
234
-        "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
235
-        "directory": "types/node"
236
-    },
237
-    "scripts": {},
238
-    "dependencies": {},
239
-    "typesPublisherContentHash": "e35e9f1e1be2150998638a2f9485b5e421a39bcfa3f02c37f4c39c69eeffef7b",
240
-    "typeScriptVersion": "3.4"
241
-}
242 0
\ No newline at end of file
... ...
@@ -1,158 +0,0 @@
1
-declare module 'node:path' {
2
-    import path = require('path');
3
-    export = path;
4
-}
5
-
6
-declare module 'path' {
7
-    namespace path {
8
-        /**
9
-         * A parsed path object generated by path.parse() or consumed by path.format().
10
-         */
11
-        interface ParsedPath {
12
-            /**
13
-             * The root of the path such as '/' or 'c:\'
14
-             */
15
-            root: string;
16
-            /**
17
-             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
18
-             */
19
-            dir: string;
20
-            /**
21
-             * The file name including extension (if any) such as 'index.html'
22
-             */
23
-            base: string;
24
-            /**
25
-             * The file extension (if any) such as '.html'
26
-             */
27
-            ext: string;
28
-            /**
29
-             * The file name without extension (if any) such as 'index'
30
-             */
31
-            name: string;
32
-        }
33
-
34
-        interface FormatInputPathObject {
35
-            /**
36
-             * The root of the path such as '/' or 'c:\'
37
-             */
38
-            root?: string;
39
-            /**
40
-             * The full directory path such as '/home/user/dir' or 'c:\path\dir'
41
-             */
42
-            dir?: string;
43
-            /**
44
-             * The file name including extension (if any) such as 'index.html'
45
-             */
46
-            base?: string;
47
-            /**
48
-             * The file extension (if any) such as '.html'
49
-             */
50
-            ext?: string;
51
-            /**
52
-             * The file name without extension (if any) such as 'index'
53
-             */
54
-            name?: string;
55
-        }
56
-
57
-        interface PlatformPath {
58
-            /**
59
-             * Normalize a string path, reducing '..' and '.' parts.
60
-             * When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.
61
-             *
62
-             * @param p string path to normalize.
63
-             */
64
-            normalize(p: string): string;
65
-            /**
66
-             * Join all arguments together and normalize the resulting path.
67
-             * Arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.
68
-             *
69
-             * @param paths paths to join.
70
-             */
71
-            join(...paths: string[]): string;
72
-            /**
73
-             * The right-most parameter is considered {to}.  Other parameters are considered an array of {from}.
74
-             *
75
-             * Starting from leftmost {from} parameter, resolves {to} to an absolute path.
76
-             *
77
-             * If {to} isn't already absolute, {from} arguments are prepended in right to left order,
78
-             * until an absolute path is found. If after using all {from} paths still no absolute path is found,
79
-             * the current working directory is used as well. The resulting path is normalized,
80
-             * and trailing slashes are removed unless the path gets resolved to the root directory.
81
-             *
82
-             * @param pathSegments string paths to join.  Non-string arguments are ignored.
83
-             */
84
-            resolve(...pathSegments: string[]): string;
85
-            /**
86
-             * Determines whether {path} is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.
87
-             *
88
-             * @param path path to test.
89
-             */
90
-            isAbsolute(p: string): boolean;
91
-            /**
92
-             * Solve the relative path from {from} to {to}.
93
-             * At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve.
94
-             */
95
-            relative(from: string, to: string): string;
96
-            /**
97
-             * Return the directory name of a path. Similar to the Unix dirname command.
98
-             *
99
-             * @param p the path to evaluate.
100
-             */
101
-            dirname(p: string): string;
102
-            /**
103
-             * Return the last portion of a path. Similar to the Unix basename command.
104
-             * Often used to extract the file name from a fully qualified path.
105
-             *
106
-             * @param p the path to evaluate.
107
-             * @param ext optionally, an extension to remove from the result.
108
-             */
109
-            basename(p: string, ext?: string): string;
110
-            /**
111
-             * Return the extension of the path, from the last '.' to end of string in the last portion of the path.
112
-             * If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string
113
-             *
114
-             * @param p the path to evaluate.
115
-             */
116
-            extname(p: string): string;
117
-            /**
118
-             * The platform-specific file separator. '\\' or '/'.
119
-             */
120
-            readonly sep: string;
121
-            /**
122
-             * The platform-specific file delimiter. ';' or ':'.
123
-             */
124
-            readonly delimiter: string;
125
-            /**
126
-             * Returns an object from a path string - the opposite of format().
127
-             *
128
-             * @param pathString path to evaluate.
129
-             */
130
-            parse(p: string): ParsedPath;
131
-            /**
132
-             * Returns a path string from an object - the opposite of parse().
133
-             *
134
-             * @param pathString path to evaluate.
135
-             */
136
-            format(pP: FormatInputPathObject): string;
137
-            /**
138
-             * On Windows systems only, returns an equivalent namespace-prefixed path for the given path.
139
-             * If path is not a string, path will be returned without modifications.
140
-             * This method is meaningful only on Windows system.
141
-             * On POSIX systems, the method is non-operational and always returns path without modifications.
142
-             */
143
-            toNamespacedPath(path: string): string;
144
-            /**
145
-             * Posix specific pathing.
146
-             * Same as parent object on posix.
147
-             */
148
-            readonly posix: PlatformPath;
149
-            /**
150
-             * Windows specific pathing.
151
-             * Same as parent object on windows
152
-             */
153
-            readonly win32: PlatformPath;
154
-        }
155
-    }
156
-    const path: path.PlatformPath;
157
-    export = path;
158
-}
... ...
@@ -1,275 +0,0 @@
1
-declare module 'node:perf_hooks' {
2
-    export * from 'perf_hooks';
3
-}
4
-
5
-declare module 'perf_hooks' {
6
-    import { AsyncResource } from 'node:async_hooks';
7
-
8
-    type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
9
-
10
-    interface PerformanceEntry {
11
-        /**
12
-         * The total number of milliseconds elapsed for this entry.
13
-         * This value will not be meaningful for all Performance Entry types.
14
-         */
15
-        readonly duration: number;
16
-
17
-        /**
18
-         * The name of the performance entry.
19
-         */
20
-        readonly name: string;
21
-
22
-        /**
23
-         * The high resolution millisecond timestamp marking the starting time of the Performance Entry.
24
-         */
25
-        readonly startTime: number;
26
-
27
-        /**
28
-         * The type of the performance entry.
29
-         * Currently it may be one of: 'node', 'mark', 'measure', 'gc', or 'function'.
30
-         */
31
-        readonly entryType: EntryType;
32
-
33
-        /**
34
-         * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
35
-         * the type of garbage collection operation that occurred.
36
-         * See perf_hooks.constants for valid values.
37
-         */
38
-        readonly kind?: number;
39
-
40
-        /**
41
-         * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
42
-         * property contains additional information about garbage collection operation.
43
-         * See perf_hooks.constants for valid values.
44
-         */
45
-        readonly flags?: number;
46
-    }
47
-
48
-    interface PerformanceNodeTiming extends PerformanceEntry {
49
-        /**
50
-         * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
51
-         */
52
-        readonly bootstrapComplete: number;
53
-
54
-        /**
55
-         * The high resolution millisecond timestamp at which the Node.js process completed bootstrapping.
56
-         * If bootstrapping has not yet finished, the property has the value of -1.
57
-         */
58
-        readonly environment: number;
59
-
60
-        /**
61
-         * The high resolution millisecond timestamp at which the Node.js environment was initialized.
62
-         */
63
-        readonly idleTime: number;
64
-
65
-        /**
66
-         * The high resolution millisecond timestamp of the amount of time the event loop has been idle
67
-         *  within the event loop's event provider (e.g. `epoll_wait`). This does not take CPU usage
68
-         * into consideration. If the event loop has not yet started (e.g., in the first tick of the main script),
69
-         *  the property has the value of 0.
70
-         */
71
-        readonly loopExit: number;
72
-
73
-        /**
74
-         * The high resolution millisecond timestamp at which the Node.js event loop started.
75
-         * If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1.
76
-         */
77
-        readonly loopStart: number;
78
-
79
-        /**
80
-         * The high resolution millisecond timestamp at which the V8 platform was initialized.
81
-         */
82
-        readonly v8Start: number;
83
-    }
84
-
85
-    interface EventLoopUtilization {
86
-        idle: number;
87
-        active: number;
88
-        utilization: number;
89
-    }
90
-
91
-    interface Performance {
92
-        /**
93
-         * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
94
-         * If name is provided, removes only the named mark.
95
-         * @param name
96
-         */
97
-        clearMarks(name?: string): void;
98
-
99
-        /**
100
-         * Creates a new PerformanceMark entry in the Performance Timeline.
101
-         * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
102
-         * and whose performanceEntry.duration is always 0.
103
-         * Performance marks are used to mark specific significant moments in the Performance Timeline.
104
-         * @param name
105
-         */
106
-        mark(name?: string): void;
107
-
108
-        /**
109
-         * Creates a new PerformanceMeasure entry in the Performance Timeline.
110
-         * A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'measure',
111
-         * and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.
112
-         *
113
-         * The startMark argument may identify any existing PerformanceMark in the the Performance Timeline, or may identify
114
-         * any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist,
115
-         * then startMark is set to timeOrigin by default.
116
-         *
117
-         * The endMark argument must identify any existing PerformanceMark in the the Performance Timeline or any of the timestamp
118
-         * properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.
119
-         * @param name
120
-         * @param startMark
121
-         * @param endMark
122
-         */
123
-        measure(name: string, startMark: string, endMark: string): void;
124
-
125
-        /**
126
-         * An instance of the PerformanceNodeTiming class that provides performance metrics for specific Node.js operational milestones.
127
-         */
128
-        readonly nodeTiming: PerformanceNodeTiming;
129
-
130
-        /**
131
-         * @return the current high resolution millisecond timestamp
132
-         */
133
-        now(): number;
134
-
135
-        /**
136
-         * The timeOrigin specifies the high resolution millisecond timestamp from which all performance metric durations are measured.
137
-         */
138
-        readonly timeOrigin: number;
139
-
140
-        /**
141
-         * Wraps a function within a new function that measures the running time of the wrapped function.
142
-         * A PerformanceObserver must be subscribed to the 'function' event type in order for the timing details to be accessed.
143
-         * @param fn
144
-         */
145
-        timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
146
-
147
-        /**
148
-         * eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
149
-         * It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
150
-         * No other CPU idle time is taken into consideration.
151
-         *
152
-         * @param util1 The result of a previous call to eventLoopUtilization()
153
-         * @param util2 The result of a previous call to eventLoopUtilization() prior to util1
154
-         */
155
-        eventLoopUtilization(util1?: EventLoopUtilization, util2?: EventLoopUtilization): EventLoopUtilization;
156
-    }
157
-
158
-    interface PerformanceObserverEntryList {
159
-        /**
160
-         * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
161
-         */
162
-        getEntries(): PerformanceEntry[];
163
-
164
-        /**
165
-         * @return a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
166
-         * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
167
-         */
168
-        getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
169
-
170
-        /**
171
-         * @return Returns a list of PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
172
-         * whose performanceEntry.entryType is equal to type.
173
-         */
174
-        getEntriesByType(type: EntryType): PerformanceEntry[];
175
-    }
176
-
177
-    type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
178
-
179
-    class PerformanceObserver extends AsyncResource {
180
-        constructor(callback: PerformanceObserverCallback);
181
-
182
-        /**
183
-         * Disconnects the PerformanceObserver instance from all notifications.
184
-         */
185
-        disconnect(): void;
186
-
187
-        /**
188
-         * Subscribes the PerformanceObserver instance to notifications of new PerformanceEntry instances identified by options.entryTypes.
189
-         * When options.buffered is false, the callback will be invoked once for every PerformanceEntry instance.
190
-         * Property buffered defaults to false.
191
-         * @param options
192
-         */
193
-        observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean }): void;
194
-    }
195
-
196
-    namespace constants {
197
-        const NODE_PERFORMANCE_GC_MAJOR: number;
198
-        const NODE_PERFORMANCE_GC_MINOR: number;
199
-        const NODE_PERFORMANCE_GC_INCREMENTAL: number;
200
-        const NODE_PERFORMANCE_GC_WEAKCB: number;
201
-
202
-        const NODE_PERFORMANCE_GC_FLAGS_NO: number;
203
-        const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
204
-        const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
205
-        const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
206
-        const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
207
-        const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
208
-        const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
209
-    }
210
-
211
-    const performance: Performance;
212
-
213
-    interface EventLoopMonitorOptions {
214
-        /**
215
-         * The sampling rate in milliseconds.
216
-         * Must be greater than zero.
217
-         * @default 10
218
-         */
219
-        resolution?: number;
220
-    }
221
-
222
-    interface EventLoopDelayMonitor {
223
-        /**
224
-         * Enables the event loop delay sample timer. Returns `true` if the timer was started, `false` if it was already started.
225
-         */
226
-        enable(): boolean;
227
-        /**
228
-         * Disables the event loop delay sample timer. Returns `true` if the timer was stopped, `false` if it was already stopped.
229
-         */
230
-        disable(): boolean;
231
-
232
-        /**
233
-         * Resets the collected histogram data.
234
-         */
235
-        reset(): void;
236
-
237
-        /**
238
-         * Returns the value at the given percentile.
239
-         * @param percentile A percentile value between 1 and 100.
240
-         */
241
-        percentile(percentile: number): number;
242
-
243
-        /**
244
-         * A `Map` object detailing the accumulated percentile distribution.
245
-         */
246
-        readonly percentiles: Map<number, number>;
247
-
248
-        /**
249
-         * The number of times the event loop delay exceeded the maximum 1 hour eventloop delay threshold.
250
-         */
251
-        readonly exceeds: number;
252
-
253
-        /**
254
-         * The minimum recorded event loop delay.
255
-         */
256
-        readonly min: number;
257
-
258
-        /**
259
-         * The maximum recorded event loop delay.
260
-         */
261
-        readonly max: number;
262
-
263
-        /**
264
-         * The mean of the recorded event loop delays.
265
-         */
266
-        readonly mean: number;
267
-
268
-        /**
269
-         * The standard deviation of the recorded event loop delays.
270
-         */
271
-        readonly stddev: number;
272
-    }
273
-
274
-    function monitorEventLoopDelay(options?: EventLoopMonitorOptions): EventLoopDelayMonitor;
275
-}
... ...
@@ -1,412 +0,0 @@
1
-declare module 'node:process' {
2
-    export = process;
3
-}
4
-
5
-declare module 'process' {
6
-    import * as tty from 'node:tty';
7
-
8
-    global {
9
-        var process: NodeJS.Process;
10
-
11
-        namespace NodeJS {
12
-            // this namespace merge is here because these are specifically used
13
-            // as the type for process.stdin, process.stdout, and process.stderr.
14
-            // they can't live in tty.d.ts because we need to disambiguate the imported name.
15
-            interface ReadStream extends tty.ReadStream {}
16
-            interface WriteStream extends tty.WriteStream {}
17
-
18
-            interface MemoryUsage {
19
-                rss: number;
20
-                heapTotal: number;
21
-                heapUsed: number;
22
-                external: number;
23
-                arrayBuffers: number;
24
-            }
25
-
26
-            interface CpuUsage {
27
-                user: number;
28
-                system: number;
29
-            }
30
-
31
-            interface ProcessRelease {
32
-                name: string;
33
-                sourceUrl?: string;
34
-                headersUrl?: string;
35
-                libUrl?: string;
36
-                lts?: string;
37
-            }
38
-
39
-            interface ProcessVersions extends Dict<string> {
40
-                http_parser: string;
41
-                node: string;
42
-                v8: string;
43
-                ares: string;
44
-                uv: string;
45
-                zlib: string;
46
-                modules: string;
47
-                openssl: string;
48
-            }
49
-
50
-            type Platform = 'aix'
51
-                | 'android'
52
-                | 'darwin'
53
-                | 'freebsd'
54
-                | 'linux'
55
-                | 'openbsd'
56
-                | 'sunos'
57
-                | 'win32'
58
-                | 'cygwin'
59
-                | 'netbsd';
60
-
61
-            type Signals =
62
-                "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" |
63
-                "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" |
64
-                "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" |
65
-                "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
66
-
67
-            type MultipleResolveType = 'resolve' | 'reject';
68
-
69
-            type BeforeExitListener = (code: number) => void;
70
-            type DisconnectListener = () => void;
71
-            type ExitListener = (code: number) => void;
72
-            type RejectionHandledListener = (promise: Promise<any>) => void;
73
-            type UncaughtExceptionListener = (error: Error) => void;
74
-            type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
75
-            type WarningListener = (warning: Error) => void;
76
-            type MessageListener = (message: any, sendHandle: any) => void;
77
-            type SignalsListener = (signal: Signals) => void;
78
-            type NewListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
79
-            type RemoveListenerListener = (type: string | symbol, listener: (...args: any[]) => void) => void;
80
-            type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
81
-
82
-            interface Socket extends ReadWriteStream {
83
-                isTTY?: true;
84
-            }
85
-
86
-            // Alias for compatibility
87
-            interface ProcessEnv extends Dict<string> {}
88
-
89
-            interface HRTime {
90
-                (time?: [number, number]): [number, number];
91
-                bigint(): bigint;
92
-            }
93
-
94
-            interface ProcessReport {
95
-                /**
96
-                 * Directory where the report is written.
97
-                 * working directory of the Node.js process.
98
-                 * @default '' indicating that reports are written to the current
99
-                 */
100
-                directory: string;
101
-
102
-                /**
103
-                 * Filename where the report is written.
104
-                 * The default value is the empty string.
105
-                 * @default '' the output filename will be comprised of a timestamp,
106
-                 * PID, and sequence number.
107
-                 */
108
-                filename: string;
109
-
110
-                /**
111
-                 * Returns a JSON-formatted diagnostic report for the running process.
112
-                 * The report's JavaScript stack trace is taken from err, if present.
113
-                 */
114
-                getReport(err?: Error): string;
115
-
116
-                /**
117
-                 * If true, a diagnostic report is generated on fatal errors,
118
-                 * such as out of memory errors or failed C++ assertions.
119
-                 * @default false
120
-                 */
121
-                reportOnFatalError: boolean;
122
-
123
-                /**
124
-                 * If true, a diagnostic report is generated when the process
125
-                 * receives the signal specified by process.report.signal.
126
-                 * @defaul false
127
-                 */
128
-                reportOnSignal: boolean;
129
-
130
-                /**
131
-                 * If true, a diagnostic report is generated on uncaught exception.
132
-                 * @default false
133
-                 */
134
-                reportOnUncaughtException: boolean;
135
-
136
-                /**
137
-                 * The signal used to trigger the creation of a diagnostic report.
138
-                 * @default 'SIGUSR2'
139
-                 */
140
-                signal: Signals;
141
-
142
-                /**
143
-                 * Writes a diagnostic report to a file. If filename is not provided, the default filename
144
-                 * includes the date, time, PID, and a sequence number.
145
-                 * The report's JavaScript stack trace is taken from err, if present.
146
-                 *
147
-                 * @param fileName Name of the file where the report is written.
148
-                 * This should be a relative path, that will be appended to the directory specified in
149
-                 * `process.report.directory`, or the current working directory of the Node.js process,
150
-                 * if unspecified.
151
-                 * @param error A custom error used for reporting the JavaScript stack.
152
-                 * @return Filename of the generated report.
153
-                 */
154
-                writeReport(fileName?: string): string;
155
-                writeReport(error?: Error): string;
156
-                writeReport(fileName?: string, err?: Error): string;
157
-            }
158
-
159
-            interface ResourceUsage {
160
-                fsRead: number;
161
-                fsWrite: number;
162
-                involuntaryContextSwitches: number;
163
-                ipcReceived: number;
164
-                ipcSent: number;
165
-                majorPageFault: number;
166
-                maxRSS: number;
167
-                minorPageFault: number;
168
-                sharedMemorySize: number;
169
-                signalsCount: number;
170
-                swappedOut: number;
171
-                systemCPUTime: number;
172
-                unsharedDataSize: number;
173
-                unsharedStackSize: number;
174
-                userCPUTime: number;
175
-                voluntaryContextSwitches: number;
176
-            }
177
-
178
-            interface Process extends EventEmitter {
179
-                /**
180
-                 * Can also be a tty.WriteStream, not typed due to limitations.
181
-                 */
182
-                stdout: WriteStream & {
183
-                    fd: 1;
184
-                };
185
-                /**
186
-                 * Can also be a tty.WriteStream, not typed due to limitations.
187
-                 */
188
-                stderr: WriteStream & {
189
-                    fd: 2;
190
-                };
191
-                stdin: ReadStream & {
192
-                    fd: 0;
193
-                };
194
-                openStdin(): Socket;
195
-                argv: string[];
196
-                argv0: string;
197
-                execArgv: string[];
198
-                execPath: string;
199
-                abort(): never;
200
-                chdir(directory: string): void;
201
-                cwd(): string;
202
-                debugPort: number;
203
-                emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
204
-                env: ProcessEnv;
205
-                exit(code?: number): never;
206
-                exitCode?: number;
207
-                getgid(): number;
208
-                setgid(id: number | string): void;
209
-                getuid(): number;
210
-                setuid(id: number | string): void;
211
-                geteuid(): number;
212
-                seteuid(id: number | string): void;
213
-                getegid(): number;
214
-                setegid(id: number | string): void;
215
-                getgroups(): number[];
216
-                setgroups(groups: ReadonlyArray<string | number>): void;
217
-                setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
218
-                hasUncaughtExceptionCaptureCallback(): boolean;
219
-                version: string;
220
-                versions: ProcessVersions;
221
-                config: {
222
-                    target_defaults: {
223
-                        cflags: any[];
224
-                        default_configuration: string;
225
-                        defines: string[];
226
-                        include_dirs: string[];
227
-                        libraries: string[];
228
-                    };
229
-                    variables: {
230
-                        clang: number;
231
-                        host_arch: string;
232
-                        node_install_npm: boolean;
233
-                        node_install_waf: boolean;
234
-                        node_prefix: string;
235
-                        node_shared_openssl: boolean;
236
-                        node_shared_v8: boolean;
237
-                        node_shared_zlib: boolean;
238
-                        node_use_dtrace: boolean;
239
-                        node_use_etw: boolean;
240
-                        node_use_openssl: boolean;
241
-                        target_arch: string;
242
-                        v8_no_strict_aliasing: number;
243
-                        v8_use_snapshot: boolean;
244
-                        visibility: string;
245
-                    };
246
-                };
247
-                kill(pid: number, signal?: string | number): true;
248
-                pid: number;
249
-                ppid: number;
250
-                title: string;
251
-                arch: string;
252
-                platform: Platform;
253
-                /** @deprecated since v14.0.0 - use `require.main` instead. */
254
-                mainModule?: Module;
255
-                memoryUsage(): MemoryUsage;
256
-                cpuUsage(previousValue?: CpuUsage): CpuUsage;
257
-                nextTick(callback: Function, ...args: any[]): void;
258
-                release: ProcessRelease;
259
-                features: {
260
-                    inspector: boolean;
261
-                    debug: boolean;
262
-                    uv: boolean;
263
-                    ipv6: boolean;
264
-                    tls_alpn: boolean;
265
-                    tls_sni: boolean;
266
-                    tls_ocsp: boolean;
267
-                    tls: boolean;
268
-                };
269
-                /**
270
-                 * @deprecated since v14.0.0 - Calling process.umask() with no argument causes
271
-                 * the process-wide umask to be written twice. This introduces a race condition between threads,
272
-                 * and is a potential security vulnerability. There is no safe, cross-platform alternative API.
273
-                 */
274
-                umask(): number;
275
-                /**
276
-                 * Can only be set if not in worker thread.
277
-                 */
278
-                umask(mask: string | number): number;
279
-                uptime(): number;
280
-                hrtime: HRTime;
281
-                domain: Domain;
282
-
283
-                // Worker
284
-                send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean;
285
-                disconnect(): void;
286
-                connected: boolean;
287
-
288
-                /**
289
-                 * The `process.allowedNodeEnvironmentFlags` property is a special,
290
-                 * read-only `Set` of flags allowable within the [`NODE_OPTIONS`][]
291
-                 * environment variable.
292
-                 */
293
-                allowedNodeEnvironmentFlags: ReadonlySet<string>;
294
-
295
-                /**
296
-                 * Only available with `--experimental-report`
297
-                 */
298
-                report?: ProcessReport;
299
-
300
-                resourceUsage(): ResourceUsage;
301
-
302
-                traceDeprecation: boolean;
303
-
304
-                /* EventEmitter */
305
-                addListener(event: "beforeExit", listener: BeforeExitListener): this;
306
-                addListener(event: "disconnect", listener: DisconnectListener): this;
307
-                addListener(event: "exit", listener: ExitListener): this;
308
-                addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
309
-                addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
310
-                addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
311
-                addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
312
-                addListener(event: "warning", listener: WarningListener): this;
313
-                addListener(event: "message", listener: MessageListener): this;
314
-                addListener(event: Signals, listener: SignalsListener): this;
315
-                addListener(event: "newListener", listener: NewListenerListener): this;
316
-                addListener(event: "removeListener", listener: RemoveListenerListener): this;
317
-                addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
318
-
319
-                emit(event: "beforeExit", code: number): boolean;
320
-                emit(event: "disconnect"): boolean;
321
-                emit(event: "exit", code: number): boolean;
322
-                emit(event: "rejectionHandled", promise: Promise<any>): boolean;
323
-                emit(event: "uncaughtException", error: Error): boolean;
324
-                emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
325
-                emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
326
-                emit(event: "warning", warning: Error): boolean;
327
-                emit(event: "message", message: any, sendHandle: any): this;
328
-                emit(event: Signals, signal: Signals): boolean;
329
-                emit(event: "newListener", eventName: string | symbol, listener: (...args: any[]) => void): this;
330
-                emit(event: "removeListener", eventName: string, listener: (...args: any[]) => void): this;
331
-                emit(event: "multipleResolves", listener: MultipleResolveListener): this;
332
-
333
-                on(event: "beforeExit", listener: BeforeExitListener): this;
334
-                on(event: "disconnect", listener: DisconnectListener): this;
335
-                on(event: "exit", listener: ExitListener): this;
336
-                on(event: "rejectionHandled", listener: RejectionHandledListener): this;
337
-                on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
338
-                on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
339
-                on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
340
-                on(event: "warning", listener: WarningListener): this;
341
-                on(event: "message", listener: MessageListener): this;
342
-                on(event: Signals, listener: SignalsListener): this;
343
-                on(event: "newListener", listener: NewListenerListener): this;
344
-                on(event: "removeListener", listener: RemoveListenerListener): this;
345
-                on(event: "multipleResolves", listener: MultipleResolveListener): this;
346
-                on(event: string | symbol, listener: (...args: any[]) => void): this;
347
-
348
-                once(event: "beforeExit", listener: BeforeExitListener): this;
349
-                once(event: "disconnect", listener: DisconnectListener): this;
350
-                once(event: "exit", listener: ExitListener): this;
351
-                once(event: "rejectionHandled", listener: RejectionHandledListener): this;
352
-                once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
353
-                once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
354
-                once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
355
-                once(event: "warning", listener: WarningListener): this;
356
-                once(event: "message", listener: MessageListener): this;
357
-                once(event: Signals, listener: SignalsListener): this;
358
-                once(event: "newListener", listener: NewListenerListener): this;
359
-                once(event: "removeListener", listener: RemoveListenerListener): this;
360
-                once(event: "multipleResolves", listener: MultipleResolveListener): this;
361
-
362
-                prependListener(event: "beforeExit", listener: BeforeExitListener): this;
363
-                prependListener(event: "disconnect", listener: DisconnectListener): this;
364
-                prependListener(event: "exit", listener: ExitListener): this;
365
-                prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
366
-                prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
367
-                prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
368
-                prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
369
-                prependListener(event: "warning", listener: WarningListener): this;
370
-                prependListener(event: "message", listener: MessageListener): this;
371
-                prependListener(event: Signals, listener: SignalsListener): this;
372
-                prependListener(event: "newListener", listener: NewListenerListener): this;
373
-                prependListener(event: "removeListener", listener: RemoveListenerListener): this;
374
-                prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
375
-
376
-                prependOnceListener(event: "beforeExit", listener: BeforeExitListener): this;
377
-                prependOnceListener(event: "disconnect", listener: DisconnectListener): this;
378
-                prependOnceListener(event: "exit", listener: ExitListener): this;
379
-                prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
380
-                prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
381
-                prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
382
-                prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
383
-                prependOnceListener(event: "warning", listener: WarningListener): this;
384
-                prependOnceListener(event: "message", listener: MessageListener): this;
385
-                prependOnceListener(event: Signals, listener: SignalsListener): this;
386
-                prependOnceListener(event: "newListener", listener: NewListenerListener): this;
387
-                prependOnceListener(event: "removeListener", listener: RemoveListenerListener): this;
388
-                prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
389
-
390
-                listeners(event: "beforeExit"): BeforeExitListener[];
391
-                listeners(event: "disconnect"): DisconnectListener[];
392
-                listeners(event: "exit"): ExitListener[];
393
-                listeners(event: "rejectionHandled"): RejectionHandledListener[];
394
-                listeners(event: "uncaughtException"): UncaughtExceptionListener[];
395
-                listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
396
-                listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
397
-                listeners(event: "warning"): WarningListener[];
398
-                listeners(event: "message"): MessageListener[];
399
-                listeners(event: Signals): SignalsListener[];
400
-                listeners(event: "newListener"): NewListenerListener[];
401
-                listeners(event: "removeListener"): RemoveListenerListener[];
402
-                listeners(event: "multipleResolves"): MultipleResolveListener[];
403
-            }
404
-
405
-            interface Global {
406
-                process: Process;
407
-            }
408
-        }
409
-    }
410
-
411
-    export = process;
412
-}
... ...
@@ -1,86 +0,0 @@
1
-/**
2
- * @deprecated since v7.0.0
3
- * The version of the punycode module bundled in Node.js is being deprecated.
4
- * In a future major version of Node.js this module will be removed.
5
- * Users currently depending on the punycode module should switch to using
6
- * the userland-provided Punycode.js module instead.
7
- */
8
-declare module 'node:punycode' {
9
-    export * from 'punycode';
10
-}
11
-
12
-/**
13
- * @deprecated since v7.0.0
14
- * The version of the punycode module bundled in Node.js is being deprecated.
15
- * In a future major version of Node.js this module will be removed.
16
- * Users currently depending on the punycode module should switch to using
17
- * the userland-provided Punycode.js module instead.
18
- */
19
-declare module 'punycode' {
20
-    /**
21
-     * @deprecated since v7.0.0
22
-     * The version of the punycode module bundled in Node.js is being deprecated.
23
-     * In a future major version of Node.js this module will be removed.
24
-     * Users currently depending on the punycode module should switch to using
25
-     * the userland-provided Punycode.js module instead.
26
-     */
27
-    function decode(string: string): string;
28
-    /**
29
-     * @deprecated since v7.0.0
30
-     * The version of the punycode module bundled in Node.js is being deprecated.
31
-     * In a future major version of Node.js this module will be removed.
32
-     * Users currently depending on the punycode module should switch to using
33
-     * the userland-provided Punycode.js module instead.
34
-     */
35
-    function encode(string: string): string;
36
-    /**
37
-     * @deprecated since v7.0.0
38
-     * The version of the punycode module bundled in Node.js is being deprecated.
39
-     * In a future major version of Node.js this module will be removed.
40
-     * Users currently depending on the punycode module should switch to using
41
-     * the userland-provided Punycode.js module instead.
42
-     */
43
-    function toUnicode(domain: string): string;
44
-    /**
45
-     * @deprecated since v7.0.0
46
-     * The version of the punycode module bundled in Node.js is being deprecated.
47
-     * In a future major version of Node.js this module will be removed.
48
-     * Users currently depending on the punycode module should switch to using
49
-     * the userland-provided Punycode.js module instead.
50
-     */
51
-    function toASCII(domain: string): string;
52
-    /**
53
-     * @deprecated since v7.0.0
54
-     * The version of the punycode module bundled in Node.js is being deprecated.
55
-     * In a future major version of Node.js this module will be removed.
56
-     * Users currently depending on the punycode module should switch to using
57
-     * the userland-provided Punycode.js module instead.
58
-     */
59
-    const ucs2: ucs2;
60
-    interface ucs2 {
61
-        /**
62
-         * @deprecated since v7.0.0
63
-         * The version of the punycode module bundled in Node.js is being deprecated.
64
-         * In a future major version of Node.js this module will be removed.
65
-         * Users currently depending on the punycode module should switch to using
66
-         * the userland-provided Punycode.js module instead.
67
-         */
68
-        decode(string: string): number[];
69
-        /**
70
-         * @deprecated since v7.0.0
71
-         * The version of the punycode module bundled in Node.js is being deprecated.
72
-         * In a future major version of Node.js this module will be removed.
73
-         * Users currently depending on the punycode module should switch to using
74
-         * the userland-provided Punycode.js module instead.
75
-         */
76
-        encode(codePoints: ReadonlyArray<number>): string;
77
-    }
78
-    /**
79
-     * @deprecated since v7.0.0
80
-     * The version of the punycode module bundled in Node.js is being deprecated.
81
-     * In a future major version of Node.js this module will be removed.
82
-     * Users currently depending on the punycode module should switch to using
83
-     * the userland-provided Punycode.js module instead.
84
-     */
85
-    const version: string;
86
-}
... ...
@@ -1,32 +0,0 @@
1
-declare module 'node:querystring' {
2
-    export * from 'querystring';
3
-}
4
-
5
-declare module 'querystring' {
6
-    interface StringifyOptions {
7
-        encodeURIComponent?: (str: string) => string;
8
-    }
9
-
10
-    interface ParseOptions {
11
-        maxKeys?: number;
12
-        decodeURIComponent?: (str: string) => string;
13
-    }
14
-
15
-    interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
16
-
17
-    interface ParsedUrlQueryInput extends NodeJS.Dict<string | number | boolean | ReadonlyArray<string> | ReadonlyArray<number> | ReadonlyArray<boolean> | null> {
18
-    }
19
-
20
-    function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
21
-    function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
22
-    /**
23
-     * The querystring.encode() function is an alias for querystring.stringify().
24
-     */
25
-    const encode: typeof stringify;
26
-    /**
27
-     * The querystring.decode() function is an alias for querystring.parse().
28
-     */
29
-    const decode: typeof parse;
30
-    function escape(str: string): string;
31
-    function unescape(str: string): string;
32
-}
... ...
@@ -1,174 +0,0 @@
1
-declare module 'node:readline' {
2
-    export * from 'readline';
3
-}
4
-
5
-declare module 'readline' {
6
-    import EventEmitter = require('node:events');
7
-
8
-    interface Key {
9
-        sequence?: string;
10
-        name?: string;
11
-        ctrl?: boolean;
12
-        meta?: boolean;
13
-        shift?: boolean;
14
-    }
15
-
16
-    class Interface extends EventEmitter {
17
-        readonly terminal: boolean;
18
-
19
-        // Need direct access to line/cursor data, for use in external processes
20
-        // see: https://github.com/nodejs/node/issues/30347
21
-        /** The current input data */
22
-        readonly line: string;
23
-        /** The current cursor position in the input line */
24
-        readonly cursor: number;
25
-
26
-        /**
27
-         * NOTE: According to the documentation:
28
-         *
29
-         * > Instances of the `readline.Interface` class are constructed using the
30
-         * > `readline.createInterface()` method.
31
-         *
32
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
33
-         */
34
-        protected constructor(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean);
35
-        /**
36
-         * NOTE: According to the documentation:
37
-         *
38
-         * > Instances of the `readline.Interface` class are constructed using the
39
-         * > `readline.createInterface()` method.
40
-         *
41
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/readline.html#readline_class_interface
42
-         */
43
-        protected constructor(options: ReadLineOptions);
44
-
45
-        setPrompt(prompt: string): void;
46
-        prompt(preserveCursor?: boolean): void;
47
-        question(query: string, callback: (answer: string) => void): void;
48
-        pause(): this;
49
-        resume(): this;
50
-        close(): void;
51
-        write(data: string | Buffer, key?: Key): void;
52
-
53
-        /**
54
-         * Returns the real position of the cursor in relation to the input
55
-         * prompt + string.  Long input (wrapping) strings, as well as multiple
56
-         * line prompts are included in the calculations.
57
-         */
58
-        getCursorPos(): CursorPos;
59
-
60
-        /**
61
-         * events.EventEmitter
62
-         * 1. close
63
-         * 2. line
64
-         * 3. pause
65
-         * 4. resume
66
-         * 5. SIGCONT
67
-         * 6. SIGINT
68
-         * 7. SIGTSTP
69
-         */
70
-
71
-        addListener(event: string, listener: (...args: any[]) => void): this;
72
-        addListener(event: "close", listener: () => void): this;
73
-        addListener(event: "line", listener: (input: string) => void): this;
74
-        addListener(event: "pause", listener: () => void): this;
75
-        addListener(event: "resume", listener: () => void): this;
76
-        addListener(event: "SIGCONT", listener: () => void): this;
77
-        addListener(event: "SIGINT", listener: () => void): this;
78
-        addListener(event: "SIGTSTP", listener: () => void): this;
79
-
80
-        emit(event: string | symbol, ...args: any[]): boolean;
81
-        emit(event: "close"): boolean;
82
-        emit(event: "line", input: string): boolean;
83
-        emit(event: "pause"): boolean;
84
-        emit(event: "resume"): boolean;
85
-        emit(event: "SIGCONT"): boolean;
86
-        emit(event: "SIGINT"): boolean;
87
-        emit(event: "SIGTSTP"): boolean;
88
-
89
-        on(event: string, listener: (...args: any[]) => void): this;
90
-        on(event: "close", listener: () => void): this;
91
-        on(event: "line", listener: (input: string) => void): this;
92
-        on(event: "pause", listener: () => void): this;
93
-        on(event: "resume", listener: () => void): this;
94
-        on(event: "SIGCONT", listener: () => void): this;
95
-        on(event: "SIGINT", listener: () => void): this;
96
-        on(event: "SIGTSTP", listener: () => void): this;
97
-
98
-        once(event: string, listener: (...args: any[]) => void): this;
99
-        once(event: "close", listener: () => void): this;
100
-        once(event: "line", listener: (input: string) => void): this;
101
-        once(event: "pause", listener: () => void): this;
102
-        once(event: "resume", listener: () => void): this;
103
-        once(event: "SIGCONT", listener: () => void): this;
104
-        once(event: "SIGINT", listener: () => void): this;
105
-        once(event: "SIGTSTP", listener: () => void): this;
106
-
107
-        prependListener(event: string, listener: (...args: any[]) => void): this;
108
-        prependListener(event: "close", listener: () => void): this;
109
-        prependListener(event: "line", listener: (input: string) => void): this;
110
-        prependListener(event: "pause", listener: () => void): this;
111
-        prependListener(event: "resume", listener: () => void): this;
112
-        prependListener(event: "SIGCONT", listener: () => void): this;
113
-        prependListener(event: "SIGINT", listener: () => void): this;
114
-        prependListener(event: "SIGTSTP", listener: () => void): this;
115
-
116
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
117
-        prependOnceListener(event: "close", listener: () => void): this;
118
-        prependOnceListener(event: "line", listener: (input: string) => void): this;
119
-        prependOnceListener(event: "pause", listener: () => void): this;
120
-        prependOnceListener(event: "resume", listener: () => void): this;
121
-        prependOnceListener(event: "SIGCONT", listener: () => void): this;
122
-        prependOnceListener(event: "SIGINT", listener: () => void): this;
123
-        prependOnceListener(event: "SIGTSTP", listener: () => void): this;
124
-        [Symbol.asyncIterator](): AsyncIterableIterator<string>;
125
-    }
126
-
127
-    type ReadLine = Interface; // type forwarded for backwards compatibility
128
-
129
-    type Completer = (line: string) => CompleterResult;
130
-    type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any;
131
-
132
-    type CompleterResult = [string[], string];
133
-
134
-    interface ReadLineOptions {
135
-        input: NodeJS.ReadableStream;
136
-        output?: NodeJS.WritableStream;
137
-        completer?: Completer | AsyncCompleter;
138
-        terminal?: boolean;
139
-        historySize?: number;
140
-        prompt?: string;
141
-        crlfDelay?: number;
142
-        removeHistoryDuplicates?: boolean;
143
-        escapeCodeTimeout?: number;
144
-        tabSize?: number;
145
-    }
146
-
147
-    function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
148
-    function createInterface(options: ReadLineOptions): Interface;
149
-    function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
150
-
151
-    type Direction = -1 | 0 | 1;
152
-
153
-    interface CursorPos {
154
-        rows: number;
155
-        cols: number;
156
-    }
157
-
158
-    /**
159
-     * Clears the current line of this WriteStream in a direction identified by `dir`.
160
-     */
161
-    function clearLine(stream: NodeJS.WritableStream, dir: Direction, callback?: () => void): boolean;
162
-    /**
163
-     * Clears this `WriteStream` from the current cursor down.
164
-     */
165
-    function clearScreenDown(stream: NodeJS.WritableStream, callback?: () => void): boolean;
166
-    /**
167
-     * Moves this WriteStream's cursor to the specified position.
168
-     */
169
-    function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
170
-    /**
171
-     * Moves this WriteStream's cursor relative to its current position.
172
-     */
173
-    function moveCursor(stream: NodeJS.WritableStream, dx: number, dy: number, callback?: () => void): boolean;
174
-}
... ...
@@ -1,399 +0,0 @@
1
-declare module 'node:repl' {
2
-    export * from 'repl';
3
-}
4
-
5
-declare module 'repl' {
6
-    import { Interface, Completer, AsyncCompleter } from 'node:readline';
7
-    import { Context } from 'node:vm';
8
-    import { InspectOptions } from 'node:util';
9
-
10
-    interface ReplOptions {
11
-        /**
12
-         * The input prompt to display.
13
-         * Default: `"> "`
14
-         */
15
-        prompt?: string;
16
-        /**
17
-         * The `Readable` stream from which REPL input will be read.
18
-         * Default: `process.stdin`
19
-         */
20
-        input?: NodeJS.ReadableStream;
21
-        /**
22
-         * The `Writable` stream to which REPL output will be written.
23
-         * Default: `process.stdout`
24
-         */
25
-        output?: NodeJS.WritableStream;
26
-        /**
27
-         * If `true`, specifies that the output should be treated as a TTY terminal, and have
28
-         * ANSI/VT100 escape codes written to it.
29
-         * Default: checking the value of the `isTTY` property on the output stream upon
30
-         * instantiation.
31
-         */
32
-        terminal?: boolean;
33
-        /**
34
-         * The function to be used when evaluating each given line of input.
35
-         * Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
36
-         * error with `repl.Recoverable` to indicate the input was incomplete and prompt for
37
-         * additional lines.
38
-         *
39
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
40
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
41
-         */
42
-        eval?: REPLEval;
43
-        /**
44
-         * Defines if the repl prints output previews or not.
45
-         * @default `true` Always `false` in case `terminal` is falsy.
46
-         */
47
-        preview?: boolean;
48
-        /**
49
-         * If `true`, specifies that the default `writer` function should include ANSI color
50
-         * styling to REPL output. If a custom `writer` function is provided then this has no
51
-         * effect.
52
-         * Default: the REPL instance's `terminal` value.
53
-         */
54
-        useColors?: boolean;
55
-        /**
56
-         * If `true`, specifies that the default evaluation function will use the JavaScript
57
-         * `global` as the context as opposed to creating a new separate context for the REPL
58
-         * instance. The node CLI REPL sets this value to `true`.
59
-         * Default: `false`.
60
-         */
61
-        useGlobal?: boolean;
62
-        /**
63
-         * If `true`, specifies that the default writer will not output the return value of a
64
-         * command if it evaluates to `undefined`.
65
-         * Default: `false`.
66
-         */
67
-        ignoreUndefined?: boolean;
68
-        /**
69
-         * The function to invoke to format the output of each command before writing to `output`.
70
-         * Default: a wrapper for `util.inspect`.
71
-         *
72
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
73
-         */
74
-        writer?: REPLWriter;
75
-        /**
76
-         * An optional function used for custom Tab auto completion.
77
-         *
78
-         * @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
79
-         */
80
-        completer?: Completer | AsyncCompleter;
81
-        /**
82
-         * A flag that specifies whether the default evaluator executes all JavaScript commands in
83
-         * strict mode or default (sloppy) mode.
84
-         * Accepted values are:
85
-         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
86
-         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
87
-         *   prefacing every repl statement with `'use strict'`.
88
-         */
89
-        replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
90
-        /**
91
-         * Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
92
-         * pressed. This cannot be used together with a custom `eval` function.
93
-         * Default: `false`.
94
-         */
95
-        breakEvalOnSigint?: boolean;
96
-    }
97
-
98
-    type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
99
-    type REPLWriter = (this: REPLServer, obj: any) => string;
100
-
101
-    /**
102
-     * This is the default "writer" value, if none is passed in the REPL options,
103
-     * and it can be overridden by custom print functions.
104
-     */
105
-    const writer: REPLWriter & { options: InspectOptions };
106
-
107
-    type REPLCommandAction = (this: REPLServer, text: string) => void;
108
-
109
-    interface REPLCommand {
110
-        /**
111
-         * Help text to be displayed when `.help` is entered.
112
-         */
113
-        help?: string;
114
-        /**
115
-         * The function to execute, optionally accepting a single string argument.
116
-         */
117
-        action: REPLCommandAction;
118
-    }
119
-
120
-    /**
121
-     * Provides a customizable Read-Eval-Print-Loop (REPL).
122
-     *
123
-     * Instances of `repl.REPLServer` will accept individual lines of user input, evaluate those
124
-     * according to a user-defined evaluation function, then output the result. Input and output
125
-     * may be from `stdin` and `stdout`, respectively, or may be connected to any Node.js `stream`.
126
-     *
127
-     * Instances of `repl.REPLServer` support automatic completion of inputs, simplistic Emacs-style
128
-     * line editing, multi-line inputs, ANSI-styled output, saving and restoring current REPL session
129
-     * state, error recovery, and customizable evaluation functions.
130
-     *
131
-     * Instances of `repl.REPLServer` are created using the `repl.start()` method and _should not_
132
-     * be created directly using the JavaScript `new` keyword.
133
-     *
134
-     * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_repl
135
-     */
136
-    class REPLServer extends Interface {
137
-        /**
138
-         * The `vm.Context` provided to the `eval` function to be used for JavaScript
139
-         * evaluation.
140
-         */
141
-        readonly context: Context;
142
-        /**
143
-         * @deprecated since v14.3.0 - Use `input` instead.
144
-         */
145
-        readonly inputStream: NodeJS.ReadableStream;
146
-        /**
147
-         * @deprecated since v14.3.0 - Use `output` instead.
148
-         */
149
-        readonly outputStream: NodeJS.WritableStream;
150
-        /**
151
-         * The `Readable` stream from which REPL input will be read.
152
-         */
153
-        readonly input: NodeJS.ReadableStream;
154
-        /**
155
-         * The `Writable` stream to which REPL output will be written.
156
-         */
157
-        readonly output: NodeJS.WritableStream;
158
-        /**
159
-         * The commands registered via `replServer.defineCommand()`.
160
-         */
161
-        readonly commands: NodeJS.ReadOnlyDict<REPLCommand>;
162
-        /**
163
-         * A value indicating whether the REPL is currently in "editor mode".
164
-         *
165
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_commands_and_special_keys
166
-         */
167
-        readonly editorMode: boolean;
168
-        /**
169
-         * A value indicating whether the `_` variable has been assigned.
170
-         *
171
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
172
-         */
173
-        readonly underscoreAssigned: boolean;
174
-        /**
175
-         * The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
176
-         *
177
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
178
-         */
179
-        readonly last: any;
180
-        /**
181
-         * A value indicating whether the `_error` variable has been assigned.
182
-         *
183
-         * @since v9.8.0
184
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
185
-         */
186
-        readonly underscoreErrAssigned: boolean;
187
-        /**
188
-         * The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
189
-         *
190
-         * @since v9.8.0
191
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
192
-         */
193
-        readonly lastError: any;
194
-        /**
195
-         * Specified in the REPL options, this is the function to be used when evaluating each
196
-         * given line of input. If not specified in the REPL options, this is an async wrapper
197
-         * for the JavaScript `eval()` function.
198
-         */
199
-        readonly eval: REPLEval;
200
-        /**
201
-         * Specified in the REPL options, this is a value indicating whether the default
202
-         * `writer` function should include ANSI color styling to REPL output.
203
-         */
204
-        readonly useColors: boolean;
205
-        /**
206
-         * Specified in the REPL options, this is a value indicating whether the default `eval`
207
-         * function will use the JavaScript `global` as the context as opposed to creating a new
208
-         * separate context for the REPL instance.
209
-         */
210
-        readonly useGlobal: boolean;
211
-        /**
212
-         * Specified in the REPL options, this is a value indicating whether the default `writer`
213
-         * function should output the result of a command if it evaluates to `undefined`.
214
-         */
215
-        readonly ignoreUndefined: boolean;
216
-        /**
217
-         * Specified in the REPL options, this is the function to invoke to format the output of
218
-         * each command before writing to `outputStream`. If not specified in the REPL options,
219
-         * this will be a wrapper for `util.inspect`.
220
-         */
221
-        readonly writer: REPLWriter;
222
-        /**
223
-         * Specified in the REPL options, this is the function to use for custom Tab auto-completion.
224
-         */
225
-        readonly completer: Completer | AsyncCompleter;
226
-        /**
227
-         * Specified in the REPL options, this is a flag that specifies whether the default `eval`
228
-         * function should execute all JavaScript commands in strict mode or default (sloppy) mode.
229
-         * Possible values are:
230
-         * - `repl.REPL_MODE_SLOPPY` - evaluates expressions in sloppy mode.
231
-         * - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
232
-         *    prefacing every repl statement with `'use strict'`.
233
-         */
234
-        readonly replMode: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
235
-
236
-        /**
237
-         * NOTE: According to the documentation:
238
-         *
239
-         * > Instances of `repl.REPLServer` are created using the `repl.start()` method and
240
-         * > _should not_ be created directly using the JavaScript `new` keyword.
241
-         *
242
-         * `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
243
-         *
244
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_class_replserver
245
-         */
246
-        private constructor();
247
-
248
-        /**
249
-         * Used to add new `.`-prefixed commands to the REPL instance. Such commands are invoked
250
-         * by typing a `.` followed by the `keyword`.
251
-         *
252
-         * @param keyword The command keyword (_without_ a leading `.` character).
253
-         * @param cmd The function to invoke when the command is processed.
254
-         *
255
-         * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_replserver_definecommand_keyword_cmd
256
-         */
257
-        defineCommand(keyword: string, cmd: REPLCommandAction | REPLCommand): void;
258
-        /**
259
-         * Readies the REPL instance for input from the user, printing the configured `prompt` to a
260
-         * new line in the `output` and resuming the `input` to accept new input.
261
-         *
262
-         * When multi-line input is being entered, an ellipsis is printed rather than the 'prompt'.
263
-         *
264
-         * This method is primarily intended to be called from within the action function for
265
-         * commands registered using the `replServer.defineCommand()` method.
266
-         *
267
-         * @param preserveCursor When `true`, the cursor placement will not be reset to `0`.
268
-         */
269
-        displayPrompt(preserveCursor?: boolean): void;
270
-        /**
271
-         * Clears any command that has been buffered but not yet executed.
272
-         *
273
-         * This method is primarily intended to be called from within the action function for
274
-         * commands registered using the `replServer.defineCommand()` method.
275
-         *
276
-         * @since v9.0.0
277
-         */
278
-        clearBufferedCommand(): void;
279
-
280
-        /**
281
-         * Initializes a history log file for the REPL instance. When executing the
282
-         * Node.js binary and using the command line REPL, a history file is initialized
283
-         * by default. However, this is not the case when creating a REPL
284
-         * programmatically. Use this method to initialize a history log file when working
285
-         * with REPL instances programmatically.
286
-         * @param path The path to the history file
287
-         */
288
-        setupHistory(path: string, cb: (err: Error | null, repl: this) => void): void;
289
-
290
-        /**
291
-         * events.EventEmitter
292
-         * 1. close - inherited from `readline.Interface`
293
-         * 2. line - inherited from `readline.Interface`
294
-         * 3. pause - inherited from `readline.Interface`
295
-         * 4. resume - inherited from `readline.Interface`
296
-         * 5. SIGCONT - inherited from `readline.Interface`
297
-         * 6. SIGINT - inherited from `readline.Interface`
298
-         * 7. SIGTSTP - inherited from `readline.Interface`
299
-         * 8. exit
300
-         * 9. reset
301
-         */
302
-
303
-        addListener(event: string, listener: (...args: any[]) => void): this;
304
-        addListener(event: "close", listener: () => void): this;
305
-        addListener(event: "line", listener: (input: string) => void): this;
306
-        addListener(event: "pause", listener: () => void): this;
307
-        addListener(event: "resume", listener: () => void): this;
308
-        addListener(event: "SIGCONT", listener: () => void): this;
309
-        addListener(event: "SIGINT", listener: () => void): this;
310
-        addListener(event: "SIGTSTP", listener: () => void): this;
311
-        addListener(event: "exit", listener: () => void): this;
312
-        addListener(event: "reset", listener: (context: Context) => void): this;
313
-
314
-        emit(event: string | symbol, ...args: any[]): boolean;
315
-        emit(event: "close"): boolean;
316
-        emit(event: "line", input: string): boolean;
317
-        emit(event: "pause"): boolean;
318
-        emit(event: "resume"): boolean;
319
-        emit(event: "SIGCONT"): boolean;
320
-        emit(event: "SIGINT"): boolean;
321
-        emit(event: "SIGTSTP"): boolean;
322
-        emit(event: "exit"): boolean;
323
-        emit(event: "reset", context: Context): boolean;
324
-
325
-        on(event: string, listener: (...args: any[]) => void): this;
326
-        on(event: "close", listener: () => void): this;
327
-        on(event: "line", listener: (input: string) => void): this;
328
-        on(event: "pause", listener: () => void): this;
329
-        on(event: "resume", listener: () => void): this;
330
-        on(event: "SIGCONT", listener: () => void): this;
331
-        on(event: "SIGINT", listener: () => void): this;
332
-        on(event: "SIGTSTP", listener: () => void): this;
333
-        on(event: "exit", listener: () => void): this;
334
-        on(event: "reset", listener: (context: Context) => void): this;
335
-
336
-        once(event: string, listener: (...args: any[]) => void): this;
337
-        once(event: "close", listener: () => void): this;
338
-        once(event: "line", listener: (input: string) => void): this;
339
-        once(event: "pause", listener: () => void): this;
340
-        once(event: "resume", listener: () => void): this;
341
-        once(event: "SIGCONT", listener: () => void): this;
342
-        once(event: "SIGINT", listener: () => void): this;
343
-        once(event: "SIGTSTP", listener: () => void): this;
344
-        once(event: "exit", listener: () => void): this;
345
-        once(event: "reset", listener: (context: Context) => void): this;
346
-
347
-        prependListener(event: string, listener: (...args: any[]) => void): this;
348
-        prependListener(event: "close", listener: () => void): this;
349
-        prependListener(event: "line", listener: (input: string) => void): this;
350
-        prependListener(event: "pause", listener: () => void): this;
351
-        prependListener(event: "resume", listener: () => void): this;
352
-        prependListener(event: "SIGCONT", listener: () => void): this;
353
-        prependListener(event: "SIGINT", listener: () => void): this;
354
-        prependListener(event: "SIGTSTP", listener: () => void): this;
355
-        prependListener(event: "exit", listener: () => void): this;
356
-        prependListener(event: "reset", listener: (context: Context) => void): this;
357
-
358
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
359
-        prependOnceListener(event: "close", listener: () => void): this;
360
-        prependOnceListener(event: "line", listener: (input: string) => void): this;
361
-        prependOnceListener(event: "pause", listener: () => void): this;
362
-        prependOnceListener(event: "resume", listener: () => void): this;
363
-        prependOnceListener(event: "SIGCONT", listener: () => void): this;
364
-        prependOnceListener(event: "SIGINT", listener: () => void): this;
365
-        prependOnceListener(event: "SIGTSTP", listener: () => void): this;
366
-        prependOnceListener(event: "exit", listener: () => void): this;
367
-        prependOnceListener(event: "reset", listener: (context: Context) => void): this;
368
-    }
369
-
370
-    /**
371
-     * A flag passed in the REPL options. Evaluates expressions in sloppy mode.
372
-     */
373
-    const REPL_MODE_SLOPPY: unique symbol;
374
-
375
-    /**
376
-     * A flag passed in the REPL options. Evaluates expressions in strict mode.
377
-     * This is equivalent to prefacing every repl statement with `'use strict'`.
378
-     */
379
-    const REPL_MODE_STRICT: unique symbol;
380
-
381
-    /**
382
-     * Creates and starts a `repl.REPLServer` instance.
383
-     *
384
-     * @param options The options for the `REPLServer`. If `options` is a string, then it specifies
385
-     * the input prompt.
386
-     */
387
-    function start(options?: string | ReplOptions): REPLServer;
388
-
389
-    /**
390
-     * Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
391
-     *
392
-     * @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_recoverable_errors
393
-     */
394
-    class Recoverable extends SyntaxError {
395
-        err: Error;
396
-
397
-        constructor(err: Error);
398
-    }
399
-}
... ...
@@ -1,359 +0,0 @@
1
-declare module 'node:stream' {
2
-    import Stream = require('stream');
3
-    export = Stream;
4
-}
5
-
6
-declare module 'stream' {
7
-    import EventEmitter = require('node:events');
8
-
9
-    class internal extends EventEmitter {
10
-        pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
11
-    }
12
-
13
-    namespace internal {
14
-        class Stream extends internal {
15
-            constructor(opts?: ReadableOptions);
16
-        }
17
-
18
-        interface ReadableOptions {
19
-            highWaterMark?: number;
20
-            encoding?: BufferEncoding;
21
-            objectMode?: boolean;
22
-            read?(this: Readable, size: number): void;
23
-            destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
24
-            autoDestroy?: boolean;
25
-        }
26
-
27
-        class Readable extends Stream implements NodeJS.ReadableStream {
28
-            /**
29
-             * A utility method for creating Readable Streams out of iterators.
30
-             */
31
-            static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
32
-
33
-            readable: boolean;
34
-            readonly readableEncoding: BufferEncoding | null;
35
-            readonly readableEnded: boolean;
36
-            readonly readableFlowing: boolean | null;
37
-            readonly readableHighWaterMark: number;
38
-            readonly readableLength: number;
39
-            readonly readableObjectMode: boolean;
40
-            destroyed: boolean;
41
-            constructor(opts?: ReadableOptions);
42
-            _read(size: number): void;
43
-            read(size?: number): any;
44
-            setEncoding(encoding: BufferEncoding): this;
45
-            pause(): this;
46
-            resume(): this;
47
-            isPaused(): boolean;
48
-            unpipe(destination?: NodeJS.WritableStream): this;
49
-            unshift(chunk: any, encoding?: BufferEncoding): void;
50
-            wrap(oldStream: NodeJS.ReadableStream): this;
51
-            push(chunk: any, encoding?: BufferEncoding): boolean;
52
-            _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
53
-            destroy(error?: Error): void;
54
-
55
-            /**
56
-             * Event emitter
57
-             * The defined events on documents including:
58
-             * 1. close
59
-             * 2. data
60
-             * 3. end
61
-             * 4. error
62
-             * 5. pause
63
-             * 6. readable
64
-             * 7. resume
65
-             */
66
-            addListener(event: "close", listener: () => void): this;
67
-            addListener(event: "data", listener: (chunk: any) => void): this;
68
-            addListener(event: "end", listener: () => void): this;
69
-            addListener(event: "error", listener: (err: Error) => void): this;
70
-            addListener(event: "pause", listener: () => void): this;
71
-            addListener(event: "readable", listener: () => void): this;
72
-            addListener(event: "resume", listener: () => void): this;
73
-            addListener(event: string | symbol, listener: (...args: any[]) => void): this;
74
-
75
-            emit(event: "close"): boolean;
76
-            emit(event: "data", chunk: any): boolean;
77
-            emit(event: "end"): boolean;
78
-            emit(event: "error", err: Error): boolean;
79
-            emit(event: "pause"): boolean;
80
-            emit(event: "readable"): boolean;
81
-            emit(event: "resume"): boolean;
82
-            emit(event: string | symbol, ...args: any[]): boolean;
83
-
84
-            on(event: "close", listener: () => void): this;
85
-            on(event: "data", listener: (chunk: any) => void): this;
86
-            on(event: "end", listener: () => void): this;
87
-            on(event: "error", listener: (err: Error) => void): this;
88
-            on(event: "pause", listener: () => void): this;
89
-            on(event: "readable", listener: () => void): this;
90
-            on(event: "resume", listener: () => void): this;
91
-            on(event: string | symbol, listener: (...args: any[]) => void): this;
92
-
93
-            once(event: "close", listener: () => void): this;
94
-            once(event: "data", listener: (chunk: any) => void): this;
95
-            once(event: "end", listener: () => void): this;
96
-            once(event: "error", listener: (err: Error) => void): this;
97
-            once(event: "pause", listener: () => void): this;
98
-            once(event: "readable", listener: () => void): this;
99
-            once(event: "resume", listener: () => void): this;
100
-            once(event: string | symbol, listener: (...args: any[]) => void): this;
101
-
102
-            prependListener(event: "close", listener: () => void): this;
103
-            prependListener(event: "data", listener: (chunk: any) => void): this;
104
-            prependListener(event: "end", listener: () => void): this;
105
-            prependListener(event: "error", listener: (err: Error) => void): this;
106
-            prependListener(event: "pause", listener: () => void): this;
107
-            prependListener(event: "readable", listener: () => void): this;
108
-            prependListener(event: "resume", listener: () => void): this;
109
-            prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
110
-
111
-            prependOnceListener(event: "close", listener: () => void): this;
112
-            prependOnceListener(event: "data", listener: (chunk: any) => void): this;
113
-            prependOnceListener(event: "end", listener: () => void): this;
114
-            prependOnceListener(event: "error", listener: (err: Error) => void): this;
115
-            prependOnceListener(event: "pause", listener: () => void): this;
116
-            prependOnceListener(event: "readable", listener: () => void): this;
117
-            prependOnceListener(event: "resume", listener: () => void): this;
118
-            prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
119
-
120
-            removeListener(event: "close", listener: () => void): this;
121
-            removeListener(event: "data", listener: (chunk: any) => void): this;
122
-            removeListener(event: "end", listener: () => void): this;
123
-            removeListener(event: "error", listener: (err: Error) => void): this;
124
-            removeListener(event: "pause", listener: () => void): this;
125
-            removeListener(event: "readable", listener: () => void): this;
126
-            removeListener(event: "resume", listener: () => void): this;
127
-            removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
128
-
129
-            [Symbol.asyncIterator](): AsyncIterableIterator<any>;
130
-        }
131
-
132
-        interface WritableOptions {
133
-            highWaterMark?: number;
134
-            decodeStrings?: boolean;
135
-            defaultEncoding?: BufferEncoding;
136
-            objectMode?: boolean;
137
-            emitClose?: boolean;
138
-            write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
139
-            writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
140
-            destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
141
-            final?(this: Writable, callback: (error?: Error | null) => void): void;
142
-            autoDestroy?: boolean;
143
-        }
144
-
145
-        class Writable extends Stream implements NodeJS.WritableStream {
146
-            readonly writable: boolean;
147
-            readonly writableEnded: boolean;
148
-            readonly writableFinished: boolean;
149
-            readonly writableHighWaterMark: number;
150
-            readonly writableLength: number;
151
-            readonly writableObjectMode: boolean;
152
-            readonly writableCorked: number;
153
-            destroyed: boolean;
154
-            constructor(opts?: WritableOptions);
155
-            _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
156
-            _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
157
-            _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
158
-            _final(callback: (error?: Error | null) => void): void;
159
-            write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
160
-            write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
161
-            setDefaultEncoding(encoding: BufferEncoding): this;
162
-            end(cb?: () => void): void;
163
-            end(chunk: any, cb?: () => void): void;
164
-            end(chunk: any, encoding: BufferEncoding, cb?: () => void): void;
165
-            cork(): void;
166
-            uncork(): void;
167
-            destroy(error?: Error): void;
168
-
169
-            /**
170
-             * Event emitter
171
-             * The defined events on documents including:
172
-             * 1. close
173
-             * 2. drain
174
-             * 3. error
175
-             * 4. finish
176
-             * 5. pipe
177
-             * 6. unpipe
178
-             */
179
-            addListener(event: "close", listener: () => void): this;
180
-            addListener(event: "drain", listener: () => void): this;
181
-            addListener(event: "error", listener: (err: Error) => void): this;
182
-            addListener(event: "finish", listener: () => void): this;
183
-            addListener(event: "pipe", listener: (src: Readable) => void): this;
184
-            addListener(event: "unpipe", listener: (src: Readable) => void): this;
185
-            addListener(event: string | symbol, listener: (...args: any[]) => void): this;
186
-
187
-            emit(event: "close"): boolean;
188
-            emit(event: "drain"): boolean;
189
-            emit(event: "error", err: Error): boolean;
190
-            emit(event: "finish"): boolean;
191
-            emit(event: "pipe", src: Readable): boolean;
192
-            emit(event: "unpipe", src: Readable): boolean;
193
-            emit(event: string | symbol, ...args: any[]): boolean;
194
-
195
-            on(event: "close", listener: () => void): this;
196
-            on(event: "drain", listener: () => void): this;
197
-            on(event: "error", listener: (err: Error) => void): this;
198
-            on(event: "finish", listener: () => void): this;
199
-            on(event: "pipe", listener: (src: Readable) => void): this;
200
-            on(event: "unpipe", listener: (src: Readable) => void): this;
201
-            on(event: string | symbol, listener: (...args: any[]) => void): this;
202
-
203
-            once(event: "close", listener: () => void): this;
204
-            once(event: "drain", listener: () => void): this;
205
-            once(event: "error", listener: (err: Error) => void): this;
206
-            once(event: "finish", listener: () => void): this;
207
-            once(event: "pipe", listener: (src: Readable) => void): this;
208
-            once(event: "unpipe", listener: (src: Readable) => void): this;
209
-            once(event: string | symbol, listener: (...args: any[]) => void): this;
210
-
211
-            prependListener(event: "close", listener: () => void): this;
212
-            prependListener(event: "drain", listener: () => void): this;
213
-            prependListener(event: "error", listener: (err: Error) => void): this;
214
-            prependListener(event: "finish", listener: () => void): this;
215
-            prependListener(event: "pipe", listener: (src: Readable) => void): this;
216
-            prependListener(event: "unpipe", listener: (src: Readable) => void): this;
217
-            prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
218
-
219
-            prependOnceListener(event: "close", listener: () => void): this;
220
-            prependOnceListener(event: "drain", listener: () => void): this;
221
-            prependOnceListener(event: "error", listener: (err: Error) => void): this;
222
-            prependOnceListener(event: "finish", listener: () => void): this;
223
-            prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
224
-            prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
225
-            prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
226
-
227
-            removeListener(event: "close", listener: () => void): this;
228
-            removeListener(event: "drain", listener: () => void): this;
229
-            removeListener(event: "error", listener: (err: Error) => void): this;
230
-            removeListener(event: "finish", listener: () => void): this;
231
-            removeListener(event: "pipe", listener: (src: Readable) => void): this;
232
-            removeListener(event: "unpipe", listener: (src: Readable) => void): this;
233
-            removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
234
-        }
235
-
236
-        interface DuplexOptions extends ReadableOptions, WritableOptions {
237
-            allowHalfOpen?: boolean;
238
-            readableObjectMode?: boolean;
239
-            writableObjectMode?: boolean;
240
-            readableHighWaterMark?: number;
241
-            writableHighWaterMark?: number;
242
-            writableCorked?: number;
243
-            read?(this: Duplex, size: number): void;
244
-            write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
245
-            writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
246
-            final?(this: Duplex, callback: (error?: Error | null) => void): void;
247
-            destroy?(this: Duplex, error: Error | null, callback: (error: Error | null) => void): void;
248
-        }
249
-
250
-        // Note: Duplex extends both Readable and Writable.
251
-        class Duplex extends Readable implements Writable {
252
-            readonly writable: boolean;
253
-            readonly writableEnded: boolean;
254
-            readonly writableFinished: boolean;
255
-            readonly writableHighWaterMark: number;
256
-            readonly writableLength: number;
257
-            readonly writableObjectMode: boolean;
258
-            readonly writableCorked: number;
259
-            constructor(opts?: DuplexOptions);
260
-            _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
261
-            _writev?(chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
262
-            _destroy(error: Error | null, callback: (error: Error | null) => void): void;
263
-            _final(callback: (error?: Error | null) => void): void;
264
-            write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
265
-            write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
266
-            setDefaultEncoding(encoding: BufferEncoding): this;
267
-            end(cb?: () => void): void;
268
-            end(chunk: any, cb?: () => void): void;
269
-            end(chunk: any, encoding?: BufferEncoding, cb?: () => void): void;
270
-            cork(): void;
271
-            uncork(): void;
272
-        }
273
-
274
-        type TransformCallback = (error?: Error | null, data?: any) => void;
275
-
276
-        interface TransformOptions extends DuplexOptions {
277
-            read?(this: Transform, size: number): void;
278
-            write?(this: Transform, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
279
-            writev?(this: Transform, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
280
-            final?(this: Transform, callback: (error?: Error | null) => void): void;
281
-            destroy?(this: Transform, error: Error | null, callback: (error: Error | null) => void): void;
282
-            transform?(this: Transform, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
283
-            flush?(this: Transform, callback: TransformCallback): void;
284
-        }
285
-
286
-        class Transform extends Duplex {
287
-            constructor(opts?: TransformOptions);
288
-            _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
289
-            _flush(callback: TransformCallback): void;
290
-        }
291
-
292
-        class PassThrough extends Transform { }
293
-
294
-        interface FinishedOptions {
295
-            error?: boolean;
296
-            readable?: boolean;
297
-            writable?: boolean;
298
-        }
299
-        function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
300
-        function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
301
-        namespace finished {
302
-            function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
303
-        }
304
-
305
-        function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
306
-        function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
307
-        function pipeline<T extends NodeJS.WritableStream>(
308
-            stream1: NodeJS.ReadableStream,
309
-            stream2: NodeJS.ReadWriteStream,
310
-            stream3: NodeJS.ReadWriteStream,
311
-            stream4: T,
312
-            callback?: (err: NodeJS.ErrnoException | null) => void,
313
-        ): T;
314
-        function pipeline<T extends NodeJS.WritableStream>(
315
-            stream1: NodeJS.ReadableStream,
316
-            stream2: NodeJS.ReadWriteStream,
317
-            stream3: NodeJS.ReadWriteStream,
318
-            stream4: NodeJS.ReadWriteStream,
319
-            stream5: T,
320
-            callback?: (err: NodeJS.ErrnoException | null) => void,
321
-        ): T;
322
-        function pipeline(
323
-            streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
324
-            callback?: (err: NodeJS.ErrnoException | null) => void,
325
-        ): NodeJS.WritableStream;
326
-        function pipeline(
327
-            stream1: NodeJS.ReadableStream,
328
-            stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
329
-            ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
330
-        ): NodeJS.WritableStream;
331
-        namespace pipeline {
332
-            function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
333
-            function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.WritableStream): Promise<void>;
334
-            function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: NodeJS.ReadWriteStream, stream4: NodeJS.WritableStream): Promise<void>;
335
-            function __promisify__(
336
-                stream1: NodeJS.ReadableStream,
337
-                stream2: NodeJS.ReadWriteStream,
338
-                stream3: NodeJS.ReadWriteStream,
339
-                stream4: NodeJS.ReadWriteStream,
340
-                stream5: NodeJS.WritableStream,
341
-            ): Promise<void>;
342
-            function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
343
-            function __promisify__(
344
-                stream1: NodeJS.ReadableStream,
345
-                stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
346
-                ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream>,
347
-            ): Promise<void>;
348
-        }
349
-
350
-        interface Pipe {
351
-            close(): void;
352
-            hasRef(): boolean;
353
-            ref(): void;
354
-            unref(): void;
355
-        }
356
-    }
357
-
358
-    export = internal;
359
-}
... ...
@@ -1,11 +0,0 @@
1
-declare module 'node:string_decoder' {
2
-    export * from 'string_decoder';
3
-}
4
-
5
-declare module 'string_decoder' {
6
-    class StringDecoder {
7
-        constructor(encoding?: BufferEncoding);
8
-        write(buffer: Buffer): string;
9
-        end(buffer?: Buffer): string;
10
-    }
11
-}
... ...
@@ -1,20 +0,0 @@
1
-declare module 'node:timers' {
2
-    export * from 'timers';
3
-}
4
-
5
-declare module 'timers' {
6
-    function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
7
-    namespace setTimeout {
8
-        function __promisify__(ms: number): Promise<void>;
9
-        function __promisify__<T>(ms: number, value: T): Promise<T>;
10
-    }
11
-    function clearTimeout(timeoutId: NodeJS.Timeout): void;
12
-    function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
13
-    function clearInterval(intervalId: NodeJS.Timeout): void;
14
-    function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
15
-    namespace setImmediate {
16
-        function __promisify__(): Promise<void>;
17
-        function __promisify__<T>(value: T): Promise<T>;
18
-    }
19
-    function clearImmediate(immediateId: NodeJS.Immediate): void;
20
-}
... ...
@@ -1,783 +0,0 @@
1
-declare module 'node:tls' {
2
-    export * from 'tls';
3
-}
4
-
5
-declare module 'tls' {
6
-    import * as net from 'node:net';
7
-
8
-    const CLIENT_RENEG_LIMIT: number;
9
-    const CLIENT_RENEG_WINDOW: number;
10
-
11
-    interface Certificate {
12
-        /**
13
-         * Country code.
14
-         */
15
-        C: string;
16
-        /**
17
-         * Street.
18
-         */
19
-        ST: string;
20
-        /**
21
-         * Locality.
22
-         */
23
-        L: string;
24
-        /**
25
-         * Organization.
26
-         */
27
-        O: string;
28
-        /**
29
-         * Organizational unit.
30
-         */
31
-        OU: string;
32
-        /**
33
-         * Common name.
34
-         */
35
-        CN: string;
36
-    }
37
-
38
-    interface PeerCertificate {
39
-        subject: Certificate;
40
-        issuer: Certificate;
41
-        subjectaltname: string;
42
-        infoAccess: NodeJS.Dict<string[]>;
43
-        modulus: string;
44
-        exponent: string;
45
-        valid_from: string;
46
-        valid_to: string;
47
-        fingerprint: string;
48
-        fingerprint256: string;
49
-        ext_key_usage: string[];
50
-        serialNumber: string;
51
-        raw: Buffer;
52
-    }
53
-
54
-    interface DetailedPeerCertificate extends PeerCertificate {
55
-        issuerCertificate: DetailedPeerCertificate;
56
-    }
57
-
58
-    interface CipherNameAndProtocol {
59
-        /**
60
-         * The cipher name.
61
-         */
62
-        name: string;
63
-        /**
64
-         * SSL/TLS protocol version.
65
-         */
66
-        version: string;
67
-
68
-        /**
69
-         * IETF name for the cipher suite.
70
-         */
71
-        standardName: string;
72
-    }
73
-
74
-    interface EphemeralKeyInfo {
75
-        /**
76
-         * The supported types are 'DH' and 'ECDH'.
77
-         */
78
-        type: string;
79
-        /**
80
-         * The name property is available only when type is 'ECDH'.
81
-         */
82
-        name?: string;
83
-        /**
84
-         * The size of parameter of an ephemeral key exchange.
85
-         */
86
-        size: number;
87
-    }
88
-
89
-    interface KeyObject {
90
-        /**
91
-         * Private keys in PEM format.
92
-         */
93
-        pem: string | Buffer;
94
-        /**
95
-         * Optional passphrase.
96
-         */
97
-        passphrase?: string;
98
-    }
99
-
100
-    interface PxfObject {
101
-        /**
102
-         * PFX or PKCS12 encoded private key and certificate chain.
103
-         */
104
-        buf: string | Buffer;
105
-        /**
106
-         * Optional passphrase.
107
-         */
108
-        passphrase?: string;
109
-    }
110
-
111
-    interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
112
-        /**
113
-         * If true the TLS socket will be instantiated in server-mode.
114
-         * Defaults to false.
115
-         */
116
-        isServer?: boolean;
117
-        /**
118
-         * An optional net.Server instance.
119
-         */
120
-        server?: net.Server;
121
-
122
-        /**
123
-         * An optional Buffer instance containing a TLS session.
124
-         */
125
-        session?: Buffer;
126
-        /**
127
-         * If true, specifies that the OCSP status request extension will be
128
-         * added to the client hello and an 'OCSPResponse' event will be
129
-         * emitted on the socket before establishing a secure communication
130
-         */
131
-        requestOCSP?: boolean;
132
-    }
133
-
134
-    class TLSSocket extends net.Socket {
135
-        /**
136
-         * Construct a new tls.TLSSocket object from an existing TCP socket.
137
-         */
138
-        constructor(socket: net.Socket, options?: TLSSocketOptions);
139
-
140
-        /**
141
-         * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.
142
-         */
143
-        authorized: boolean;
144
-        /**
145
-         * The reason why the peer's certificate has not been verified.
146
-         * This property becomes available only when tlsSocket.authorized === false.
147
-         */
148
-        authorizationError: Error;
149
-        /**
150
-         * Static boolean value, always true.
151
-         * May be used to distinguish TLS sockets from regular ones.
152
-         */
153
-        encrypted: boolean;
154
-
155
-        /**
156
-         * String containing the selected ALPN protocol.
157
-         * When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
158
-         */
159
-        alpnProtocol?: string;
160
-
161
-        /**
162
-         * Returns an object representing the local certificate. The returned
163
-         * object has some properties corresponding to the fields of the
164
-         * certificate.
165
-         *
166
-         * See tls.TLSSocket.getPeerCertificate() for an example of the
167
-         * certificate structure.
168
-         *
169
-         * If there is no local certificate, an empty object will be returned.
170
-         * If the socket has been destroyed, null will be returned.
171
-         */
172
-        getCertificate(): PeerCertificate | object | null;
173
-        /**
174
-         * Returns an object representing the cipher name and the SSL/TLS protocol version of the current connection.
175
-         * @returns Returns an object representing the cipher name
176
-         * and the SSL/TLS protocol version of the current connection.
177
-         */
178
-        getCipher(): CipherNameAndProtocol;
179
-        /**
180
-         * Returns an object representing the type, name, and size of parameter
181
-         * of an ephemeral key exchange in Perfect Forward Secrecy on a client
182
-         * connection. It returns an empty object when the key exchange is not
183
-         * ephemeral. As this is only supported on a client socket; null is
184
-         * returned if called on a server socket. The supported types are 'DH'
185
-         * and 'ECDH'. The name property is available only when type is 'ECDH'.
186
-         *
187
-         * For example: { type: 'ECDH', name: 'prime256v1', size: 256 }.
188
-         */
189
-        getEphemeralKeyInfo(): EphemeralKeyInfo | object | null;
190
-        /**
191
-         * Returns the latest Finished message that has
192
-         * been sent to the socket as part of a SSL/TLS handshake, or undefined
193
-         * if no Finished message has been sent yet.
194
-         *
195
-         * As the Finished messages are message digests of the complete
196
-         * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
197
-         * 3.0), they can be used for external authentication procedures when
198
-         * the authentication provided by SSL/TLS is not desired or is not
199
-         * enough.
200
-         *
201
-         * Corresponds to the SSL_get_finished routine in OpenSSL and may be
202
-         * used to implement the tls-unique channel binding from RFC 5929.
203
-         */
204
-        getFinished(): Buffer | undefined;
205
-        /**
206
-         * Returns an object representing the peer's certificate.
207
-         * The returned object has some properties corresponding to the field of the certificate.
208
-         * If detailed argument is true the full chain with issuer property will be returned,
209
-         * if false only the top certificate without issuer property.
210
-         * If the peer does not provide a certificate, it returns null or an empty object.
211
-         * @param detailed - If true; the full chain with issuer property will be returned.
212
-         * @returns An object representing the peer's certificate.
213
-         */
214
-        getPeerCertificate(detailed: true): DetailedPeerCertificate;
215
-        getPeerCertificate(detailed?: false): PeerCertificate;
216
-        getPeerCertificate(detailed?: boolean): PeerCertificate | DetailedPeerCertificate;
217
-        /**
218
-         * Returns the latest Finished message that is expected or has actually
219
-         * been received from the socket as part of a SSL/TLS handshake, or
220
-         * undefined if there is no Finished message so far.
221
-         *
222
-         * As the Finished messages are message digests of the complete
223
-         * handshake (with a total of 192 bits for TLS 1.0 and more for SSL
224
-         * 3.0), they can be used for external authentication procedures when
225
-         * the authentication provided by SSL/TLS is not desired or is not
226
-         * enough.
227
-         *
228
-         * Corresponds to the SSL_get_peer_finished routine in OpenSSL and may
229
-         * be used to implement the tls-unique channel binding from RFC 5929.
230
-         */
231
-        getPeerFinished(): Buffer | undefined;
232
-        /**
233
-         * Returns a string containing the negotiated SSL/TLS protocol version of the current connection.
234
-         * The value `'unknown'` will be returned for connected sockets that have not completed the handshaking process.
235
-         * The value `null` will be returned for server sockets or disconnected client sockets.
236
-         * See https://www.openssl.org/docs/man1.0.2/ssl/SSL_get_version.html for more information.
237
-         * @returns negotiated SSL/TLS protocol version of the current connection
238
-         */
239
-        getProtocol(): string | null;
240
-        /**
241
-         * Could be used to speed up handshake establishment when reconnecting to the server.
242
-         * @returns ASN.1 encoded TLS session or undefined if none was negotiated.
243
-         */
244
-        getSession(): Buffer | undefined;
245
-        /**
246
-         * Returns a list of signature algorithms shared between the server and
247
-         * the client in the order of decreasing preference.
248
-         */
249
-        getSharedSigalgs(): string[];
250
-        /**
251
-         * NOTE: Works only with client TLS sockets.
252
-         * Useful only for debugging, for session reuse provide session option to tls.connect().
253
-         * @returns TLS session ticket or undefined if none was negotiated.
254
-         */
255
-        getTLSTicket(): Buffer | undefined;
256
-        /**
257
-         * Returns true if the session was reused, false otherwise.
258
-         */
259
-        isSessionReused(): boolean;
260
-        /**
261
-         * Initiate TLS renegotiation process.
262
-         *
263
-         * NOTE: Can be used to request peer's certificate after the secure connection has been established.
264
-         * ANOTHER NOTE: When running as the server, socket will be destroyed with an error after handshakeTimeout timeout.
265
-         * @param options - The options may contain the following fields: rejectUnauthorized,
266
-         * requestCert (See tls.createServer() for details).
267
-         * @param callback - callback(err) will be executed with null as err, once the renegotiation
268
-         * is successfully completed.
269
-         * @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
270
-         */
271
-        renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean;
272
-        /**
273
-         * Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
274
-         * Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
275
-         * the TLS layer until the entire fragment is received and its integrity is verified;
276
-         * large fragments can span multiple roundtrips, and their processing can be delayed due to packet
277
-         * loss or reordering. However, smaller fragments add extra TLS framing bytes and CPU overhead,
278
-         * which may decrease overall server throughput.
279
-         * @param size - TLS fragment size (default and maximum value is: 16384, minimum is: 512).
280
-         * @returns Returns true on success, false otherwise.
281
-         */
282
-        setMaxSendFragment(size: number): boolean;
283
-
284
-        /**
285
-         * Disables TLS renegotiation for this TLSSocket instance. Once called,
286
-         * attempts to renegotiate will trigger an 'error' event on the
287
-         * TLSSocket.
288
-         */
289
-        disableRenegotiation(): void;
290
-
291
-        /**
292
-         * When enabled, TLS packet trace information is written to `stderr`. This can be
293
-         * used to debug TLS connection problems.
294
-         *
295
-         * Note: The format of the output is identical to the output of `openssl s_client
296
-         * -trace` or `openssl s_server -trace`. While it is produced by OpenSSL's
297
-         * `SSL_trace()` function, the format is undocumented, can change without notice,
298
-         * and should not be relied on.
299
-         */
300
-        enableTrace(): void;
301
-
302
-        /**
303
-         * @param length number of bytes to retrieve from keying material
304
-         * @param label an application specific label, typically this will be a value from the
305
-         * [IANA Exporter Label Registry](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels).
306
-         * @param context optionally provide a context.
307
-         */
308
-        exportKeyingMaterial(length: number, label: string, context: Buffer): Buffer;
309
-
310
-        addListener(event: string, listener: (...args: any[]) => void): this;
311
-        addListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
312
-        addListener(event: "secureConnect", listener: () => void): this;
313
-        addListener(event: "session", listener: (session: Buffer) => void): this;
314
-        addListener(event: "keylog", listener: (line: Buffer) => void): this;
315
-
316
-        emit(event: string | symbol, ...args: any[]): boolean;
317
-        emit(event: "OCSPResponse", response: Buffer): boolean;
318
-        emit(event: "secureConnect"): boolean;
319
-        emit(event: "session", session: Buffer): boolean;
320
-        emit(event: "keylog", line: Buffer): boolean;
321
-
322
-        on(event: string, listener: (...args: any[]) => void): this;
323
-        on(event: "OCSPResponse", listener: (response: Buffer) => void): this;
324
-        on(event: "secureConnect", listener: () => void): this;
325
-        on(event: "session", listener: (session: Buffer) => void): this;
326
-        on(event: "keylog", listener: (line: Buffer) => void): this;
327
-
328
-        once(event: string, listener: (...args: any[]) => void): this;
329
-        once(event: "OCSPResponse", listener: (response: Buffer) => void): this;
330
-        once(event: "secureConnect", listener: () => void): this;
331
-        once(event: "session", listener: (session: Buffer) => void): this;
332
-        once(event: "keylog", listener: (line: Buffer) => void): this;
333
-
334
-        prependListener(event: string, listener: (...args: any[]) => void): this;
335
-        prependListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
336
-        prependListener(event: "secureConnect", listener: () => void): this;
337
-        prependListener(event: "session", listener: (session: Buffer) => void): this;
338
-        prependListener(event: "keylog", listener: (line: Buffer) => void): this;
339
-
340
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
341
-        prependOnceListener(event: "OCSPResponse", listener: (response: Buffer) => void): this;
342
-        prependOnceListener(event: "secureConnect", listener: () => void): this;
343
-        prependOnceListener(event: "session", listener: (session: Buffer) => void): this;
344
-        prependOnceListener(event: "keylog", listener: (line: Buffer) => void): this;
345
-    }
346
-
347
-    interface CommonConnectionOptions {
348
-        /**
349
-         * An optional TLS context object from tls.createSecureContext()
350
-         */
351
-        secureContext?: SecureContext;
352
-
353
-        /**
354
-         * When enabled, TLS packet trace information is written to `stderr`. This can be
355
-         * used to debug TLS connection problems.
356
-         * @default false
357
-         */
358
-        enableTrace?: boolean;
359
-        /**
360
-         * If true the server will request a certificate from clients that
361
-         * connect and attempt to verify that certificate. Defaults to
362
-         * false.
363
-         */
364
-        requestCert?: boolean;
365
-        /**
366
-         * An array of strings or a Buffer naming possible ALPN protocols.
367
-         * (Protocols should be ordered by their priority.)
368
-         */
369
-        ALPNProtocols?: string[] | Uint8Array[] | Uint8Array;
370
-        /**
371
-         * SNICallback(servername, cb) <Function> A function that will be
372
-         * called if the client supports SNI TLS extension. Two arguments
373
-         * will be passed when called: servername and cb. SNICallback should
374
-         * invoke cb(null, ctx), where ctx is a SecureContext instance.
375
-         * (tls.createSecureContext(...) can be used to get a proper
376
-         * SecureContext.) If SNICallback wasn't provided the default callback
377
-         * with high-level API will be used (see below).
378
-         */
379
-        SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
380
-        /**
381
-         * If true the server will reject any connection which is not
382
-         * authorized with the list of supplied CAs. This option only has an
383
-         * effect if requestCert is true.
384
-         * @default true
385
-         */
386
-        rejectUnauthorized?: boolean;
387
-    }
388
-
389
-    interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
390
-        /**
391
-         * Abort the connection if the SSL/TLS handshake does not finish in the
392
-         * specified number of milliseconds. A 'tlsClientError' is emitted on
393
-         * the tls.Server object whenever a handshake times out. Default:
394
-         * 120000 (120 seconds).
395
-         */
396
-        handshakeTimeout?: number;
397
-        /**
398
-         * The number of seconds after which a TLS session created by the
399
-         * server will no longer be resumable. See Session Resumption for more
400
-         * information. Default: 300.
401
-         */
402
-        sessionTimeout?: number;
403
-        /**
404
-         * 48-bytes of cryptographically strong pseudo-random data.
405
-         */
406
-        ticketKeys?: Buffer;
407
-
408
-        /**
409
-         *
410
-         * @param socket
411
-         * @param identity identity parameter sent from the client.
412
-         * @return pre-shared key that must either be
413
-         * a buffer or `null` to stop the negotiation process. Returned PSK must be
414
-         * compatible with the selected cipher's digest.
415
-         *
416
-         * When negotiating TLS-PSK (pre-shared keys), this function is called
417
-         * with the identity provided by the client.
418
-         * If the return value is `null` the negotiation process will stop and an
419
-         * "unknown_psk_identity" alert message will be sent to the other party.
420
-         * If the server wishes to hide the fact that the PSK identity was not known,
421
-         * the callback must provide some random data as `psk` to make the connection
422
-         * fail with "decrypt_error" before negotiation is finished.
423
-         * PSK ciphers are disabled by default, and using TLS-PSK thus
424
-         * requires explicitly specifying a cipher suite with the `ciphers` option.
425
-         * More information can be found in the RFC 4279.
426
-         */
427
-
428
-        pskCallback?(socket: TLSSocket, identity: string): DataView | NodeJS.TypedArray | null;
429
-        /**
430
-         * hint to send to a client to help
431
-         * with selecting the identity during TLS-PSK negotiation. Will be ignored
432
-         * in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
433
-         * emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
434
-         */
435
-        pskIdentityHint?: string;
436
-    }
437
-
438
-    interface PSKCallbackNegotation {
439
-        psk: DataView | NodeJS.TypedArray;
440
-        identity: string;
441
-    }
442
-
443
-    interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
444
-        host?: string;
445
-        port?: number;
446
-        path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
447
-        socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
448
-        checkServerIdentity?: typeof checkServerIdentity;
449
-        servername?: string; // SNI TLS Extension
450
-        session?: Buffer;
451
-        minDHSize?: number;
452
-        lookup?: net.LookupFunction;
453
-        timeout?: number;
454
-        /**
455
-         * When negotiating TLS-PSK (pre-shared keys), this function is called
456
-         * with optional identity `hint` provided by the server or `null`
457
-         * in case of TLS 1.3 where `hint` was removed.
458
-         * It will be necessary to provide a custom `tls.checkServerIdentity()`
459
-         * for the connection as the default one will try to check hostname/IP
460
-         * of the server against the certificate but that's not applicable for PSK
461
-         * because there won't be a certificate present.
462
-         * More information can be found in the RFC 4279.
463
-         *
464
-         * @param hint message sent from the server to help client
465
-         * decide which identity to use during negotiation.
466
-         * Always `null` if TLS 1.3 is used.
467
-         * @returns Return `null` to stop the negotiation process. `psk` must be
468
-         * compatible with the selected cipher's digest.
469
-         * `identity` must use UTF-8 encoding.
470
-         */
471
-        pskCallback?(hint: string | null): PSKCallbackNegotation | null;
472
-    }
473
-
474
-    class Server extends net.Server {
475
-        constructor(secureConnectionListener?: (socket: TLSSocket) => void);
476
-        constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
477
-
478
-        /**
479
-         * The server.addContext() method adds a secure context that will be
480
-         * used if the client request's SNI name matches the supplied hostname
481
-         * (or wildcard).
482
-         */
483
-        addContext(hostName: string, credentials: SecureContextOptions): void;
484
-        /**
485
-         * Returns the session ticket keys.
486
-         */
487
-        getTicketKeys(): Buffer;
488
-        /**
489
-         *
490
-         * The server.setSecureContext() method replaces the
491
-         * secure context of an existing server. Existing connections to the
492
-         * server are not interrupted.
493
-         */
494
-        setSecureContext(details: SecureContextOptions): void;
495
-        /**
496
-         * The server.setSecureContext() method replaces the secure context of
497
-         * an existing server. Existing connections to the server are not
498
-         * interrupted.
499
-         */
500
-        setTicketKeys(keys: Buffer): void;
501
-
502
-        /**
503
-         * events.EventEmitter
504
-         * 1. tlsClientError
505
-         * 2. newSession
506
-         * 3. OCSPRequest
507
-         * 4. resumeSession
508
-         * 5. secureConnection
509
-         * 6. keylog
510
-         */
511
-        addListener(event: string, listener: (...args: any[]) => void): this;
512
-        addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
513
-        addListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
514
-        addListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
515
-        addListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
516
-        addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
517
-        addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
518
-
519
-        emit(event: string | symbol, ...args: any[]): boolean;
520
-        emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
521
-        emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
522
-        emit(event: "OCSPRequest", certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
523
-        emit(event: "resumeSession", sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
524
-        emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
525
-        emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;
526
-
527
-        on(event: string, listener: (...args: any[]) => void): this;
528
-        on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
529
-        on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
530
-        on(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
531
-        on(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
532
-        on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
533
-        on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
534
-
535
-        once(event: string, listener: (...args: any[]) => void): this;
536
-        once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
537
-        once(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
538
-        once(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
539
-        once(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
540
-        once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
541
-        once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
542
-
543
-        prependListener(event: string, listener: (...args: any[]) => void): this;
544
-        prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
545
-        prependListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
546
-        prependListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
547
-        prependListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
548
-        prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
549
-        prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
550
-
551
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
552
-        prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
553
-        prependOnceListener(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
554
-        prependOnceListener(event: "OCSPRequest", listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
555
-        prependOnceListener(event: "resumeSession", listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
556
-        prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
557
-        prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
558
-    }
559
-
560
-    interface SecurePair {
561
-        encrypted: TLSSocket;
562
-        cleartext: TLSSocket;
563
-    }
564
-
565
-    type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
566
-
567
-    interface SecureContextOptions {
568
-        /**
569
-         * Optionally override the trusted CA certificates. Default is to trust
570
-         * the well-known CAs curated by Mozilla. Mozilla's CAs are completely
571
-         * replaced when CAs are explicitly specified using this option.
572
-         */
573
-        ca?: string | Buffer | Array<string | Buffer>;
574
-        /**
575
-         *  Cert chains in PEM format. One cert chain should be provided per
576
-         *  private key. Each cert chain should consist of the PEM formatted
577
-         *  certificate for a provided private key, followed by the PEM
578
-         *  formatted intermediate certificates (if any), in order, and not
579
-         *  including the root CA (the root CA must be pre-known to the peer,
580
-         *  see ca). When providing multiple cert chains, they do not have to
581
-         *  be in the same order as their private keys in key. If the
582
-         *  intermediate certificates are not provided, the peer will not be
583
-         *  able to validate the certificate, and the handshake will fail.
584
-         */
585
-        cert?: string | Buffer | Array<string | Buffer>;
586
-        /**
587
-         *  Colon-separated list of supported signature algorithms. The list
588
-         *  can contain digest algorithms (SHA256, MD5 etc.), public key
589
-         *  algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
590
-         *  'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
591
-         */
592
-        sigalgs?: string;
593
-        /**
594
-         * Cipher suite specification, replacing the default. For more
595
-         * information, see modifying the default cipher suite. Permitted
596
-         * ciphers can be obtained via tls.getCiphers(). Cipher names must be
597
-         * uppercased in order for OpenSSL to accept them.
598
-         */
599
-        ciphers?: string;
600
-        /**
601
-         * Name of an OpenSSL engine which can provide the client certificate.
602
-         */
603
-        clientCertEngine?: string;
604
-        /**
605
-         * PEM formatted CRLs (Certificate Revocation Lists).
606
-         */
607
-        crl?: string | Buffer | Array<string | Buffer>;
608
-        /**
609
-         * Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
610
-         * openssl dhparam to create the parameters. The key length must be
611
-         * greater than or equal to 1024 bits or else an error will be thrown.
612
-         * Although 1024 bits is permissible, use 2048 bits or larger for
613
-         * stronger security. If omitted or invalid, the parameters are
614
-         * silently discarded and DHE ciphers will not be available.
615
-         */
616
-        dhparam?: string | Buffer;
617
-        /**
618
-         * A string describing a named curve or a colon separated list of curve
619
-         * NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
620
-         * agreement. Set to auto to select the curve automatically. Use
621
-         * crypto.getCurves() to obtain a list of available curve names. On
622
-         * recent releases, openssl ecparam -list_curves will also display the
623
-         * name and description of each available elliptic curve. Default:
624
-         * tls.DEFAULT_ECDH_CURVE.
625
-         */
626
-        ecdhCurve?: string;
627
-        /**
628
-         * Attempt to use the server's cipher suite preferences instead of the
629
-         * client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
630
-         * set in secureOptions
631
-         */
632
-        honorCipherOrder?: boolean;
633
-        /**
634
-         * Private keys in PEM format. PEM allows the option of private keys
635
-         * being encrypted. Encrypted keys will be decrypted with
636
-         * options.passphrase. Multiple keys using different algorithms can be
637
-         * provided either as an array of unencrypted key strings or buffers,
638
-         * or an array of objects in the form {pem: <string|buffer>[,
639
-         * passphrase: <string>]}. The object form can only occur in an array.
640
-         * object.passphrase is optional. Encrypted keys will be decrypted with
641
-         * object.passphrase if provided, or options.passphrase if it is not.
642
-         */
643
-        key?: string | Buffer | Array<Buffer | KeyObject>;
644
-        /**
645
-         * Name of an OpenSSL engine to get private key from. Should be used
646
-         * together with privateKeyIdentifier.
647
-         */
648
-        privateKeyEngine?: string;
649
-        /**
650
-         * Identifier of a private key managed by an OpenSSL engine. Should be
651
-         * used together with privateKeyEngine. Should not be set together with
652
-         * key, because both options define a private key in different ways.
653
-         */
654
-        privateKeyIdentifier?: string;
655
-        /**
656
-         * Optionally set the maximum TLS version to allow. One
657
-         * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
658
-         * `secureProtocol` option, use one or the other.
659
-         * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
660
-         * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
661
-         * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
662
-         */
663
-        maxVersion?: SecureVersion;
664
-        /**
665
-         * Optionally set the minimum TLS version to allow. One
666
-         * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
667
-         * `secureProtocol` option, use one or the other.  It is not recommended to use
668
-         * less than TLSv1.2, but it may be required for interoperability.
669
-         * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
670
-         * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
671
-         * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
672
-         * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
673
-         */
674
-        minVersion?: SecureVersion;
675
-        /**
676
-         * Shared passphrase used for a single private key and/or a PFX.
677
-         */
678
-        passphrase?: string;
679
-        /**
680
-         * PFX or PKCS12 encoded private key and certificate chain. pfx is an
681
-         * alternative to providing key and cert individually. PFX is usually
682
-         * encrypted, if it is, passphrase will be used to decrypt it. Multiple
683
-         * PFX can be provided either as an array of unencrypted PFX buffers,
684
-         * or an array of objects in the form {buf: <string|buffer>[,
685
-         * passphrase: <string>]}. The object form can only occur in an array.
686
-         * object.passphrase is optional. Encrypted PFX will be decrypted with
687
-         * object.passphrase if provided, or options.passphrase if it is not.
688
-         */
689
-        pfx?: string | Buffer | Array<string | Buffer | PxfObject>;
690
-        /**
691
-         * Optionally affect the OpenSSL protocol behavior, which is not
692
-         * usually necessary. This should be used carefully if at all! Value is
693
-         * a numeric bitmask of the SSL_OP_* options from OpenSSL Options
694
-         */
695
-        secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options
696
-        /**
697
-         * Legacy mechanism to select the TLS protocol version to use, it does
698
-         * not support independent control of the minimum and maximum version,
699
-         * and does not support limiting the protocol to TLSv1.3. Use
700
-         * minVersion and maxVersion instead. The possible values are listed as
701
-         * SSL_METHODS, use the function names as strings. For example, use
702
-         * 'TLSv1_1_method' to force TLS version 1.1, or 'TLS_method' to allow
703
-         * any TLS protocol version up to TLSv1.3. It is not recommended to use
704
-         * TLS versions less than 1.2, but it may be required for
705
-         * interoperability. Default: none, see minVersion.
706
-         */
707
-        secureProtocol?: string;
708
-        /**
709
-         * Opaque identifier used by servers to ensure session state is not
710
-         * shared between applications. Unused by clients.
711
-         */
712
-        sessionIdContext?: string;
713
-        /**
714
-         * 48-bytes of cryptographically strong pseudo-random data.
715
-         * See Session Resumption for more information.
716
-         */
717
-        ticketKeys?: Buffer;
718
-        /**
719
-         * The number of seconds after which a TLS session created by the
720
-         * server will no longer be resumable. See Session Resumption for more
721
-         * information. Default: 300.
722
-         */
723
-        sessionTimeout?: number;
724
-    }
725
-
726
-    interface SecureContext {
727
-        context: any;
728
-    }
729
-
730
-    /*
731
-     * Verifies the certificate `cert` is issued to host `host`.
732
-     * @host The hostname to verify the certificate against
733
-     * @cert PeerCertificate representing the peer's certificate
734
-     *
735
-     * Returns Error object, populating it with the reason, host and cert on failure.  On success, returns undefined.
736
-     */
737
-    function checkServerIdentity(host: string, cert: PeerCertificate): Error | undefined;
738
-    function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
739
-    function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
740
-    function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
741
-    function connect(port: number, host?: string, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
742
-    function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
743
-    /**
744
-     * @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
745
-     */
746
-    function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
747
-    function createSecureContext(options?: SecureContextOptions): SecureContext;
748
-    function getCiphers(): string[];
749
-
750
-    /**
751
-     * The default curve name to use for ECDH key agreement in a tls server.
752
-     * The default value is 'auto'. See tls.createSecureContext() for further
753
-     * information.
754
-     */
755
-    let DEFAULT_ECDH_CURVE: string;
756
-    /**
757
-     * The default value of the maxVersion option of
758
-     * tls.createSecureContext(). It can be assigned any of the supported TLS
759
-     * protocol versions, 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default:
760
-     * 'TLSv1.3', unless changed using CLI options. Using --tls-max-v1.2 sets
761
-     * the default to 'TLSv1.2'. Using --tls-max-v1.3 sets the default to
762
-     * 'TLSv1.3'. If multiple of the options are provided, the highest maximum
763
-     * is used.
764
-     */
765
-    let DEFAULT_MAX_VERSION: SecureVersion;
766
-    /**
767
-     * The default value of the minVersion option of tls.createSecureContext().
768
-     * It can be assigned any of the supported TLS protocol versions,
769
-     * 'TLSv1.3', 'TLSv1.2', 'TLSv1.1', or 'TLSv1'. Default: 'TLSv1.2', unless
770
-     * changed using CLI options. Using --tls-min-v1.0 sets the default to
771
-     * 'TLSv1'. Using --tls-min-v1.1 sets the default to 'TLSv1.1'. Using
772
-     * --tls-min-v1.3 sets the default to 'TLSv1.3'. If multiple of the options
773
-     * are provided, the lowest minimum is used.
774
-     */
775
-    let DEFAULT_MIN_VERSION: SecureVersion;
776
-
777
-    /**
778
-     * An immutable array of strings representing the root certificates (in PEM
779
-     * format) used for verifying peer certificates. This is the default value
780
-     * of the ca option to tls.createSecureContext().
781
-     */
782
-    const rootCertificates: ReadonlyArray<string>;
783
-}
... ...
@@ -1,65 +0,0 @@
1
-declare module 'node:trace_events' {
2
-    export * from 'trace_events';
3
-}
4
-
5
-declare module 'trace_events' {
6
-    /**
7
-     * The `Tracing` object is used to enable or disable tracing for sets of
8
-     * categories. Instances are created using the
9
-     * `trace_events.createTracing()` method.
10
-     *
11
-     * When created, the `Tracing` object is disabled. Calling the
12
-     * `tracing.enable()` method adds the categories to the set of enabled trace
13
-     * event categories. Calling `tracing.disable()` will remove the categories
14
-     * from the set of enabled trace event categories.
15
-     */
16
-    interface Tracing {
17
-        /**
18
-         * A comma-separated list of the trace event categories covered by this
19
-         * `Tracing` object.
20
-         */
21
-        readonly categories: string;
22
-
23
-        /**
24
-         * Disables this `Tracing` object.
25
-         *
26
-         * Only trace event categories _not_ covered by other enabled `Tracing`
27
-         * objects and _not_ specified by the `--trace-event-categories` flag
28
-         * will be disabled.
29
-         */
30
-        disable(): void;
31
-
32
-        /**
33
-         * Enables this `Tracing` object for the set of categories covered by
34
-         * the `Tracing` object.
35
-         */
36
-        enable(): void;
37
-
38
-        /**
39
-         * `true` only if the `Tracing` object has been enabled.
40
-         */
41
-        readonly enabled: boolean;
42
-    }
43
-
44
-    interface CreateTracingOptions {
45
-        /**
46
-         * An array of trace category names. Values included in the array are
47
-         * coerced to a string when possible. An error will be thrown if the
48
-         * value cannot be coerced.
49
-         */
50
-        categories: string[];
51
-    }
52
-
53
-    /**
54
-     * Creates and returns a Tracing object for the given set of categories.
55
-     */
56
-    function createTracing(options: CreateTracingOptions): Tracing;
57
-
58
-    /**
59
-     * Returns a comma-separated list of all currently-enabled trace event
60
-     * categories. The current set of enabled trace event categories is
61
-     * determined by the union of all currently-enabled `Tracing` objects and
62
-     * any categories enabled using the `--trace-event-categories` flag.
63
-     */
64
-    function getEnabledCategories(): string | undefined;
65
-}
... ...
@@ -1,103 +0,0 @@
1
-declare module 'node:assert' {
2
-    import assert = require('assert');
3
-    export = assert;
4
-}
5
-
6
-declare module 'assert' {
7
-    /** An alias of `assert.ok()`. */
8
-    function assert(value: any, message?: string | Error): void;
9
-    namespace assert {
10
-        class AssertionError extends Error {
11
-            actual: any;
12
-            expected: any;
13
-            operator: string;
14
-            generatedMessage: boolean;
15
-            code: 'ERR_ASSERTION';
16
-
17
-            constructor(options?: {
18
-                /** If provided, the error message is set to this value. */
19
-                message?: string;
20
-                /** The `actual` property on the error instance. */
21
-                actual?: any;
22
-                /** The `expected` property on the error instance. */
23
-                expected?: any;
24
-                /** The `operator` property on the error instance. */
25
-                operator?: string;
26
-                /** If provided, the generated stack trace omits frames before this function. */
27
-                // tslint:disable-next-line:ban-types
28
-                stackStartFn?: Function;
29
-            });
30
-        }
31
-
32
-        class CallTracker {
33
-            calls(exact?: number): () => void;
34
-            calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
35
-            report(): CallTrackerReportInformation[];
36
-            verify(): void;
37
-        }
38
-        interface CallTrackerReportInformation {
39
-            message: string;
40
-            /** The actual number of times the function was called. */
41
-            actual: number;
42
-            /** The number of times the function was expected to be called. */
43
-            expected: number;
44
-            /** The name of the function that is wrapped. */
45
-            operator: string;
46
-            /** A stack trace of the function. */
47
-            stack: object;
48
-        }
49
-
50
-        type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
51
-
52
-        function fail(message?: string | Error): never;
53
-        /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
54
-        function fail(
55
-            actual: any,
56
-            expected: any,
57
-            message?: string | Error,
58
-            operator?: string,
59
-            // tslint:disable-next-line:ban-types
60
-            stackStartFn?: Function,
61
-        ): never;
62
-        function ok(value: any, message?: string | Error): void;
63
-        /** @deprecated since v9.9.0 - use strictEqual() instead. */
64
-        function equal(actual: any, expected: any, message?: string | Error): void;
65
-        /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
66
-        function notEqual(actual: any, expected: any, message?: string | Error): void;
67
-        /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
68
-        function deepEqual(actual: any, expected: any, message?: string | Error): void;
69
-        /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
70
-        function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
71
-        function strictEqual(actual: any, expected: any, message?: string | Error): void;
72
-        function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
73
-        function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
74
-        function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
75
-
76
-        function throws(block: () => any, message?: string | Error): void;
77
-        function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
78
-        function doesNotThrow(block: () => any, message?: string | Error): void;
79
-        function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
80
-
81
-        function ifError(value: any): void;
82
-
83
-        function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
84
-        function rejects(
85
-            block: (() => Promise<any>) | Promise<any>,
86
-            error: AssertPredicate,
87
-            message?: string | Error,
88
-        ): Promise<void>;
89
-        function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
90
-        function doesNotReject(
91
-            block: (() => Promise<any>) | Promise<any>,
92
-            error: AssertPredicate,
93
-            message?: string | Error,
94
-        ): Promise<void>;
95
-
96
-        function match(value: string, regExp: RegExp, message?: string | Error): void;
97
-        function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
98
-
99
-        const strict: typeof assert;
100
-    }
101
-
102
-    export = assert;
103
-}
... ...
@@ -1,56 +0,0 @@
1
-// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4.
2
-
3
-// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
-//          - ~/base.d.ts         - Shared definitions common to all TypeScript versions
5
-//          - ~/index.d.ts        - Definitions specific to TypeScript 2.1
6
-//          - ~/ts3.2/base.d.ts   - Definitions specific to TypeScript 3.2
7
-//          - ~/ts3.2/index.d.ts  - Definitions specific to TypeScript 3.2 with global and assert pulled in
8
-
9
-// Reference required types from the default lib:
10
-/// <reference lib="es2018" />
11
-/// <reference lib="esnext.asynciterable" />
12
-/// <reference lib="esnext.intl" />
13
-/// <reference lib="esnext.bigint" />
14
-
15
-// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
-
17
-/// <reference path="../globals.d.ts" />
18
-/// <reference path="../async_hooks.d.ts" />
19
-/// <reference path="../buffer.d.ts" />
20
-/// <reference path="../child_process.d.ts" />
21
-/// <reference path="../cluster.d.ts" />
22
-/// <reference path="../console.d.ts" />
23
-/// <reference path="../constants.d.ts" />
24
-/// <reference path="../crypto.d.ts" />
25
-/// <reference path="../dgram.d.ts" />
26
-/// <reference path="../dns.d.ts" />
27
-/// <reference path="../domain.d.ts" />
28
-/// <reference path="../events.d.ts" />
29
-/// <reference path="../fs.d.ts" />
30
-/// <reference path="../fs/promises.d.ts" />
31
-/// <reference path="../http.d.ts" />
32
-/// <reference path="../http2.d.ts" />
33
-/// <reference path="../https.d.ts" />
34
-/// <reference path="../inspector.d.ts" />
35
-/// <reference path="../module.d.ts" />
36
-/// <reference path="../net.d.ts" />
37
-/// <reference path="../os.d.ts" />
38
-/// <reference path="../path.d.ts" />
39
-/// <reference path="../perf_hooks.d.ts" />
40
-/// <reference path="../process.d.ts" />
41
-/// <reference path="../punycode.d.ts" />
42
-/// <reference path="../querystring.d.ts" />
43
-/// <reference path="../readline.d.ts" />
44
-/// <reference path="../repl.d.ts" />
45
-/// <reference path="../stream.d.ts" />
46
-/// <reference path="../string_decoder.d.ts" />
47
-/// <reference path="../timers.d.ts" />
48
-/// <reference path="../tls.d.ts" />
49
-/// <reference path="../trace_events.d.ts" />
50
-/// <reference path="../tty.d.ts" />
51
-/// <reference path="../url.d.ts" />
52
-/// <reference path="../util.d.ts" />
53
-/// <reference path="../v8.d.ts" />
54
-/// <reference path="../vm.d.ts" />
55
-/// <reference path="../worker_threads.d.ts" />
56
-/// <reference path="../zlib.d.ts" />
... ...
@@ -1 +0,0 @@
1
-declare var global: NodeJS.Global;
... ...
@@ -1,8 +0,0 @@
1
-// NOTE: These definitions support NodeJS and TypeScript 3.2 - 3.4.
2
-// This is required to enable globalThis support for global in ts3.5 without causing errors
3
-// This is required to enable typing assert in ts3.7 without causing errors
4
-// Typically type modifiations should be made in base.d.ts instead of here
5
-
6
-/// <reference path="base.d.ts" />
7
-/// <reference path="assert.d.ts" />
8
-/// <reference path="globals.global.d.ts" />
... ...
@@ -1,22 +0,0 @@
1
-// NOTE: These definitions support NodeJS and TypeScript 3.5.
2
-
3
-// NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
-//          - ~/base.d.ts         - Shared definitions common to all TypeScript versions
5
-//          - ~/index.d.ts        - Definitions specific to TypeScript 2.1
6
-//          - ~/ts3.5/base.d.ts   - Definitions specific to TypeScript 3.5
7
-//          - ~/ts3.5/index.d.ts  - Definitions specific to TypeScript 3.5 with assert pulled in
8
-
9
-// Reference required types from the default lib:
10
-/// <reference lib="es2018" />
11
-/// <reference lib="esnext.asynciterable" />
12
-/// <reference lib="esnext.intl" />
13
-/// <reference lib="esnext.bigint" />
14
-
15
-// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
-/// <reference path="../ts3.4/base.d.ts" />
17
-
18
-// TypeScript 3.5-specific augmentations:
19
-/// <reference path="../globals.global.d.ts" />
20
-
21
-// TypeScript 3.5-specific augmentations:
22
-/// <reference path="../wasi.d.ts" />
... ...
@@ -1,7 +0,0 @@
1
-// NOTE: These definitions support NodeJS and TypeScript 3.5 - 3.6.
2
-// This is required to enable typing assert in ts3.7 without causing errors
3
-// Typically type modifications should be made in base.d.ts instead of here
4
-
5
-/// <reference path="base.d.ts" />
6
-
7
-/// <reference path="../ts3.4/assert.d.ts" />
... ...
@@ -1,70 +0,0 @@
1
-declare module 'node:tty' {
2
-    export * from 'tty';
3
-}
4
-
5
-declare module 'tty' {
6
-    import * as net from 'node:net';
7
-
8
-    function isatty(fd: number): boolean;
9
-    class ReadStream extends net.Socket {
10
-        constructor(fd: number, options?: net.SocketConstructorOpts);
11
-        isRaw: boolean;
12
-        setRawMode(mode: boolean): this;
13
-        isTTY: boolean;
14
-    }
15
-    /**
16
-     * -1 - to the left from cursor
17
-     *  0 - the entire line
18
-     *  1 - to the right from cursor
19
-     */
20
-    type Direction = -1 | 0 | 1;
21
-    class WriteStream extends net.Socket {
22
-        constructor(fd: number);
23
-        addListener(event: string, listener: (...args: any[]) => void): this;
24
-        addListener(event: "resize", listener: () => void): this;
25
-
26
-        emit(event: string | symbol, ...args: any[]): boolean;
27
-        emit(event: "resize"): boolean;
28
-
29
-        on(event: string, listener: (...args: any[]) => void): this;
30
-        on(event: "resize", listener: () => void): this;
31
-
32
-        once(event: string, listener: (...args: any[]) => void): this;
33
-        once(event: "resize", listener: () => void): this;
34
-
35
-        prependListener(event: string, listener: (...args: any[]) => void): this;
36
-        prependListener(event: "resize", listener: () => void): this;
37
-
38
-        prependOnceListener(event: string, listener: (...args: any[]) => void): this;
39
-        prependOnceListener(event: "resize", listener: () => void): this;
40
-
41
-        /**
42
-         * Clears the current line of this WriteStream in a direction identified by `dir`.
43
-         */
44
-        clearLine(dir: Direction, callback?: () => void): boolean;
45
-        /**
46
-         * Clears this `WriteStream` from the current cursor down.
47
-         */
48
-        clearScreenDown(callback?: () => void): boolean;
49
-        /**
50
-         * Moves this WriteStream's cursor to the specified position.
51
-         */
52
-        cursorTo(x: number, y?: number, callback?: () => void): boolean;
53
-        cursorTo(x: number, callback: () => void): boolean;
54
-        /**
55
-         * Moves this WriteStream's cursor relative to its current position.
56
-         */
57
-        moveCursor(dx: number, dy: number, callback?: () => void): boolean;
58
-        /**
59
-         * @default `process.env`
60
-         */
61
-        getColorDepth(env?: {}): number;
62
-        hasColors(depth?: number): boolean;
63
-        hasColors(env?: {}): boolean;
64
-        hasColors(depth: number, env?: {}): boolean;
65
-        getWindowSize(): [number, number];
66
-        columns: number;
67
-        rows: number;
68
-        isTTY: boolean;
69
-    }
70
-}
... ...
@@ -1,120 +0,0 @@
1
-declare module 'node:url' {
2
-    export * from 'url';
3
-}
4
-
5
-declare module 'url' {
6
-    import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
7
-
8
-    // Input to `url.format`
9
-    interface UrlObject {
10
-        auth?: string | null;
11
-        hash?: string | null;
12
-        host?: string | null;
13
-        hostname?: string | null;
14
-        href?: string | null;
15
-        pathname?: string | null;
16
-        protocol?: string | null;
17
-        search?: string | null;
18
-        slashes?: boolean | null;
19
-        port?: string | number | null;
20
-        query?: string | null | ParsedUrlQueryInput;
21
-    }
22
-
23
-    // Output of `url.parse`
24
-    interface Url {
25
-        auth: string | null;
26
-        hash: string | null;
27
-        host: string | null;
28
-        hostname: string | null;
29
-        href: string;
30
-        path: string | null;
31
-        pathname: string | null;
32
-        protocol: string | null;
33
-        search: string | null;
34
-        slashes: boolean | null;
35
-        port: string | null;
36
-        query: string | null | ParsedUrlQuery;
37
-    }
38
-
39
-    interface UrlWithParsedQuery extends Url {
40
-        query: ParsedUrlQuery;
41
-    }
42
-
43
-    interface UrlWithStringQuery extends Url {
44
-        query: string | null;
45
-    }
46
-
47
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
48
-    function parse(urlStr: string): UrlWithStringQuery;
49
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50
-    function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
51
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
52
-    function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
53
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
54
-    function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
55
-
56
-    function format(URL: URL, options?: URLFormatOptions): string;
57
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
58
-    function format(urlObject: UrlObject | string): string;
59
-    /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
60
-    function resolve(from: string, to: string): string;
61
-
62
-    function domainToASCII(domain: string): string;
63
-    function domainToUnicode(domain: string): string;
64
-
65
-    /**
66
-     * This function ensures the correct decodings of percent-encoded characters as
67
-     * well as ensuring a cross-platform valid absolute path string.
68
-     * @param url The file URL string or URL object to convert to a path.
69
-     */
70
-    function fileURLToPath(url: string | URL): string;
71
-
72
-    /**
73
-     * This function ensures that path is resolved absolutely, and that the URL
74
-     * control characters are correctly encoded when converting into a File URL.
75
-     * @param url The path to convert to a File URL.
76
-     */
77
-    function pathToFileURL(url: string): URL;
78
-
79
-    interface URLFormatOptions {
80
-        auth?: boolean;
81
-        fragment?: boolean;
82
-        search?: boolean;
83
-        unicode?: boolean;
84
-    }
85
-
86
-    class URL {
87
-        constructor(input: string, base?: string | URL);
88
-        hash: string;
89
-        host: string;
90
-        hostname: string;
91
-        href: string;
92
-        readonly origin: string;
93
-        password: string;
94
-        pathname: string;
95
-        port: string;
96
-        protocol: string;
97
-        search: string;
98
-        readonly searchParams: URLSearchParams;
99
-        username: string;
100
-        toString(): string;
101
-        toJSON(): string;
102
-    }
103
-
104
-    class URLSearchParams implements Iterable<[string, string]> {
105
-        constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
106
-        append(name: string, value: string): void;
107
-        delete(name: string): void;
108
-        entries(): IterableIterator<[string, string]>;
109
-        forEach(callback: (value: string, name: string, searchParams: this) => void): void;
110
-        get(name: string): string | null;
111
-        getAll(name: string): string[];
112
-        has(name: string): boolean;
113
-        keys(): IterableIterator<string>;
114
-        set(name: string, value: string): void;
115
-        sort(): void;
116
-        toString(): string;
117
-        values(): IterableIterator<string>;
118
-        [Symbol.iterator](): IterableIterator<[string, string]>;
119
-    }
120
-}
... ...
@@ -1,211 +0,0 @@
1
-declare module 'node:util' {
2
-    export * from 'util';
3
-}
4
-
5
-declare module 'util' {
6
-    interface InspectOptions extends NodeJS.InspectOptions { }
7
-    type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
8
-    type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
9
-    interface InspectOptionsStylized extends InspectOptions {
10
-        stylize(text: string, styleType: Style): string;
11
-    }
12
-    function format(format?: any, ...param: any[]): string;
13
-    function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
14
-    /** @deprecated since v0.11.3 - use a third party module instead. */
15
-    function log(string: string): void;
16
-    function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
17
-    function inspect(object: any, options: InspectOptions): string;
18
-    namespace inspect {
19
-        let colors: NodeJS.Dict<[number, number]>;
20
-        let styles: {
21
-            [K in Style]: string
22
-        };
23
-        let defaultOptions: InspectOptions;
24
-        /**
25
-         * Allows changing inspect settings from the repl.
26
-         */
27
-        let replDefaults: InspectOptions;
28
-        const custom: unique symbol;
29
-    }
30
-    /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
31
-    function isArray(object: any): object is any[];
32
-    /** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
33
-    function isRegExp(object: any): object is RegExp;
34
-    /** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
35
-    function isDate(object: any): object is Date;
36
-    /** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
37
-    function isError(object: any): object is Error;
38
-    function inherits(constructor: any, superConstructor: any): void;
39
-    function debuglog(key: string): (msg: string, ...param: any[]) => void;
40
-    /** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
41
-    function isBoolean(object: any): object is boolean;
42
-    /** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
43
-    function isBuffer(object: any): object is Buffer;
44
-    /** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
45
-    function isFunction(object: any): boolean;
46
-    /** @deprecated since v4.0.0 - use `value === null` instead. */
47
-    function isNull(object: any): object is null;
48
-    /** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
49
-    function isNullOrUndefined(object: any): object is null | undefined;
50
-    /** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
51
-    function isNumber(object: any): object is number;
52
-    /** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
53
-    function isObject(object: any): boolean;
54
-    /** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
55
-    function isPrimitive(object: any): boolean;
56
-    /** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
57
-    function isString(object: any): object is string;
58
-    /** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
59
-    function isSymbol(object: any): object is symbol;
60
-    /** @deprecated since v4.0.0 - use `value === undefined` instead. */
61
-    function isUndefined(object: any): object is undefined;
62
-    function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
63
-    function isDeepStrictEqual(val1: any, val2: any): boolean;
64
-
65
-    function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
66
-    function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
67
-    function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
68
-    function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
69
-    function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
70
-    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;
71
-    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;
72
-    function callbackify<T1, T2, T3, TResult>(
73
-        fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
74
-    function callbackify<T1, T2, T3, T4>(
75
-        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;
76
-    function callbackify<T1, T2, T3, T4, TResult>(
77
-        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;
78
-    function callbackify<T1, T2, T3, T4, T5>(
79
-        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;
80
-    function callbackify<T1, T2, T3, T4, T5, TResult>(
81
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
82
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
83
-    function callbackify<T1, T2, T3, T4, T5, T6>(
84
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
85
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
86
-    function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
87
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
88
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
89
-
90
-    interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
91
-        __promisify__: TCustom;
92
-    }
93
-
94
-    interface CustomPromisifySymbol<TCustom extends Function> extends Function {
95
-        [promisify.custom]: TCustom;
96
-    }
97
-
98
-    type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
99
-
100
-    function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
101
-    function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
102
-    function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
103
-    function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
104
-    function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
105
-    function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
106
-    function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
107
-    function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
108
-        (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
109
-    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>;
110
-    function promisify<T1, T2, T3, T4, TResult>(
111
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
112
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
113
-    function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
114
-        (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
115
-    function promisify<T1, T2, T3, T4, T5, TResult>(
116
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
117
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
118
-    function promisify<T1, T2, T3, T4, T5>(
119
-        fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
120
-    ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
121
-    function promisify(fn: Function): Function;
122
-    namespace promisify {
123
-        const custom: unique symbol;
124
-    }
125
-
126
-    namespace types {
127
-        function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
128
-        function isArgumentsObject(object: any): object is IArguments;
129
-        function isArrayBuffer(object: any): object is ArrayBuffer;
130
-        function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
131
-        function isAsyncFunction(object: any): boolean;
132
-        function isBigInt64Array(value: any): value is BigInt64Array;
133
-        function isBigUint64Array(value: any): value is BigUint64Array;
134
-        function isBooleanObject(object: any): object is Boolean;
135
-        function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
136
-        function isDataView(object: any): object is DataView;
137
-        function isDate(object: any): object is Date;
138
-        function isExternal(object: any): boolean;
139
-        function isFloat32Array(object: any): object is Float32Array;
140
-        function isFloat64Array(object: any): object is Float64Array;
141
-        function isGeneratorFunction(object: any): object is GeneratorFunction;
142
-        function isGeneratorObject(object: any): object is Generator;
143
-        function isInt8Array(object: any): object is Int8Array;
144
-        function isInt16Array(object: any): object is Int16Array;
145
-        function isInt32Array(object: any): object is Int32Array;
146
-        function isMap<T>(
147
-            object: T | {},
148
-        ): object is T extends ReadonlyMap<any, any>
149
-            ? unknown extends T
150
-                ? never
151
-                : ReadonlyMap<any, any>
152
-            : Map<any, any>;
153
-        function isMapIterator(object: any): boolean;
154
-        function isModuleNamespaceObject(value: any): boolean;
155
-        function isNativeError(object: any): object is Error;
156
-        function isNumberObject(object: any): object is Number;
157
-        function isPromise(object: any): object is Promise<any>;
158
-        function isProxy(object: any): boolean;
159
-        function isRegExp(object: any): object is RegExp;
160
-        function isSet<T>(
161
-            object: T | {},
162
-        ): object is T extends ReadonlySet<any>
163
-            ? unknown extends T
164
-                ? never
165
-                : ReadonlySet<any>
166
-            : Set<any>;
167
-        function isSetIterator(object: any): boolean;
168
-        function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
169
-        function isStringObject(object: any): object is String;
170
-        function isSymbolObject(object: any): object is Symbol;
171
-        function isTypedArray(object: any): object is NodeJS.TypedArray;
172
-        function isUint8Array(object: any): object is Uint8Array;
173
-        function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
174
-        function isUint16Array(object: any): object is Uint16Array;
175
-        function isUint32Array(object: any): object is Uint32Array;
176
-        function isWeakMap(object: any): object is WeakMap<any, any>;
177
-        function isWeakSet(object: any): object is WeakSet<any>;
178
-    }
179
-
180
-    class TextDecoder {
181
-        readonly encoding: string;
182
-        readonly fatal: boolean;
183
-        readonly ignoreBOM: boolean;
184
-        constructor(
185
-          encoding?: string,
186
-          options?: { fatal?: boolean; ignoreBOM?: boolean }
187
-        );
188
-        decode(
189
-          input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
190
-          options?: { stream?: boolean }
191
-        ): string;
192
-    }
193
-
194
-    interface EncodeIntoResult {
195
-        /**
196
-         * The read Unicode code units of input.
197
-         */
198
-
199
-        read: number;
200
-        /**
201
-         * The written UTF-8 bytes of output.
202
-         */
203
-        written: number;
204
-    }
205
-
206
-    class TextEncoder {
207
-        readonly encoding: string;
208
-        encode(input?: string): Uint8Array;
209
-        encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
210
-    }
211
-}
... ...
@@ -1,191 +0,0 @@
1
-declare module 'node:v8' {
2
-    export * from 'v8';
3
-}
4
-
5
-declare module 'v8' {
6
-    import { Readable } from 'node:stream';
7
-
8
-    interface HeapSpaceInfo {
9
-        space_name: string;
10
-        space_size: number;
11
-        space_used_size: number;
12
-        space_available_size: number;
13
-        physical_space_size: number;
14
-    }
15
-
16
-    // ** Signifies if the --zap_code_space option is enabled or not.  1 == enabled, 0 == disabled. */
17
-    type DoesZapCodeSpaceFlag = 0 | 1;
18
-
19
-    interface HeapInfo {
20
-        total_heap_size: number;
21
-        total_heap_size_executable: number;
22
-        total_physical_size: number;
23
-        total_available_size: number;
24
-        used_heap_size: number;
25
-        heap_size_limit: number;
26
-        malloced_memory: number;
27
-        peak_malloced_memory: number;
28
-        does_zap_garbage: DoesZapCodeSpaceFlag;
29
-        number_of_native_contexts: number;
30
-        number_of_detached_contexts: number;
31
-    }
32
-
33
-    interface HeapCodeStatistics {
34
-        code_and_metadata_size: number;
35
-        bytecode_and_metadata_size: number;
36
-        external_script_source_size: number;
37
-    }
38
-
39
-    /**
40
-     * Returns an integer representing a "version tag" derived from the V8 version, command line flags and detected CPU features.
41
-     * This is useful for determining whether a vm.Script cachedData buffer is compatible with this instance of V8.
42
-     */
43
-    function cachedDataVersionTag(): number;
44
-
45
-    function getHeapStatistics(): HeapInfo;
46
-    function getHeapSpaceStatistics(): HeapSpaceInfo[];
47
-    function setFlagsFromString(flags: string): void;
48
-    /**
49
-     * Generates a snapshot of the current V8 heap and returns a Readable
50
-     * Stream that may be used to read the JSON serialized representation.
51
-     * This conversation was marked as resolved by joyeecheung
52
-     * This JSON stream format is intended to be used with tools such as
53
-     * Chrome DevTools. The JSON schema is undocumented and specific to the
54
-     * V8 engine, and may change from one version of V8 to the next.
55
-     */
56
-    function getHeapSnapshot(): Readable;
57
-
58
-    /**
59
-     *
60
-     * @param fileName The file path where the V8 heap snapshot is to be
61
-     * saved. If not specified, a file name with the pattern
62
-     * `'Heap-${yyyymmdd}-${hhmmss}-${pid}-${thread_id}.heapsnapshot'` will be
63
-     * generated, where `{pid}` will be the PID of the Node.js process,
64
-     * `{thread_id}` will be `0` when `writeHeapSnapshot()` is called from
65
-     * the main Node.js thread or the id of a worker thread.
66
-     */
67
-    function writeHeapSnapshot(fileName?: string): string;
68
-
69
-    function getHeapCodeStatistics(): HeapCodeStatistics;
70
-
71
-    class Serializer {
72
-        /**
73
-         * Writes out a header, which includes the serialization format version.
74
-         */
75
-        writeHeader(): void;
76
-
77
-        /**
78
-         * Serializes a JavaScript value and adds the serialized representation to the internal buffer.
79
-         * This throws an error if value cannot be serialized.
80
-         */
81
-        writeValue(val: any): boolean;
82
-
83
-        /**
84
-         * Returns the stored internal buffer.
85
-         * This serializer should not be used once the buffer is released.
86
-         * Calling this method results in undefined behavior if a previous write has failed.
87
-         */
88
-        releaseBuffer(): Buffer;
89
-
90
-        /**
91
-         * Marks an ArrayBuffer as having its contents transferred out of band.\
92
-         * Pass the corresponding ArrayBuffer in the deserializing context to deserializer.transferArrayBuffer().
93
-         */
94
-        transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
95
-
96
-        /**
97
-         * Write a raw 32-bit unsigned integer.
98
-         */
99
-        writeUint32(value: number): void;
100
-
101
-        /**
102
-         * Write a raw 64-bit unsigned integer, split into high and low 32-bit parts.
103
-         */
104
-        writeUint64(hi: number, lo: number): void;
105
-
106
-        /**
107
-         * Write a JS number value.
108
-         */
109
-        writeDouble(value: number): void;
110
-
111
-        /**
112
-         * Write raw bytes into the serializer’s internal buffer.
113
-         * The deserializer will require a way to compute the length of the buffer.
114
-         */
115
-        writeRawBytes(buffer: NodeJS.TypedArray): void;
116
-    }
117
-
118
-    /**
119
-     * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
120
-     * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
121
-     */
122
-    class DefaultSerializer extends Serializer {
123
-    }
124
-
125
-    class Deserializer {
126
-        constructor(data: NodeJS.TypedArray);
127
-        /**
128
-         * Reads and validates a header (including the format version).
129
-         * May, for example, reject an invalid or unsupported wire format.
130
-         * In that case, an Error is thrown.
131
-         */
132
-        readHeader(): boolean;
133
-
134
-        /**
135
-         * Deserializes a JavaScript value from the buffer and returns it.
136
-         */
137
-        readValue(): any;
138
-
139
-        /**
140
-         * Marks an ArrayBuffer as having its contents transferred out of band.
141
-         * Pass the corresponding `ArrayBuffer` in the serializing context to serializer.transferArrayBuffer()
142
-         * (or return the id from serializer._getSharedArrayBufferId() in the case of SharedArrayBuffers).
143
-         */
144
-        transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
145
-
146
-        /**
147
-         * Reads the underlying wire format version.
148
-         * Likely mostly to be useful to legacy code reading old wire format versions.
149
-         * May not be called before .readHeader().
150
-         */
151
-        getWireFormatVersion(): number;
152
-
153
-        /**
154
-         * Read a raw 32-bit unsigned integer and return it.
155
-         */
156
-        readUint32(): number;
157
-
158
-        /**
159
-         * Read a raw 64-bit unsigned integer and return it as an array [hi, lo] with two 32-bit unsigned integer entries.
160
-         */
161
-        readUint64(): [number, number];
162
-
163
-        /**
164
-         * Read a JS number value.
165
-         */
166
-        readDouble(): number;
167
-
168
-        /**
169
-         * Read raw bytes from the deserializer’s internal buffer.
170
-         * The length parameter must correspond to the length of the buffer that was passed to serializer.writeRawBytes().
171
-         */
172
-        readRawBytes(length: number): Buffer;
173
-    }
174
-
175
-    /**
176
-     * A subclass of `Serializer` that serializes `TypedArray` (in particular `Buffer`) and `DataView` objects as host objects,
177
-     * and only stores the part of their underlying `ArrayBuffers` that they are referring to.
178
-     */
179
-    class DefaultDeserializer extends Deserializer {
180
-    }
181
-
182
-    /**
183
-     * Uses a `DefaultSerializer` to serialize value into a buffer.
184
-     */
185
-    function serialize(value: any): Buffer;
186
-
187
-    /**
188
-     * Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
189
-     */
190
-    function deserialize(data: NodeJS.TypedArray): any;
191
-}
... ...
@@ -1,152 +0,0 @@
1
-declare module 'node:vm' {
2
-    export * from 'vm';
3
-}
4
-
5
-declare module 'vm' {
6
-    interface Context extends NodeJS.Dict<any> { }
7
-    interface BaseOptions {
8
-        /**
9
-         * Specifies the filename used in stack traces produced by this script.
10
-         * Default: `''`.
11
-         */
12
-        filename?: string;
13
-        /**
14
-         * Specifies the line number offset that is displayed in stack traces produced by this script.
15
-         * Default: `0`.
16
-         */
17
-        lineOffset?: number;
18
-        /**
19
-         * Specifies the column number offset that is displayed in stack traces produced by this script.
20
-         * Default: `0`
21
-         */
22
-        columnOffset?: number;
23
-    }
24
-    interface ScriptOptions extends BaseOptions {
25
-        displayErrors?: boolean;
26
-        timeout?: number;
27
-        cachedData?: Buffer;
28
-        /** @deprecated in favor of `script.createCachedData()` */
29
-        produceCachedData?: boolean;
30
-    }
31
-    interface RunningScriptOptions extends BaseOptions {
32
-        /**
33
-         * When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
34
-         * Default: `true`.
35
-         */
36
-        displayErrors?: boolean;
37
-        /**
38
-         * Specifies the number of milliseconds to execute code before terminating execution.
39
-         * If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
40
-         */
41
-        timeout?: number;
42
-        /**
43
-         * If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
44
-         * Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
45
-         * If execution is terminated, an `Error` will be thrown.
46
-         * Default: `false`.
47
-         */
48
-        breakOnSigint?: boolean;
49
-        /**
50
-         * If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
51
-         */
52
-        microtaskMode?: 'afterEvaluate';
53
-    }
54
-    interface CompileFunctionOptions extends BaseOptions {
55
-        /**
56
-         * Provides an optional data with V8's code cache data for the supplied source.
57
-         */
58
-        cachedData?: Buffer;
59
-        /**
60
-         * Specifies whether to produce new cache data.
61
-         * Default: `false`,
62
-         */
63
-        produceCachedData?: boolean;
64
-        /**
65
-         * The sandbox/context in which the said function should be compiled in.
66
-         */
67
-        parsingContext?: Context;
68
-
69
-        /**
70
-         * An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
71
-         */
72
-        contextExtensions?: Object[];
73
-    }
74
-
75
-    interface CreateContextOptions {
76
-        /**
77
-         * Human-readable name of the newly created context.
78
-         * @default 'VM Context i' Where i is an ascending numerical index of the created context.
79
-         */
80
-        name?: string;
81
-        /**
82
-         * Corresponds to the newly created context for display purposes.
83
-         * The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
84
-         * like the value of the `url.origin` property of a URL object.
85
-         * Most notably, this string should omit the trailing slash, as that denotes a path.
86
-         * @default ''
87
-         */
88
-        origin?: string;
89
-        codeGeneration?: {
90
-            /**
91
-             * If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
92
-             * will throw an EvalError.
93
-             * @default true
94
-             */
95
-            strings?: boolean;
96
-            /**
97
-             * If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
98
-             * @default true
99
-             */
100
-            wasm?: boolean;
101
-        };
102
-    }
103
-
104
-    type MeasureMemoryMode = 'summary' | 'detailed';
105
-
106
-    interface MeasureMemoryOptions {
107
-        /**
108
-         * @default 'summary'
109
-         */
110
-        mode?: MeasureMemoryMode;
111
-        context?: Context;
112
-    }
113
-
114
-    interface MemoryMeasurement {
115
-        total: {
116
-            jsMemoryEstimate: number;
117
-            jsMemoryRange: [number, number];
118
-        };
119
-    }
120
-
121
-    class Script {
122
-        constructor(code: string, options?: ScriptOptions);
123
-        runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
124
-        runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
125
-        runInThisContext(options?: RunningScriptOptions): any;
126
-        createCachedData(): Buffer;
127
-        cachedDataRejected?: boolean;
128
-    }
129
-    function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
130
-    function isContext(sandbox: Context): boolean;
131
-    function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
132
-    function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
133
-    function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
134
-    function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
135
-
136
-    /**
137
-     * Measure the memory known to V8 and used by the current execution context or a specified context.
138
-     *
139
-     * The format of the object that the returned Promise may resolve with is
140
-     * specific to the V8 engine and may change from one version of V8 to the next.
141
-     *
142
-     * The returned result is different from the statistics returned by
143
-     * `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
144
-     * the memory reachable by V8 from a specific context, while
145
-     * `v8.getHeapSpaceStatistics()` measures the memory used by an instance
146
-     * of V8 engine, which can switch among multiple contexts that reference
147
-     * objects in the heap of one engine.
148
-     *
149
-     * @experimental
150
-     */
151
-    function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
152
-}
... ...
@@ -1,90 +0,0 @@
1
-declare module 'node:wasi' {
2
-    export * from 'wasi';
3
-}
4
-
5
-declare module 'wasi' {
6
-    interface WASIOptions {
7
-        /**
8
-         * An array of strings that the WebAssembly application will
9
-         * see as command line arguments. The first argument is the virtual path to the
10
-         * WASI command itself.
11
-         */
12
-        args?: string[];
13
-
14
-        /**
15
-         * An object similar to `process.env` that the WebAssembly
16
-         * application will see as its environment.
17
-         */
18
-        env?: object;
19
-
20
-        /**
21
-         * This object represents the WebAssembly application's
22
-         * sandbox directory structure. The string keys of `preopens` are treated as
23
-         * directories within the sandbox. The corresponding values in `preopens` are
24
-         * the real paths to those directories on the host machine.
25
-         */
26
-        preopens?: NodeJS.Dict<string>;
27
-
28
-        /**
29
-         * By default, WASI applications terminate the Node.js
30
-         * process via the `__wasi_proc_exit()` function. Setting this option to `true`
31
-         * causes `wasi.start()` to return the exit code rather than terminate the
32
-         * process.
33
-         * @default false
34
-         */
35
-        returnOnExit?: boolean;
36
-
37
-        /**
38
-         * The file descriptor used as standard input in the WebAssembly application.
39
-         * @default 0
40
-         */
41
-        stdin?: number;
42
-
43
-        /**
44
-         * The file descriptor used as standard output in the WebAssembly application.
45
-         * @default 1
46
-         */
47
-        stdout?: number;
48
-
49
-        /**
50
-         * The file descriptor used as standard error in the WebAssembly application.
51
-         * @default 2
52
-         */
53
-        stderr?: number;
54
-    }
55
-
56
-    class WASI {
57
-        constructor(options?: WASIOptions);
58
-        /**
59
-         *
60
-         * Attempt to begin execution of `instance` by invoking its `_start()` export.
61
-         * If `instance` does not contain a `_start()` export, then `start()` attempts to
62
-         * invoke the `__wasi_unstable_reactor_start()` export. If neither of those exports
63
-         * is present on `instance`, then `start()` does nothing.
64
-         *
65
-         * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
66
-         * `memory`. If `instance` does not have a `memory` export an exception is thrown.
67
-         *
68
-         * If `start()` is called more than once, an exception is thrown.
69
-         */
70
-        start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
71
-
72
-        /**
73
-         * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
74
-         * If `instance` contains a `_start()` export, then an exception is thrown.
75
-         *
76
-         * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
77
-         * `memory`. If `instance` does not have a `memory` export an exception is thrown.
78
-         *
79
-         * If `initialize()` is called more than once, an exception is thrown.
80
-         */
81
-        initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
82
-
83
-        /**
84
-         * Is an object that implements the WASI system call API. This object
85
-         * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
86
-         * [`WebAssembly.Instance`][].
87
-         */
88
-        readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
89
-    }
90
-}
... ...
@@ -1,242 +0,0 @@
1
-declare module 'node:worker_threads' {
2
-    export * from 'worker_threads';
3
-}
4
-
5
-declare module 'worker_threads' {
6
-    import { Context } from 'node:vm';
7
-    import EventEmitter = require('node:events');
8
-    import { Readable, Writable } from 'node:stream';
9
-    import { URL } from 'node:url';
10
-    import { FileHandle } from 'node:fs/promises';
11
-
12
-    const isMainThread: boolean;
13
-    const parentPort: null | MessagePort;
14
-    const resourceLimits: ResourceLimits;
15
-    const SHARE_ENV: unique symbol;
16
-    const threadId: number;
17
-    const workerData: any;
18
-
19
-    class MessageChannel {
20
-        readonly port1: MessagePort;
21
-        readonly port2: MessagePort;
22
-    }
23
-
24
-    type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
25
-
26
-    class MessagePort extends EventEmitter {
27
-        close(): void;
28
-        postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
29
-        ref(): void;
30
-        unref(): void;
31
-        start(): void;
32
-
33
-        addListener(event: "close", listener: () => void): this;
34
-        addListener(event: "message", listener: (value: any) => void): this;
35
-        addListener(event: "messageerror", listener: (error: Error) => void): this;
36
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
37
-
38
-        emit(event: "close"): boolean;
39
-        emit(event: "message", value: any): boolean;
40
-        emit(event: "messageerror", error: Error): boolean;
41
-        emit(event: string | symbol, ...args: any[]): boolean;
42
-
43
-        on(event: "close", listener: () => void): this;
44
-        on(event: "message", listener: (value: any) => void): this;
45
-        on(event: "messageerror", listener: (error: Error) => void): this;
46
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
47
-
48
-        once(event: "close", listener: () => void): this;
49
-        once(event: "message", listener: (value: any) => void): this;
50
-        once(event: "messageerror", listener: (error: Error) => void): this;
51
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
52
-
53
-        prependListener(event: "close", listener: () => void): this;
54
-        prependListener(event: "message", listener: (value: any) => void): this;
55
-        prependListener(event: "messageerror", listener: (error: Error) => void): this;
56
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
57
-
58
-        prependOnceListener(event: "close", listener: () => void): this;
59
-        prependOnceListener(event: "message", listener: (value: any) => void): this;
60
-        prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
61
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
62
-
63
-        removeListener(event: "close", listener: () => void): this;
64
-        removeListener(event: "message", listener: (value: any) => void): this;
65
-        removeListener(event: "messageerror", listener: (error: Error) => void): this;
66
-        removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
67
-
68
-        off(event: "close", listener: () => void): this;
69
-        off(event: "message", listener: (value: any) => void): this;
70
-        off(event: "messageerror", listener: (error: Error) => void): this;
71
-        off(event: string | symbol, listener: (...args: any[]) => void): this;
72
-    }
73
-
74
-    interface WorkerOptions {
75
-        /**
76
-         * List of arguments which would be stringified and appended to
77
-         * `process.argv` in the worker. This is mostly similar to the `workerData`
78
-         * but the values will be available on the global `process.argv` as if they
79
-         * were passed as CLI options to the script.
80
-         */
81
-        argv?: any[];
82
-        env?: NodeJS.Dict<string> | typeof SHARE_ENV;
83
-        eval?: boolean;
84
-        workerData?: any;
85
-        stdin?: boolean;
86
-        stdout?: boolean;
87
-        stderr?: boolean;
88
-        execArgv?: string[];
89
-        resourceLimits?: ResourceLimits;
90
-        /**
91
-         * Additional data to send in the first worker message.
92
-         */
93
-        transferList?: TransferListItem[];
94
-        trackUnmanagedFds?: boolean;
95
-    }
96
-
97
-    interface ResourceLimits {
98
-        /**
99
-         * The maximum size of a heap space for recently created objects.
100
-         */
101
-        maxYoungGenerationSizeMb?: number;
102
-        /**
103
-         * The maximum size of the main heap in MB.
104
-         */
105
-        maxOldGenerationSizeMb?: number;
106
-        /**
107
-         * The size of a pre-allocated memory range used for generated code.
108
-         */
109
-        codeRangeSizeMb?: number;
110
-        /**
111
-         * The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
112
-         * @default 4
113
-         */
114
-        stackSizeMb?: number;
115
-    }
116
-
117
-    class Worker extends EventEmitter {
118
-        readonly stdin: Writable | null;
119
-        readonly stdout: Readable;
120
-        readonly stderr: Readable;
121
-        readonly threadId: number;
122
-        readonly resourceLimits?: ResourceLimits;
123
-
124
-        /**
125
-         * @param filename  The path to the Worker’s main script or module.
126
-         *                  Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
127
-         *                  or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
128
-         */
129
-        constructor(filename: string | URL, options?: WorkerOptions);
130
-
131
-        postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
132
-        ref(): void;
133
-        unref(): void;
134
-        /**
135
-         * Stop all JavaScript execution in the worker thread as soon as possible.
136
-         * Returns a Promise for the exit code that is fulfilled when the `exit` event is emitted.
137
-         */
138
-        terminate(): Promise<number>;
139
-
140
-        /**
141
-         * Returns a readable stream for a V8 snapshot of the current state of the Worker.
142
-         * See [`v8.getHeapSnapshot()`][] for more details.
143
-         *
144
-         * If the Worker thread is no longer running, which may occur before the
145
-         * [`'exit'` event][] is emitted, the returned `Promise` will be rejected
146
-         * immediately with an [`ERR_WORKER_NOT_RUNNING`][] error
147
-         */
148
-        getHeapSnapshot(): Promise<Readable>;
149
-
150
-        addListener(event: "error", listener: (err: Error) => void): this;
151
-        addListener(event: "exit", listener: (exitCode: number) => void): this;
152
-        addListener(event: "message", listener: (value: any) => void): this;
153
-        addListener(event: "messageerror", listener: (error: Error) => void): this;
154
-        addListener(event: "online", listener: () => void): this;
155
-        addListener(event: string | symbol, listener: (...args: any[]) => void): this;
156
-
157
-        emit(event: "error", err: Error): boolean;
158
-        emit(event: "exit", exitCode: number): boolean;
159
-        emit(event: "message", value: any): boolean;
160
-        emit(event: "messageerror", error: Error): boolean;
161
-        emit(event: "online"): boolean;
162
-        emit(event: string | symbol, ...args: any[]): boolean;
163
-
164
-        on(event: "error", listener: (err: Error) => void): this;
165
-        on(event: "exit", listener: (exitCode: number) => void): this;
166
-        on(event: "message", listener: (value: any) => void): this;
167
-        on(event: "messageerror", listener: (error: Error) => void): this;
168
-        on(event: "online", listener: () => void): this;
169
-        on(event: string | symbol, listener: (...args: any[]) => void): this;
170
-
171
-        once(event: "error", listener: (err: Error) => void): this;
172
-        once(event: "exit", listener: (exitCode: number) => void): this;
173
-        once(event: "message", listener: (value: any) => void): this;
174
-        once(event: "messageerror", listener: (error: Error) => void): this;
175
-        once(event: "online", listener: () => void): this;
176
-        once(event: string | symbol, listener: (...args: any[]) => void): this;
177
-
178
-        prependListener(event: "error", listener: (err: Error) => void): this;
179
-        prependListener(event: "exit", listener: (exitCode: number) => void): this;
180
-        prependListener(event: "message", listener: (value: any) => void): this;
181
-        prependListener(event: "messageerror", listener: (error: Error) => void): this;
182
-        prependListener(event: "online", listener: () => void): this;
183
-        prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
184
-
185
-        prependOnceListener(event: "error", listener: (err: Error) => void): this;
186
-        prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
187
-        prependOnceListener(event: "message", listener: (value: any) => void): this;
188
-        prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
189
-        prependOnceListener(event: "online", listener: () => void): this;
190
-        prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
191
-
192
-        removeListener(event: "error", listener: (err: Error) => void): this;
193
-        removeListener(event: "exit", listener: (exitCode: number) => void): this;
194
-        removeListener(event: "message", listener: (value: any) => void): this;
195
-        removeListener(event: "messageerror", listener: (error: Error) => void): this;
196
-        removeListener(event: "online", listener: () => void): this;
197
-        removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
198
-
199
-        off(event: "error", listener: (err: Error) => void): this;
200
-        off(event: "exit", listener: (exitCode: number) => void): this;
201
-        off(event: "message", listener: (value: any) => void): this;
202
-        off(event: "messageerror", listener: (error: Error) => void): this;
203
-        off(event: "online", listener: () => void): this;
204
-        off(event: string | symbol, listener: (...args: any[]) => void): this;
205
-    }
206
-
207
-    /**
208
-     * Mark an object as not transferable.
209
-     * If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
210
-     *
211
-     * In particular, this makes sense for objects that can be cloned, rather than transferred,
212
-     * and which are used by other objects on the sending side. For example, Node.js marks
213
-     * the `ArrayBuffer`s it uses for its Buffer pool with this.
214
-     *
215
-     * This operation cannot be undone.
216
-     */
217
-    function markAsUntransferable(object: object): void;
218
-
219
-    /**
220
-     * Transfer a `MessagePort` to a different `vm` Context. The original `port`
221
-     * object will be rendered unusable, and the returned `MessagePort` instance will
222
-     * take its place.
223
-     *
224
-     * The returned `MessagePort` will be an object in the target context, and will
225
-     * inherit from its global `Object` class. Objects passed to the
226
-     * `port.onmessage()` listener will also be created in the target context
227
-     * and inherit from its global `Object` class.
228
-     *
229
-     * However, the created `MessagePort` will no longer inherit from
230
-     * `EventEmitter`, and only `port.onmessage()` can be used to receive
231
-     * events using it.
232
-     */
233
-    function moveMessagePortToContext(port: MessagePort, context: Context): MessagePort;
234
-
235
-    /**
236
-     * Receive a single message from a given `MessagePort`. If no message is available,
237
-     * `undefined` is returned, otherwise an object with a single `message` property
238
-     * that contains the message payload, corresponding to the oldest message in the
239
-     * `MessagePort`’s queue.
240
-     */
241
-    function receiveMessageOnPort(port: MessagePort): { message: any } | undefined;
242
-}
... ...
@@ -1,365 +0,0 @@
1
-declare module 'node:zlib' {
2
-    export * from 'zlib';
3
-}
4
-
5
-declare module 'zlib' {
6
-    import * as stream from 'node:stream';
7
-
8
-    interface ZlibOptions {
9
-        /**
10
-         * @default constants.Z_NO_FLUSH
11
-         */
12
-        flush?: number;
13
-        /**
14
-         * @default constants.Z_FINISH
15
-         */
16
-        finishFlush?: number;
17
-        /**
18
-         * @default 16*1024
19
-         */
20
-        chunkSize?: number;
21
-        windowBits?: number;
22
-        level?: number; // compression only
23
-        memLevel?: number; // compression only
24
-        strategy?: number; // compression only
25
-        dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
26
-        info?: boolean;
27
-        maxOutputLength?: number;
28
-    }
29
-
30
-    interface BrotliOptions {
31
-        /**
32
-         * @default constants.BROTLI_OPERATION_PROCESS
33
-         */
34
-        flush?: number;
35
-        /**
36
-         * @default constants.BROTLI_OPERATION_FINISH
37
-         */
38
-        finishFlush?: number;
39
-        /**
40
-         * @default 16*1024
41
-         */
42
-        chunkSize?: number;
43
-        params?: {
44
-            /**
45
-             * Each key is a `constants.BROTLI_*` constant.
46
-             */
47
-            [key: number]: boolean | number;
48
-        };
49
-        maxOutputLength?: number;
50
-    }
51
-
52
-    interface Zlib {
53
-        /** @deprecated Use bytesWritten instead. */
54
-        readonly bytesRead: number;
55
-        readonly bytesWritten: number;
56
-        shell?: boolean | string;
57
-        close(callback?: () => void): void;
58
-        flush(kind?: number, callback?: () => void): void;
59
-        flush(callback?: () => void): void;
60
-    }
61
-
62
-    interface ZlibParams {
63
-        params(level: number, strategy: number, callback: () => void): void;
64
-    }
65
-
66
-    interface ZlibReset {
67
-        reset(): void;
68
-    }
69
-
70
-    interface BrotliCompress extends stream.Transform, Zlib { }
71
-    interface BrotliDecompress extends stream.Transform, Zlib { }
72
-    interface Gzip extends stream.Transform, Zlib { }
73
-    interface Gunzip extends stream.Transform, Zlib { }
74
-    interface Deflate extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
75
-    interface Inflate extends stream.Transform, Zlib, ZlibReset { }
76
-    interface DeflateRaw extends stream.Transform, Zlib, ZlibReset, ZlibParams { }
77
-    interface InflateRaw extends stream.Transform, Zlib, ZlibReset { }
78
-    interface Unzip extends stream.Transform, Zlib { }
79
-
80
-    function createBrotliCompress(options?: BrotliOptions): BrotliCompress;
81
-    function createBrotliDecompress(options?: BrotliOptions): BrotliDecompress;
82
-    function createGzip(options?: ZlibOptions): Gzip;
83
-    function createGunzip(options?: ZlibOptions): Gunzip;
84
-    function createDeflate(options?: ZlibOptions): Deflate;
85
-    function createInflate(options?: ZlibOptions): Inflate;
86
-    function createDeflateRaw(options?: ZlibOptions): DeflateRaw;
87
-    function createInflateRaw(options?: ZlibOptions): InflateRaw;
88
-    function createUnzip(options?: ZlibOptions): Unzip;
89
-
90
-    type InputType = string | ArrayBuffer | NodeJS.ArrayBufferView;
91
-
92
-    type CompressCallback = (error: Error | null, result: Buffer) => void;
93
-
94
-    function brotliCompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
95
-    function brotliCompress(buf: InputType, callback: CompressCallback): void;
96
-    namespace brotliCompress {
97
-        function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
98
-    }
99
-
100
-    function brotliCompressSync(buf: InputType, options?: BrotliOptions): Buffer;
101
-
102
-    function brotliDecompress(buf: InputType, options: BrotliOptions, callback: CompressCallback): void;
103
-    function brotliDecompress(buf: InputType, callback: CompressCallback): void;
104
-    namespace brotliDecompress {
105
-        function __promisify__(buffer: InputType, options?: BrotliOptions): Promise<Buffer>;
106
-    }
107
-
108
-    function brotliDecompressSync(buf: InputType, options?: BrotliOptions): Buffer;
109
-
110
-    function deflate(buf: InputType, callback: CompressCallback): void;
111
-    function deflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
112
-    namespace deflate {
113
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
114
-    }
115
-
116
-    function deflateSync(buf: InputType, options?: ZlibOptions): Buffer;
117
-
118
-    function deflateRaw(buf: InputType, callback: CompressCallback): void;
119
-    function deflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
120
-    namespace deflateRaw {
121
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
122
-    }
123
-
124
-    function deflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
125
-
126
-    function gzip(buf: InputType, callback: CompressCallback): void;
127
-    function gzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
128
-    namespace gzip {
129
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
130
-    }
131
-
132
-    function gzipSync(buf: InputType, options?: ZlibOptions): Buffer;
133
-
134
-    function gunzip(buf: InputType, callback: CompressCallback): void;
135
-    function gunzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
136
-    namespace gunzip {
137
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
138
-    }
139
-
140
-    function gunzipSync(buf: InputType, options?: ZlibOptions): Buffer;
141
-
142
-    function inflate(buf: InputType, callback: CompressCallback): void;
143
-    function inflate(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
144
-    namespace inflate {
145
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
146
-    }
147
-
148
-    function inflateSync(buf: InputType, options?: ZlibOptions): Buffer;
149
-
150
-    function inflateRaw(buf: InputType, callback: CompressCallback): void;
151
-    function inflateRaw(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
152
-    namespace inflateRaw {
153
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
154
-    }
155
-
156
-    function inflateRawSync(buf: InputType, options?: ZlibOptions): Buffer;
157
-
158
-    function unzip(buf: InputType, callback: CompressCallback): void;
159
-    function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
160
-    namespace unzip {
161
-        function __promisify__(buffer: InputType, options?: ZlibOptions): Promise<Buffer>;
162
-    }
163
-
164
-    function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
165
-
166
-    namespace constants {
167
-        const BROTLI_DECODE: number;
168
-        const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
169
-        const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP: number;
170
-        const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES: number;
171
-        const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1: number;
172
-        const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2: number;
173
-        const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS: number;
174
-        const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET: number;
175
-        const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1: number;
176
-        const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2: number;
177
-        const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE: number;
178
-        const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT: number;
179
-        const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY: number;
180
-        const BROTLI_DECODER_ERROR_FORMAT_DISTANCE: number;
181
-        const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE: number;
182
-        const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE: number;
183
-        const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE: number;
184
-        const BROTLI_DECODER_ERROR_FORMAT_PADDING_1: number;
185
-        const BROTLI_DECODER_ERROR_FORMAT_PADDING_2: number;
186
-        const BROTLI_DECODER_ERROR_FORMAT_RESERVED: number;
187
-        const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET: number;
188
-        const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME: number;
189
-        const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM: number;
190
-        const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS: number;
191
-        const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS: number;
192
-        const BROTLI_DECODER_ERROR_UNREACHABLE: number;
193
-        const BROTLI_DECODER_NEEDS_MORE_INPUT: number;
194
-        const BROTLI_DECODER_NEEDS_MORE_OUTPUT: number;
195
-        const BROTLI_DECODER_NO_ERROR: number;
196
-        const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION: number;
197
-        const BROTLI_DECODER_PARAM_LARGE_WINDOW: number;
198
-        const BROTLI_DECODER_RESULT_ERROR: number;
199
-        const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT: number;
200
-        const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT: number;
201
-        const BROTLI_DECODER_RESULT_SUCCESS: number;
202
-        const BROTLI_DECODER_SUCCESS: number;
203
-
204
-        const BROTLI_DEFAULT_MODE: number;
205
-        const BROTLI_DEFAULT_QUALITY: number;
206
-        const BROTLI_DEFAULT_WINDOW: number;
207
-        const BROTLI_ENCODE: number;
208
-        const BROTLI_LARGE_MAX_WINDOW_BITS: number;
209
-        const BROTLI_MAX_INPUT_BLOCK_BITS: number;
210
-        const BROTLI_MAX_QUALITY: number;
211
-        const BROTLI_MAX_WINDOW_BITS: number;
212
-        const BROTLI_MIN_INPUT_BLOCK_BITS: number;
213
-        const BROTLI_MIN_QUALITY: number;
214
-        const BROTLI_MIN_WINDOW_BITS: number;
215
-
216
-        const BROTLI_MODE_FONT: number;
217
-        const BROTLI_MODE_GENERIC: number;
218
-        const BROTLI_MODE_TEXT: number;
219
-
220
-        const BROTLI_OPERATION_EMIT_METADATA: number;
221
-        const BROTLI_OPERATION_FINISH: number;
222
-        const BROTLI_OPERATION_FLUSH: number;
223
-        const BROTLI_OPERATION_PROCESS: number;
224
-
225
-        const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING: number;
226
-        const BROTLI_PARAM_LARGE_WINDOW: number;
227
-        const BROTLI_PARAM_LGBLOCK: number;
228
-        const BROTLI_PARAM_LGWIN: number;
229
-        const BROTLI_PARAM_MODE: number;
230
-        const BROTLI_PARAM_NDIRECT: number;
231
-        const BROTLI_PARAM_NPOSTFIX: number;
232
-        const BROTLI_PARAM_QUALITY: number;
233
-        const BROTLI_PARAM_SIZE_HINT: number;
234
-
235
-        const DEFLATE: number;
236
-        const DEFLATERAW: number;
237
-        const GUNZIP: number;
238
-        const GZIP: number;
239
-        const INFLATE: number;
240
-        const INFLATERAW: number;
241
-        const UNZIP: number;
242
-
243
-        // Allowed flush values.
244
-        const Z_NO_FLUSH: number;
245
-        const Z_PARTIAL_FLUSH: number;
246
-        const Z_SYNC_FLUSH: number;
247
-        const Z_FULL_FLUSH: number;
248
-        const Z_FINISH: number;
249
-        const Z_BLOCK: number;
250
-        const Z_TREES: number;
251
-
252
-        // Return codes for the compression/decompression functions.
253
-        // Negative values are errors, positive values are used for special but normal events.
254
-        const Z_OK: number;
255
-        const Z_STREAM_END: number;
256
-        const Z_NEED_DICT: number;
257
-        const Z_ERRNO: number;
258
-        const Z_STREAM_ERROR: number;
259
-        const Z_DATA_ERROR: number;
260
-        const Z_MEM_ERROR: number;
261
-        const Z_BUF_ERROR: number;
262
-        const Z_VERSION_ERROR: number;
263
-
264
-        // Compression levels.
265
-        const Z_NO_COMPRESSION: number;
266
-        const Z_BEST_SPEED: number;
267
-        const Z_BEST_COMPRESSION: number;
268
-        const Z_DEFAULT_COMPRESSION: number;
269
-
270
-        // Compression strategy.
271
-        const Z_FILTERED: number;
272
-        const Z_HUFFMAN_ONLY: number;
273
-        const Z_RLE: number;
274
-        const Z_FIXED: number;
275
-        const Z_DEFAULT_STRATEGY: number;
276
-
277
-        const Z_DEFAULT_WINDOWBITS: number;
278
-        const Z_MIN_WINDOWBITS: number;
279
-        const Z_MAX_WINDOWBITS: number;
280
-
281
-        const Z_MIN_CHUNK: number;
282
-        const Z_MAX_CHUNK: number;
283
-        const Z_DEFAULT_CHUNK: number;
284
-
285
-        const Z_MIN_MEMLEVEL: number;
286
-        const Z_MAX_MEMLEVEL: number;
287
-        const Z_DEFAULT_MEMLEVEL: number;
288
-
289
-        const Z_MIN_LEVEL: number;
290
-        const Z_MAX_LEVEL: number;
291
-        const Z_DEFAULT_LEVEL: number;
292
-
293
-        const ZLIB_VERNUM: number;
294
-    }
295
-
296
-    // Allowed flush values.
297
-    /** @deprecated Use `constants.Z_NO_FLUSH` */
298
-    const Z_NO_FLUSH: number;
299
-    /** @deprecated Use `constants.Z_PARTIAL_FLUSH` */
300
-    const Z_PARTIAL_FLUSH: number;
301
-    /** @deprecated Use `constants.Z_SYNC_FLUSH` */
302
-    const Z_SYNC_FLUSH: number;
303
-    /** @deprecated Use `constants.Z_FULL_FLUSH` */
304
-    const Z_FULL_FLUSH: number;
305
-    /** @deprecated Use `constants.Z_FINISH` */
306
-    const Z_FINISH: number;
307
-    /** @deprecated Use `constants.Z_BLOCK` */
308
-    const Z_BLOCK: number;
309
-    /** @deprecated Use `constants.Z_TREES` */
310
-    const Z_TREES: number;
311
-
312
-    // Return codes for the compression/decompression functions.
313
-    // Negative values are errors, positive values are used for special but normal events.
314
-    /** @deprecated Use `constants.Z_OK` */
315
-    const Z_OK: number;
316
-    /** @deprecated Use `constants.Z_STREAM_END` */
317
-    const Z_STREAM_END: number;
318
-    /** @deprecated Use `constants.Z_NEED_DICT` */
319
-    const Z_NEED_DICT: number;
320
-    /** @deprecated Use `constants.Z_ERRNO` */
321
-    const Z_ERRNO: number;
322
-    /** @deprecated Use `constants.Z_STREAM_ERROR` */
323
-    const Z_STREAM_ERROR: number;
324
-    /** @deprecated Use `constants.Z_DATA_ERROR` */
325
-    const Z_DATA_ERROR: number;
326
-    /** @deprecated Use `constants.Z_MEM_ERROR` */
327
-    const Z_MEM_ERROR: number;
328
-    /** @deprecated Use `constants.Z_BUF_ERROR` */
329
-    const Z_BUF_ERROR: number;
330
-    /** @deprecated Use `constants.Z_VERSION_ERROR` */
331
-    const Z_VERSION_ERROR: number;
332
-
333
-    // Compression levels.
334
-    /** @deprecated Use `constants.Z_NO_COMPRESSION` */
335
-    const Z_NO_COMPRESSION: number;
336
-    /** @deprecated Use `constants.Z_BEST_SPEED` */
337
-    const Z_BEST_SPEED: number;
338
-    /** @deprecated Use `constants.Z_BEST_COMPRESSION` */
339
-    const Z_BEST_COMPRESSION: number;
340
-    /** @deprecated Use `constants.Z_DEFAULT_COMPRESSION` */
341
-    const Z_DEFAULT_COMPRESSION: number;
342
-
343
-    // Compression strategy.
344
-    /** @deprecated Use `constants.Z_FILTERED` */
345
-    const Z_FILTERED: number;
346
-    /** @deprecated Use `constants.Z_HUFFMAN_ONLY` */
347
-    const Z_HUFFMAN_ONLY: number;
348
-    /** @deprecated Use `constants.Z_RLE` */
349
-    const Z_RLE: number;
350
-    /** @deprecated Use `constants.Z_FIXED` */
351
-    const Z_FIXED: number;
352
-    /** @deprecated Use `constants.Z_DEFAULT_STRATEGY` */
353
-    const Z_DEFAULT_STRATEGY: number;
354
-
355
-    /** @deprecated */
356
-    const Z_BINARY: number;
357
-    /** @deprecated */
358
-    const Z_TEXT: number;
359
-    /** @deprecated */
360
-    const Z_ASCII: number;
361
-    /** @deprecated  */
362
-    const Z_UNKNOWN: number;
363
-    /** @deprecated */
364
-    const Z_DEFLATED: number;
365
-}
366 0