@types/node 15.14.7 → 16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {node v15.14 → node}/LICENSE +0 -0
- node v15.14/README.md → node/README.md +3 -3
- node/assert/strict.d.ts +9 -0
- node v15.14/assert.d.ts → node/assert.d.ts +35 -30
- node v15.14/async_hooks.d.ts → node/async_hooks.d.ts +7 -3
- {node v15.14 → node}/base.d.ts +0 -0
- node/buffer.d.ts +357 -0
- node v15.14/child_process.d.ts → node/child_process.d.ts +54 -50
- node v15.14/cluster.d.ts → node/cluster.d.ts +33 -108
- node v15.14/console.d.ts → node/console.d.ts +24 -23
- node v15.14/constants.d.ts → node/constants.d.ts +5 -0
- node v15.14/crypto.d.ts → node/crypto.d.ts +82 -67
- node v15.14/dgram.d.ts → node/dgram.d.ts +13 -9
- node v15.14/diagnostic_channel.d.ts → node/diagnostic_channel.d.ts +4 -0
- node v15.14/dns/promises.d.ts → node/dns/promises.d.ts +4 -0
- node v15.14/dns.d.ts → node/dns.d.ts +15 -11
- node/domain.d.ts +25 -0
- node v15.14/events.d.ts → node/events.d.ts +8 -3
- node v15.14/fs/promises.d.ts → node/fs/promises.d.ts +25 -17
- node v15.14/fs.d.ts → node/fs.d.ts +71 -75
- node/globals.d.ts +274 -0
- node/globals.global.d.ts +1 -0
- node v15.14/http.d.ts → node/http.d.ts +109 -167
- node v15.14/http2.d.ts → node/http2.d.ts +69 -66
- node/https.d.ts +40 -0
- node v15.14/index.d.ts → node/index.d.ts +1 -1
- node v15.14/inspector.d.ts → node/inspector.d.ts +152 -470
- node v15.14/module.d.ts → node/module.d.ts +25 -4
- node v15.14/net.d.ts → node/net.d.ts +34 -36
- node v15.14/os.d.ts → node/os.d.ts +4 -0
- node v15.14/package.json → node/package.json +2 -2
- node v15.14/path.d.ts → node/path.d.ts +10 -5
- node v15.14/perf_hooks.d.ts → node/perf_hooks.d.ts +70 -23
- node v15.14/process.d.ts → node/process.d.ts +54 -51
- node v15.14/punycode.d.ts → node/punycode.d.ts +4 -0
- node v15.14/querystring.d.ts → node/querystring.d.ts +7 -3
- node v15.14/readline.d.ts → node/readline.d.ts +20 -16
- node v15.14/repl.d.ts → node/repl.d.ts +18 -14
- node v15.14/stream/promises.d.ts → node/stream/promises.d.ts +4 -0
- node v15.14/stream.d.ts → node/stream.d.ts +22 -17
- node v15.14/string_decoder.d.ts → node/string_decoder.d.ts +4 -0
- node v15.14/timers/promises.d.ts → node/timers/promises.d.ts +4 -0
- node/timers.d.ts +92 -0
- node v15.14/tls.d.ts → node/tls.d.ts +54 -50
- node v15.14/trace_events.d.ts → node/trace_events.d.ts +4 -0
- node v15.14/ts3.6/assert.d.ts → node/ts3.6/assert.d.ts +26 -26
- {node v15.14 → node}/ts3.6/base.d.ts +0 -0
- {node v15.14 → node}/ts3.6/index.d.ts +0 -0
- node v15.14/tty.d.ts → node/tty.d.ts +4 -0
- node v15.14/url.d.ts → node/url.d.ts +19 -15
- node/util/types.d.ts +57 -0
- node v15.14/util.d.ts → node/util.d.ts +67 -21
- node v15.14/v8.d.ts → node/v8.d.ts +4 -0
- node v15.14/vm.d.ts → node/vm.d.ts +28 -24
- node v15.14/wasi.d.ts → node/wasi.d.ts +11 -7
- node v15.14/worker_threads.d.ts → node/worker_threads.d.ts +19 -15
- node v15.14/zlib.d.ts → node/zlib.d.ts +20 -16
- node v15.14/assert/strict.d.ts +0 -4
- node v15.14/buffer.d.ts +0 -112
- node v15.14/domain.d.ts +0 -24
- node v15.14/globals.d.ts +0 -659
- node v15.14/globals.global.d.ts +0 -1
- node v15.14/https.d.ts +0 -139
- node v15.14/timers.d.ts +0 -27
- node v15.14/util/types.d.ts +0 -53
|
@@ -1,7 +1,47 @@
|
|
|
1
1
|
declare module 'util' {
|
|
2
2
|
import * as types from 'util/types';
|
|
3
3
|
|
|
4
|
-
export interface InspectOptions
|
|
4
|
+
export interface InspectOptions {
|
|
5
|
+
/**
|
|
6
|
+
* If set to `true`, getters are going to be
|
|
7
|
+
* inspected as well. If set to `'get'` only getters without setter are going
|
|
8
|
+
* to be inspected. If set to `'set'` only getters having a corresponding
|
|
9
|
+
* setter are going to be inspected. This might cause side effects depending on
|
|
10
|
+
* the getter function.
|
|
11
|
+
* @default `false`
|
|
12
|
+
*/
|
|
13
|
+
getters?: 'get' | 'set' | boolean | undefined;
|
|
14
|
+
showHidden?: boolean | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* @default 2
|
|
17
|
+
*/
|
|
18
|
+
depth?: number | null | undefined;
|
|
19
|
+
colors?: boolean | undefined;
|
|
20
|
+
customInspect?: boolean | undefined;
|
|
21
|
+
showProxy?: boolean | undefined;
|
|
22
|
+
maxArrayLength?: number | null | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Specifies the maximum number of characters to
|
|
25
|
+
* include when formatting. Set to `null` or `Infinity` to show all elements.
|
|
26
|
+
* Set to `0` or negative to show no characters.
|
|
27
|
+
* @default 10000
|
|
28
|
+
*/
|
|
29
|
+
maxStringLength?: number | null | undefined;
|
|
30
|
+
breakLength?: number | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Setting this to `false` causes each object key
|
|
33
|
+
* to be displayed on a new line. It will also add new lines to text that is
|
|
34
|
+
* longer than `breakLength`. If set to a number, the most `n` inner elements
|
|
35
|
+
* are united on a single line as long as all properties fit into
|
|
36
|
+
* `breakLength`. Short array elements are also grouped together. Note that no
|
|
37
|
+
* text will be reduced below 16 characters, no matter the `breakLength` size.
|
|
38
|
+
* For more information, see the example below.
|
|
39
|
+
* @default `true`
|
|
40
|
+
*/
|
|
41
|
+
compact?: boolean | number | undefined;
|
|
42
|
+
sorted?: boolean | ((a: string, b: string) => number) | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
5
45
|
export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
|
|
6
46
|
export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
|
|
7
47
|
export interface InspectOptionsStylized extends InspectOptions {
|
|
@@ -9,6 +49,8 @@ declare module 'util' {
|
|
|
9
49
|
}
|
|
10
50
|
export function format(format?: any, ...param: any[]): string;
|
|
11
51
|
export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
52
|
+
export function getSystemErrorMap(): Map<number, [string, string]>;
|
|
53
|
+
|
|
12
54
|
/** @deprecated since v0.11.3 - use a third party module instead. */
|
|
13
55
|
export function log(string: string): void;
|
|
14
56
|
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
@@ -26,39 +68,39 @@ declare module 'util' {
|
|
|
26
68
|
const custom: unique symbol;
|
|
27
69
|
}
|
|
28
70
|
/** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
|
|
29
|
-
export function isArray(object:
|
|
71
|
+
export function isArray(object: unknown): object is unknown[];
|
|
30
72
|
/** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
|
|
31
|
-
export function isRegExp(object:
|
|
73
|
+
export function isRegExp(object: unknown): object is RegExp;
|
|
32
74
|
/** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
|
|
33
|
-
export function isDate(object:
|
|
75
|
+
export function isDate(object: unknown): object is Date;
|
|
34
76
|
/** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
|
|
35
|
-
export function isError(object:
|
|
36
|
-
export function inherits(constructor:
|
|
37
|
-
export function debuglog(key: string): (msg: string, ...param:
|
|
77
|
+
export function isError(object: unknown): object is Error;
|
|
78
|
+
export function inherits(constructor: unknown, superConstructor: unknown): void;
|
|
79
|
+
export function debuglog(key: string): (msg: string, ...param: unknown[]) => void;
|
|
38
80
|
/** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
|
|
39
|
-
export function isBoolean(object:
|
|
81
|
+
export function isBoolean(object: unknown): object is boolean;
|
|
40
82
|
/** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
|
|
41
|
-
export function isBuffer(object:
|
|
83
|
+
export function isBuffer(object: unknown): object is Buffer;
|
|
42
84
|
/** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
|
|
43
|
-
export function isFunction(object:
|
|
85
|
+
export function isFunction(object: unknown): boolean;
|
|
44
86
|
/** @deprecated since v4.0.0 - use `value === null` instead. */
|
|
45
|
-
export function isNull(object:
|
|
87
|
+
export function isNull(object: unknown): object is null;
|
|
46
88
|
/** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
|
|
47
|
-
export function isNullOrUndefined(object:
|
|
89
|
+
export function isNullOrUndefined(object: unknown): object is null | undefined;
|
|
48
90
|
/** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
|
|
49
|
-
export function isNumber(object:
|
|
91
|
+
export function isNumber(object: unknown): object is number;
|
|
50
92
|
/** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
|
|
51
|
-
export function isObject(object:
|
|
93
|
+
export function isObject(object: unknown): boolean;
|
|
52
94
|
/** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
|
|
53
|
-
export function isPrimitive(object:
|
|
95
|
+
export function isPrimitive(object: unknown): boolean;
|
|
54
96
|
/** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
|
|
55
|
-
export function isString(object:
|
|
97
|
+
export function isString(object: unknown): object is string;
|
|
56
98
|
/** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
|
|
57
|
-
export function isSymbol(object:
|
|
99
|
+
export function isSymbol(object: unknown): object is symbol;
|
|
58
100
|
/** @deprecated since v4.0.0 - use `value === undefined` instead. */
|
|
59
|
-
export function isUndefined(object:
|
|
101
|
+
export function isUndefined(object: unknown): object is undefined;
|
|
60
102
|
export function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
|
|
61
|
-
export function isDeepStrictEqual(val1:
|
|
103
|
+
export function isDeepStrictEqual(val1: unknown, val2: unknown): boolean;
|
|
62
104
|
|
|
63
105
|
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
64
106
|
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
@@ -126,11 +168,11 @@ declare module 'util' {
|
|
|
126
168
|
readonly ignoreBOM: boolean;
|
|
127
169
|
constructor(
|
|
128
170
|
encoding?: string,
|
|
129
|
-
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
|
171
|
+
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
|
|
130
172
|
);
|
|
131
173
|
decode(
|
|
132
174
|
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
|
|
133
|
-
options?: { stream?: boolean }
|
|
175
|
+
options?: { stream?: boolean | undefined }
|
|
134
176
|
): string;
|
|
135
177
|
}
|
|
136
178
|
|
|
@@ -154,3 +196,7 @@ declare module 'util' {
|
|
|
154
196
|
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
|
|
155
197
|
}
|
|
156
198
|
}
|
|
199
|
+
|
|
200
|
+
declare module 'node:util' {
|
|
201
|
+
export * from 'util';
|
|
202
|
+
}
|
|
@@ -5,67 +5,67 @@ declare module 'vm' {
|
|
|
5
5
|
* Specifies the filename used in stack traces produced by this script.
|
|
6
6
|
* Default: `''`.
|
|
7
7
|
*/
|
|
8
|
-
filename?: string;
|
|
8
|
+
filename?: string | undefined;
|
|
9
9
|
/**
|
|
10
10
|
* Specifies the line number offset that is displayed in stack traces produced by this script.
|
|
11
11
|
* Default: `0`.
|
|
12
12
|
*/
|
|
13
|
-
lineOffset?: number;
|
|
13
|
+
lineOffset?: number | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* Specifies the column number offset that is displayed in stack traces produced by this script.
|
|
16
16
|
* @default 0
|
|
17
17
|
*/
|
|
18
|
-
columnOffset?: number;
|
|
18
|
+
columnOffset?: number | undefined;
|
|
19
19
|
}
|
|
20
20
|
interface ScriptOptions extends BaseOptions {
|
|
21
|
-
displayErrors?: boolean;
|
|
22
|
-
timeout?: number;
|
|
23
|
-
cachedData?: Buffer;
|
|
21
|
+
displayErrors?: boolean | undefined;
|
|
22
|
+
timeout?: number | undefined;
|
|
23
|
+
cachedData?: Buffer | undefined;
|
|
24
24
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
25
|
-
produceCachedData?: boolean;
|
|
25
|
+
produceCachedData?: boolean | undefined;
|
|
26
26
|
}
|
|
27
27
|
interface RunningScriptOptions extends BaseOptions {
|
|
28
28
|
/**
|
|
29
29
|
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
|
30
30
|
* Default: `true`.
|
|
31
31
|
*/
|
|
32
|
-
displayErrors?: boolean;
|
|
32
|
+
displayErrors?: boolean | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* Specifies the number of milliseconds to execute code before terminating execution.
|
|
35
35
|
* If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
|
|
36
36
|
*/
|
|
37
|
-
timeout?: number;
|
|
37
|
+
timeout?: number | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
|
40
40
|
* 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.
|
|
41
41
|
* If execution is terminated, an `Error` will be thrown.
|
|
42
42
|
* Default: `false`.
|
|
43
43
|
*/
|
|
44
|
-
breakOnSigint?: boolean;
|
|
44
|
+
breakOnSigint?: boolean | undefined;
|
|
45
45
|
/**
|
|
46
46
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
47
47
|
*/
|
|
48
|
-
microtaskMode?: 'afterEvaluate';
|
|
48
|
+
microtaskMode?: 'afterEvaluate' | undefined;
|
|
49
49
|
}
|
|
50
50
|
interface CompileFunctionOptions extends BaseOptions {
|
|
51
51
|
/**
|
|
52
52
|
* Provides an optional data with V8's code cache data for the supplied source.
|
|
53
53
|
*/
|
|
54
|
-
cachedData?: Buffer;
|
|
54
|
+
cachedData?: Buffer | undefined;
|
|
55
55
|
/**
|
|
56
56
|
* Specifies whether to produce new cache data.
|
|
57
57
|
* Default: `false`,
|
|
58
58
|
*/
|
|
59
|
-
produceCachedData?: boolean;
|
|
59
|
+
produceCachedData?: boolean | undefined;
|
|
60
60
|
/**
|
|
61
61
|
* The sandbox/context in which the said function should be compiled in.
|
|
62
62
|
*/
|
|
63
|
-
parsingContext?: Context;
|
|
63
|
+
parsingContext?: Context | undefined;
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
|
67
67
|
*/
|
|
68
|
-
contextExtensions?: Object[];
|
|
68
|
+
contextExtensions?: Object[] | undefined;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
interface CreateContextOptions {
|
|
@@ -73,7 +73,7 @@ declare module 'vm' {
|
|
|
73
73
|
* Human-readable name of the newly created context.
|
|
74
74
|
* @default 'VM Context i' Where i is an ascending numerical index of the created context.
|
|
75
75
|
*/
|
|
76
|
-
name?: string;
|
|
76
|
+
name?: string | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* Corresponds to the newly created context for display purposes.
|
|
79
79
|
* The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
|
|
@@ -81,24 +81,24 @@ declare module 'vm' {
|
|
|
81
81
|
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
82
82
|
* @default ''
|
|
83
83
|
*/
|
|
84
|
-
origin?: string;
|
|
84
|
+
origin?: string | undefined;
|
|
85
85
|
codeGeneration?: {
|
|
86
86
|
/**
|
|
87
87
|
* If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
|
|
88
88
|
* will throw an EvalError.
|
|
89
89
|
* @default true
|
|
90
90
|
*/
|
|
91
|
-
strings?: boolean;
|
|
91
|
+
strings?: boolean | undefined;
|
|
92
92
|
/**
|
|
93
93
|
* If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
|
|
94
94
|
* @default true
|
|
95
95
|
*/
|
|
96
|
-
wasm?: boolean;
|
|
97
|
-
};
|
|
96
|
+
wasm?: boolean | undefined;
|
|
97
|
+
} | undefined;
|
|
98
98
|
/**
|
|
99
99
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
100
100
|
*/
|
|
101
|
-
microtaskMode?: 'afterEvaluate';
|
|
101
|
+
microtaskMode?: 'afterEvaluate' | undefined;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
type MeasureMemoryMode = 'summary' | 'detailed';
|
|
@@ -107,8 +107,8 @@ declare module 'vm' {
|
|
|
107
107
|
/**
|
|
108
108
|
* @default 'summary'
|
|
109
109
|
*/
|
|
110
|
-
mode?: MeasureMemoryMode;
|
|
111
|
-
context?: Context;
|
|
110
|
+
mode?: MeasureMemoryMode | undefined;
|
|
111
|
+
context?: Context | undefined;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
interface MemoryMeasurement {
|
|
@@ -124,7 +124,7 @@ declare module 'vm' {
|
|
|
124
124
|
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
|
|
125
125
|
runInThisContext(options?: RunningScriptOptions): any;
|
|
126
126
|
createCachedData(): Buffer;
|
|
127
|
-
cachedDataRejected?: boolean;
|
|
127
|
+
cachedDataRejected?: boolean | undefined;
|
|
128
128
|
}
|
|
129
129
|
function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
|
|
130
130
|
function isContext(sandbox: Context): boolean;
|
|
@@ -150,3 +150,7 @@ declare module 'vm' {
|
|
|
150
150
|
*/
|
|
151
151
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
declare module 'node:vm' {
|
|
155
|
+
export * from 'vm';
|
|
156
|
+
}
|
|
@@ -5,13 +5,13 @@ declare module 'wasi' {
|
|
|
5
5
|
* see as command line arguments. The first argument is the virtual path to the
|
|
6
6
|
* WASI command itself.
|
|
7
7
|
*/
|
|
8
|
-
args?: string[];
|
|
8
|
+
args?: string[] | undefined;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An object similar to `process.env` that the WebAssembly
|
|
12
12
|
* application will see as its environment.
|
|
13
13
|
*/
|
|
14
|
-
env?: object;
|
|
14
|
+
env?: object | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* This object represents the WebAssembly application's
|
|
@@ -19,7 +19,7 @@ declare module 'wasi' {
|
|
|
19
19
|
* directories within the sandbox. The corresponding values in `preopens` are
|
|
20
20
|
* the real paths to those directories on the host machine.
|
|
21
21
|
*/
|
|
22
|
-
preopens?: NodeJS.Dict<string
|
|
22
|
+
preopens?: NodeJS.Dict<string> | undefined;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* By default, WASI applications terminate the Node.js
|
|
@@ -28,25 +28,25 @@ declare module 'wasi' {
|
|
|
28
28
|
* process.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
|
-
returnOnExit?: boolean;
|
|
31
|
+
returnOnExit?: boolean | undefined;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The file descriptor used as standard input in the WebAssembly application.
|
|
35
35
|
* @default 0
|
|
36
36
|
*/
|
|
37
|
-
stdin?: number;
|
|
37
|
+
stdin?: number | undefined;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* The file descriptor used as standard output in the WebAssembly application.
|
|
41
41
|
* @default 1
|
|
42
42
|
*/
|
|
43
|
-
stdout?: number;
|
|
43
|
+
stdout?: number | undefined;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* The file descriptor used as standard error in the WebAssembly application.
|
|
47
47
|
* @default 2
|
|
48
48
|
*/
|
|
49
|
-
stderr?: number;
|
|
49
|
+
stderr?: number | undefined;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
class WASI {
|
|
@@ -84,3 +84,7 @@ declare module 'wasi' {
|
|
|
84
84
|
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
declare module 'node:wasi' {
|
|
89
|
+
export * from 'wasi';
|
|
90
|
+
}
|
|
@@ -81,43 +81,43 @@ declare module 'worker_threads' {
|
|
|
81
81
|
* but the values will be available on the global `process.argv` as if they
|
|
82
82
|
* were passed as CLI options to the script.
|
|
83
83
|
*/
|
|
84
|
-
argv?: any[];
|
|
85
|
-
env?: NodeJS.Dict<string> | typeof SHARE_ENV;
|
|
86
|
-
eval?: boolean;
|
|
84
|
+
argv?: any[] | undefined;
|
|
85
|
+
env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
|
|
86
|
+
eval?: boolean | undefined;
|
|
87
87
|
workerData?: any;
|
|
88
|
-
stdin?: boolean;
|
|
89
|
-
stdout?: boolean;
|
|
90
|
-
stderr?: boolean;
|
|
91
|
-
execArgv?: string[];
|
|
92
|
-
resourceLimits?: ResourceLimits;
|
|
88
|
+
stdin?: boolean | undefined;
|
|
89
|
+
stdout?: boolean | undefined;
|
|
90
|
+
stderr?: boolean | undefined;
|
|
91
|
+
execArgv?: string[] | undefined;
|
|
92
|
+
resourceLimits?: ResourceLimits | undefined;
|
|
93
93
|
/**
|
|
94
94
|
* Additional data to send in the first worker message.
|
|
95
95
|
*/
|
|
96
|
-
transferList?: TransferListItem[];
|
|
96
|
+
transferList?: TransferListItem[] | undefined;
|
|
97
97
|
/**
|
|
98
98
|
* @default true
|
|
99
99
|
*/
|
|
100
|
-
trackUnmanagedFds?: boolean;
|
|
100
|
+
trackUnmanagedFds?: boolean | undefined;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
interface ResourceLimits {
|
|
104
104
|
/**
|
|
105
105
|
* The maximum size of a heap space for recently created objects.
|
|
106
106
|
*/
|
|
107
|
-
maxYoungGenerationSizeMb?: number;
|
|
107
|
+
maxYoungGenerationSizeMb?: number | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* The maximum size of the main heap in MB.
|
|
110
110
|
*/
|
|
111
|
-
maxOldGenerationSizeMb?: number;
|
|
111
|
+
maxOldGenerationSizeMb?: number | undefined;
|
|
112
112
|
/**
|
|
113
113
|
* The size of a pre-allocated memory range used for generated code.
|
|
114
114
|
*/
|
|
115
|
-
codeRangeSizeMb?: number;
|
|
115
|
+
codeRangeSizeMb?: number | undefined;
|
|
116
116
|
/**
|
|
117
117
|
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
118
118
|
* @default 4
|
|
119
119
|
*/
|
|
120
|
-
stackSizeMb?: number;
|
|
120
|
+
stackSizeMb?: number | undefined;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
class Worker extends EventEmitter {
|
|
@@ -125,7 +125,7 @@ declare module 'worker_threads' {
|
|
|
125
125
|
readonly stdout: Readable;
|
|
126
126
|
readonly stderr: Readable;
|
|
127
127
|
readonly threadId: number;
|
|
128
|
-
readonly resourceLimits?: ResourceLimits;
|
|
128
|
+
readonly resourceLimits?: ResourceLimits | undefined;
|
|
129
129
|
readonly performance: WorkerPerformance;
|
|
130
130
|
|
|
131
131
|
/**
|
|
@@ -280,3 +280,7 @@ declare module 'worker_threads' {
|
|
|
280
280
|
*/
|
|
281
281
|
function setEnvironmentData(key: Serializable, value: Serializable): void;
|
|
282
282
|
}
|
|
283
|
+
|
|
284
|
+
declare module 'node:worker_threads' {
|
|
285
|
+
export * from 'worker_threads';
|
|
286
|
+
}
|
|
@@ -5,51 +5,51 @@ declare module 'zlib' {
|
|
|
5
5
|
/**
|
|
6
6
|
* @default constants.Z_NO_FLUSH
|
|
7
7
|
*/
|
|
8
|
-
flush?: number;
|
|
8
|
+
flush?: number | undefined;
|
|
9
9
|
/**
|
|
10
10
|
* @default constants.Z_FINISH
|
|
11
11
|
*/
|
|
12
|
-
finishFlush?: number;
|
|
12
|
+
finishFlush?: number | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* @default 16*1024
|
|
15
15
|
*/
|
|
16
|
-
chunkSize?: number;
|
|
17
|
-
windowBits?: number;
|
|
18
|
-
level?: number; // compression only
|
|
19
|
-
memLevel?: number; // compression only
|
|
20
|
-
strategy?: number; // compression only
|
|
21
|
-
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
|
22
|
-
info?: boolean;
|
|
23
|
-
maxOutputLength?: number;
|
|
16
|
+
chunkSize?: number | undefined;
|
|
17
|
+
windowBits?: number | undefined;
|
|
18
|
+
level?: number | undefined; // compression only
|
|
19
|
+
memLevel?: number | undefined; // compression only
|
|
20
|
+
strategy?: number | undefined; // compression only
|
|
21
|
+
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
|
|
22
|
+
info?: boolean | undefined;
|
|
23
|
+
maxOutputLength?: number | undefined;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
interface BrotliOptions {
|
|
27
27
|
/**
|
|
28
28
|
* @default constants.BROTLI_OPERATION_PROCESS
|
|
29
29
|
*/
|
|
30
|
-
flush?: number;
|
|
30
|
+
flush?: number | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* @default constants.BROTLI_OPERATION_FINISH
|
|
33
33
|
*/
|
|
34
|
-
finishFlush?: number;
|
|
34
|
+
finishFlush?: number | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* @default 16*1024
|
|
37
37
|
*/
|
|
38
|
-
chunkSize?: number;
|
|
38
|
+
chunkSize?: number | undefined;
|
|
39
39
|
params?: {
|
|
40
40
|
/**
|
|
41
41
|
* Each key is a `constants.BROTLI_*` constant.
|
|
42
42
|
*/
|
|
43
43
|
[key: number]: boolean | number;
|
|
44
|
-
};
|
|
45
|
-
maxOutputLength?: number;
|
|
44
|
+
} | undefined;
|
|
45
|
+
maxOutputLength?: number | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
interface Zlib {
|
|
49
49
|
/** @deprecated Use bytesWritten instead. */
|
|
50
50
|
readonly bytesRead: number;
|
|
51
51
|
readonly bytesWritten: number;
|
|
52
|
-
shell?: boolean | string;
|
|
52
|
+
shell?: boolean | string | undefined;
|
|
53
53
|
close(callback?: () => void): void;
|
|
54
54
|
flush(kind?: number, callback?: () => void): void;
|
|
55
55
|
flush(callback?: () => void): void;
|
|
@@ -359,3 +359,7 @@ declare module 'zlib' {
|
|
|
359
359
|
/** @deprecated */
|
|
360
360
|
const Z_DEFLATED: number;
|
|
361
361
|
}
|
|
362
|
+
|
|
363
|
+
declare module 'node:zlib' {
|
|
364
|
+
export * from 'zlib';
|
|
365
|
+
}
|
node v15.14/assert/strict.d.ts
DELETED
node v15.14/buffer.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
declare module 'buffer' {
|
|
2
|
-
import { BinaryLike } from 'crypto';
|
|
3
|
-
|
|
4
|
-
export const INSPECT_MAX_BYTES: number;
|
|
5
|
-
export const kMaxLength: number;
|
|
6
|
-
export const kStringMaxLength: number;
|
|
7
|
-
export const constants: {
|
|
8
|
-
MAX_LENGTH: number;
|
|
9
|
-
MAX_STRING_LENGTH: number;
|
|
10
|
-
};
|
|
11
|
-
const BuffType: typeof Buffer;
|
|
12
|
-
|
|
13
|
-
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
|
|
14
|
-
|
|
15
|
-
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
16
|
-
|
|
17
|
-
export const SlowBuffer: {
|
|
18
|
-
/** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
|
|
19
|
-
new(size: number): Buffer;
|
|
20
|
-
prototype: Buffer;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export { BuffType as Buffer };
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @experimental
|
|
27
|
-
*/
|
|
28
|
-
export interface BlobOptions {
|
|
29
|
-
/**
|
|
30
|
-
* @default 'utf8'
|
|
31
|
-
*/
|
|
32
|
-
encoding?: BufferEncoding;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The Blob content-type. The intent is for `type` to convey
|
|
36
|
-
* the MIME media type of the data, however no validation of the type format
|
|
37
|
-
* is performed.
|
|
38
|
-
*/
|
|
39
|
-
type?: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @experimental
|
|
44
|
-
*/
|
|
45
|
-
export class Blob {
|
|
46
|
-
/**
|
|
47
|
-
* Returns a promise that fulfills with an {ArrayBuffer} containing a copy of the `Blob` data.
|
|
48
|
-
*/
|
|
49
|
-
readonly size: number;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The content-type of the `Blob`.
|
|
53
|
-
*/
|
|
54
|
-
readonly type: string;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Creates a new `Blob` object containing a concatenation of the given sources.
|
|
58
|
-
*
|
|
59
|
-
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
|
60
|
-
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
|
61
|
-
*
|
|
62
|
-
* String sources are also copied into the `Blob`.
|
|
63
|
-
*/
|
|
64
|
-
constructor(sources: Array<(BinaryLike | Blob)>, options?: BlobOptions);
|
|
65
|
-
|
|
66
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @param start The starting index.
|
|
70
|
-
* @param end The ending index.
|
|
71
|
-
* @param type The content-type for the new `Blob`
|
|
72
|
-
*/
|
|
73
|
-
slice(start?: number, end?: number, type?: string): Blob;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Returns a promise that resolves the contents of the `Blob` decoded as a UTF-8 string.
|
|
77
|
-
*/
|
|
78
|
-
text(): Promise<string>;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1).
|
|
83
|
-
*
|
|
84
|
-
* This function is only provided for compatibility with legacy web platform APIs
|
|
85
|
-
* and should never be used in new code, because they use strings to represent
|
|
86
|
-
* binary data and predate the introduction of typed arrays in JavaScript.
|
|
87
|
-
* For code running using Node.js APIs, converting between base64-encoded strings
|
|
88
|
-
* and binary data should be performed using `Buffer.from(str, 'base64')` and
|
|
89
|
-
* `buf.toString('base64')`.
|
|
90
|
-
*
|
|
91
|
-
* @deprecated dom compatibility
|
|
92
|
-
*/
|
|
93
|
-
export function atob(input: string): string;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes into a string using Base64.
|
|
97
|
-
*
|
|
98
|
-
* This function is only provided for compatibility with legacy web platform APIs
|
|
99
|
-
* and should never be used in new code, because they use strings to represent
|
|
100
|
-
* binary data and predate the introduction of typed arrays in JavaScript.
|
|
101
|
-
* For code running using Node.js APIs, converting between base64-encoded strings
|
|
102
|
-
* and binary data should be performed using `Buffer.from(str, 'base64')` and
|
|
103
|
-
* `buf.toString('base64')`.
|
|
104
|
-
*
|
|
105
|
-
* @deprecated dom compatibility
|
|
106
|
-
*/
|
|
107
|
-
export function btoa(input: string): string;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
declare module 'node:buffer' {
|
|
111
|
-
export * from 'buffer';
|
|
112
|
-
}
|
node v15.14/domain.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare module 'domain' {
|
|
2
|
-
import EventEmitter = require('events');
|
|
3
|
-
|
|
4
|
-
global {
|
|
5
|
-
namespace NodeJS {
|
|
6
|
-
interface Domain extends EventEmitter {
|
|
7
|
-
run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
|
|
8
|
-
add(emitter: EventEmitter | Timer): void;
|
|
9
|
-
remove(emitter: EventEmitter | Timer): void;
|
|
10
|
-
bind<T extends Function>(cb: T): T;
|
|
11
|
-
intercept<T extends Function>(cb: T): T;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface Domain extends NodeJS.Domain {}
|
|
17
|
-
class Domain extends EventEmitter {
|
|
18
|
-
members: Array<EventEmitter | NodeJS.Timer>;
|
|
19
|
-
enter(): void;
|
|
20
|
-
exit(): void;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function create(): Domain;
|
|
24
|
-
}
|