@types/node 12.12.70 → 12.19.3
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 v12.12 → node v12.19}/LICENSE +0 -0
- {node v12.12 → node v12.19}/README.md +1 -1
- {node v12.12 → node v12.19}/assert.d.ts +18 -0
- {node v12.12 → node v12.19}/async_hooks.d.ts +13 -14
- {node v12.12 → node v12.19}/base.d.ts +0 -1
- {node v12.12 → node v12.19}/buffer.d.ts +0 -0
- {node v12.12 → node v12.19}/child_process.d.ts +0 -0
- {node v12.12 → node v12.19}/cluster.d.ts +0 -0
- {node v12.12 → node v12.19}/console.d.ts +0 -0
- {node v12.12 → node v12.19}/constants.d.ts +0 -0
- {node v12.12 → node v12.19}/crypto.d.ts +5 -0
- {node v12.12 → node v12.19}/dgram.d.ts +0 -0
- {node v12.12 → node v12.19}/dns.d.ts +0 -0
- {node v12.12 → node v12.19}/domain.d.ts +0 -0
- {node v12.12 → node v12.19}/events.d.ts +0 -0
- {node v12.12 → node v12.19}/fs.d.ts +43 -0
- {node v12.12 → node v12.19}/globals.d.ts +13 -4
- {node v12.12 → node v12.19}/globals.global.d.ts +0 -0
- {node v12.12 → node v12.19}/http.d.ts +8 -1
- {node v12.12 → node v12.19}/http2.d.ts +0 -0
- {node v12.12 → node v12.19}/https.d.ts +0 -0
- {node v12.12 → node v12.19}/index.d.ts +1 -1
- {node v12.12 → node v12.19}/inspector.d.ts +0 -0
- {node v12.12 → node v12.19}/module.d.ts +0 -0
- {node v12.12 → node v12.19}/net.d.ts +0 -0
- {node v12.12 → node v12.19}/os.d.ts +0 -0
- {node v12.12 → node v12.19}/package.json +2 -2
- {node v12.12 → node v12.19}/path.d.ts +0 -0
- {node v12.12 → node v12.19}/perf_hooks.d.ts +21 -0
- {node v12.12 → node v12.19}/process.d.ts +0 -0
- {node v12.12 → node v12.19}/punycode.d.ts +0 -0
- {node v12.12 → node v12.19}/querystring.d.ts +0 -0
- {node v12.12 → node v12.19}/readline.d.ts +0 -0
- {node v12.12 → node v12.19}/repl.d.ts +10 -2
- {node v12.12 → node v12.19}/stream.d.ts +0 -0
- {node v12.12 → node v12.19}/string_decoder.d.ts +0 -0
- {node v12.12 → node v12.19}/timers.d.ts +0 -0
- {node v12.12 → node v12.19}/tls.d.ts +12 -1
- {node v12.12 → node v12.19}/trace_events.d.ts +0 -0
- {node v12.12 → node v12.19}/ts3.3/assert.d.ts +0 -0
- {node v12.12 → node v12.19}/ts3.3/base.d.ts +0 -0
- {node v12.12 → node v12.19}/ts3.3/globals.global.d.ts +0 -0
- {node v12.12 → node v12.19}/ts3.3/index.d.ts +0 -0
- {node v12.12 → node v12.19}/ts3.6/base.d.ts +0 -1
- {node v12.12 → node v12.19}/ts3.6/index.d.ts +0 -1
- {node v12.12 → node v12.19}/tty.d.ts +0 -0
- {node v12.12 → node v12.19}/url.d.ts +0 -0
- {node v12.12 → node v12.19}/util.d.ts +0 -0
- {node v12.12 → node v12.19}/v8.d.ts +0 -0
- {node v12.12 → node v12.19}/vm.d.ts +0 -0
- {node v12.12 → node v12.19}/wasi.d.ts +0 -0
- {node v12.12 → node v12.19}/worker_threads.d.ts +29 -1
- {node v12.12 → node v12.19}/zlib.d.ts +2 -0
|
File without changes
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v12.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed,
|
|
11
|
+
* Last updated: Wed, 28 Oct 2020 18:55:42 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
|
@@ -19,6 +19,24 @@ declare module 'assert' {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
class CallTracker {
|
|
23
|
+
calls(exact?: number): () => void;
|
|
24
|
+
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
|
|
25
|
+
report(): CallTrackerReportInformation[];
|
|
26
|
+
verify(): void;
|
|
27
|
+
}
|
|
28
|
+
interface CallTrackerReportInformation {
|
|
29
|
+
message: string;
|
|
30
|
+
/** The actual number of times the function was called. */
|
|
31
|
+
actual: number;
|
|
32
|
+
/** The number of times the function was expected to be called. */
|
|
33
|
+
expected: number;
|
|
34
|
+
/** The name of the function that is wrapped. */
|
|
35
|
+
operator: string;
|
|
36
|
+
/** A stack trace of the function. */
|
|
37
|
+
stack: object;
|
|
38
|
+
}
|
|
39
|
+
|
|
22
40
|
function fail(message?: string | Error): never;
|
|
23
41
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
24
42
|
function fail(
|
|
@@ -115,6 +115,19 @@ declare module "async_hooks" {
|
|
|
115
115
|
*/
|
|
116
116
|
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Binds the given function to the current execution context.
|
|
120
|
+
* @param fn The function to bind to the current execution context.
|
|
121
|
+
* @param type An optional name to associate with the underlying `AsyncResource`.
|
|
122
|
+
*/
|
|
123
|
+
static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Binds the given function to execute to this `AsyncResource`'s scope.
|
|
127
|
+
* @param fn The function to bind to the current `AsyncResource`.
|
|
128
|
+
*/
|
|
129
|
+
bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
|
|
130
|
+
|
|
118
131
|
/**
|
|
119
132
|
* Call the provided function with the provided arguments in the
|
|
120
133
|
* execution context of the async resource. This will establish the
|
|
@@ -209,20 +222,6 @@ declare module "async_hooks" {
|
|
|
209
222
|
*/
|
|
210
223
|
exit(callback: (...args: any[]) => void, ...args: any[]): void;
|
|
211
224
|
|
|
212
|
-
/**
|
|
213
|
-
* This methods runs a function synchronously within a context and return its
|
|
214
|
-
* return value. The store is not accessible outside of the callback function or
|
|
215
|
-
* the asynchronous operations created within the callback.
|
|
216
|
-
*
|
|
217
|
-
* Optionally, arguments can be passed to the function. They will be passed to
|
|
218
|
-
* the callback function.
|
|
219
|
-
*
|
|
220
|
-
* If the callback function throws an error, it will be thrown by
|
|
221
|
-
* `runSyncAndReturn` too. The stacktrace will not be impacted by this call and
|
|
222
|
-
* the context will be exited.
|
|
223
|
-
*/
|
|
224
|
-
runSyncAndReturn<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
|
|
225
|
-
|
|
226
225
|
/**
|
|
227
226
|
* This methods runs a function synchronously outside of a context and return its
|
|
228
227
|
* return value. The store is not accessible within the callback function or
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
/// <reference lib="esnext.bigint" />
|
|
14
14
|
|
|
15
15
|
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
// tslint:disable-next-line:no-bad-reference
|
|
17
16
|
/// <reference path="ts3.6/base.d.ts" />
|
|
18
17
|
|
|
19
18
|
// TypeScript 3.7-specific augmentations:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -368,6 +368,11 @@ declare module "crypto" {
|
|
|
368
368
|
function pseudoRandomBytes(size: number): Buffer;
|
|
369
369
|
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
370
370
|
|
|
371
|
+
function randomInt(max: number): number;
|
|
372
|
+
function randomInt(min: number, max: number): number;
|
|
373
|
+
function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
|
|
374
|
+
function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
|
|
375
|
+
|
|
371
376
|
function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
|
|
372
377
|
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
|
|
373
378
|
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -346,6 +346,39 @@ declare module "fs" {
|
|
|
346
346
|
*/
|
|
347
347
|
function lchownSync(path: PathLike, uid: number, gid: number): void;
|
|
348
348
|
|
|
349
|
+
/**
|
|
350
|
+
* Changes the access and modification times of a file in the same way as `fs.utimes()`,
|
|
351
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
352
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
353
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
354
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
355
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
356
|
+
*/
|
|
357
|
+
function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: NoParamCallback): void;
|
|
358
|
+
|
|
359
|
+
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
360
|
+
namespace lutimes {
|
|
361
|
+
/**
|
|
362
|
+
* Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
|
|
363
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
364
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
365
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
366
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
367
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
368
|
+
*/
|
|
369
|
+
function __promisify__(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Change the file system timestamps of the symbolic link referenced by `path`. Returns `undefined`,
|
|
374
|
+
* or throws an exception when parameters are incorrect or the operation fails.
|
|
375
|
+
* This is the synchronous version of `fs.lutimes()`.
|
|
376
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
377
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
378
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
379
|
+
*/
|
|
380
|
+
function lutimesSync(path: PathLike, atime: string | number | Date, mtime: string | number | Date): void;
|
|
381
|
+
|
|
349
382
|
/**
|
|
350
383
|
* Asynchronous chmod(2) - Change permissions of a file.
|
|
351
384
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
@@ -2324,6 +2357,16 @@ declare module "fs" {
|
|
|
2324
2357
|
*/
|
|
2325
2358
|
function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
|
|
2326
2359
|
|
|
2360
|
+
/**
|
|
2361
|
+
* Changes the access and modification times of a file in the same way as `fsPromises.utimes()`,
|
|
2362
|
+
* with the difference that if the path refers to a symbolic link, then the link is not
|
|
2363
|
+
* dereferenced: instead, the timestamps of the symbolic link itself are changed.
|
|
2364
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
2365
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
2366
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
2367
|
+
*/
|
|
2368
|
+
function lutimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
2369
|
+
|
|
2327
2370
|
/**
|
|
2328
2371
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
2329
2372
|
* @param handle A `FileHandle`.
|
|
@@ -193,7 +193,6 @@ declare function queueMicrotask(callback: () => void): void;
|
|
|
193
193
|
|
|
194
194
|
// TODO: change to `type NodeRequireFunction = (id: string) => any;` in next mayor version.
|
|
195
195
|
interface NodeRequireFunction {
|
|
196
|
-
/* tslint:disable-next-line:callable-types */
|
|
197
196
|
(id: string): any;
|
|
198
197
|
}
|
|
199
198
|
|
|
@@ -231,7 +230,8 @@ interface NodeModule {
|
|
|
231
230
|
id: string;
|
|
232
231
|
filename: string;
|
|
233
232
|
loaded: boolean;
|
|
234
|
-
|
|
233
|
+
/** @deprecated since 12.19.0 Please use `require.main` and `module.children` instead. */
|
|
234
|
+
parent: NodeModule | null | undefined;
|
|
235
235
|
children: NodeModule[];
|
|
236
236
|
/**
|
|
237
237
|
* @since 11.14.0
|
|
@@ -934,10 +934,16 @@ declare namespace NodeJS {
|
|
|
934
934
|
tls_ocsp: boolean;
|
|
935
935
|
tls: boolean;
|
|
936
936
|
};
|
|
937
|
+
/**
|
|
938
|
+
* @deprecated since v12.19.0 - Calling process.umask() with no argument causes
|
|
939
|
+
* the process-wide umask to be written twice. This introduces a race condition between threads,
|
|
940
|
+
* and is a potential security vulnerability. There is no safe, cross-platform alternative API.
|
|
941
|
+
*/
|
|
942
|
+
umask(): number;
|
|
937
943
|
/**
|
|
938
944
|
* Can only be set if not in worker thread.
|
|
939
945
|
*/
|
|
940
|
-
umask(mask
|
|
946
|
+
umask(mask: string | number): number;
|
|
941
947
|
uptime(): number;
|
|
942
948
|
hrtime: HRTime;
|
|
943
949
|
domain: Domain;
|
|
@@ -1140,6 +1146,7 @@ declare namespace NodeJS {
|
|
|
1140
1146
|
ref(): this;
|
|
1141
1147
|
refresh(): this;
|
|
1142
1148
|
unref(): this;
|
|
1149
|
+
[Symbol.toPrimitive](): number;
|
|
1143
1150
|
}
|
|
1144
1151
|
|
|
1145
1152
|
class Immediate {
|
|
@@ -1154,6 +1161,7 @@ declare namespace NodeJS {
|
|
|
1154
1161
|
ref(): this;
|
|
1155
1162
|
refresh(): this;
|
|
1156
1163
|
unref(): this;
|
|
1164
|
+
[Symbol.toPrimitive](): number;
|
|
1157
1165
|
}
|
|
1158
1166
|
|
|
1159
1167
|
class Module {
|
|
@@ -1174,7 +1182,8 @@ declare namespace NodeJS {
|
|
|
1174
1182
|
id: string;
|
|
1175
1183
|
filename: string;
|
|
1176
1184
|
loaded: boolean;
|
|
1177
|
-
|
|
1185
|
+
/** @deprecated since 12.19.0 Please use `require.main` and `module.children` instead. */
|
|
1186
|
+
parent: Module | null | undefined;
|
|
1178
1187
|
children: Module[];
|
|
1179
1188
|
/**
|
|
1180
1189
|
* @since 11.14.0
|
|
File without changes
|
|
@@ -177,7 +177,9 @@ declare module "http" {
|
|
|
177
177
|
class ClientRequest extends OutgoingMessage {
|
|
178
178
|
connection: Socket;
|
|
179
179
|
socket: Socket;
|
|
180
|
-
aborted:
|
|
180
|
+
aborted: boolean;
|
|
181
|
+
host: string;
|
|
182
|
+
protocol: string;
|
|
181
183
|
|
|
182
184
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
183
185
|
|
|
@@ -317,6 +319,10 @@ declare module "http" {
|
|
|
317
319
|
* Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
|
|
318
320
|
*/
|
|
319
321
|
maxSockets?: number;
|
|
322
|
+
/**
|
|
323
|
+
* Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
|
|
324
|
+
*/
|
|
325
|
+
maxTotalSockets?: number;
|
|
320
326
|
/**
|
|
321
327
|
* Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
|
|
322
328
|
*/
|
|
@@ -330,6 +336,7 @@ declare module "http" {
|
|
|
330
336
|
class Agent {
|
|
331
337
|
maxFreeSockets: number;
|
|
332
338
|
maxSockets: number;
|
|
339
|
+
maxTotalSockets: number;
|
|
333
340
|
readonly sockets: {
|
|
334
341
|
readonly [key: string]: Socket[];
|
|
335
342
|
};
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 12.
|
|
1
|
+
// Type definitions for non-npm package Node.js 12.19
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.19.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -231,6 +231,6 @@
|
|
|
231
231
|
},
|
|
232
232
|
"scripts": {},
|
|
233
233
|
"dependencies": {},
|
|
234
|
-
"typesPublisherContentHash": "
|
|
234
|
+
"typesPublisherContentHash": "2c54a3dc12b0737e45c6349001eb83bc25002db2614ed5ccf9e9c4facdf40d36",
|
|
235
235
|
"typeScriptVersion": "3.2"
|
|
236
236
|
}
|
|
File without changes
|
|
@@ -45,6 +45,11 @@ declare module "perf_hooks" {
|
|
|
45
45
|
*/
|
|
46
46
|
readonly environment: number;
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The high resolution millisecond timestamp at which the Node.js environment was initialized.
|
|
50
|
+
*/
|
|
51
|
+
readonly idleTime: number;
|
|
52
|
+
|
|
48
53
|
/**
|
|
49
54
|
* The high resolution millisecond timestamp at which the Node.js event loop exited.
|
|
50
55
|
* If the event loop has not yet exited, the property has the value of -1.
|
|
@@ -69,6 +74,12 @@ declare module "perf_hooks" {
|
|
|
69
74
|
readonly v8Start: number;
|
|
70
75
|
}
|
|
71
76
|
|
|
77
|
+
interface EventLoopUtilization {
|
|
78
|
+
idle: number;
|
|
79
|
+
active: number;
|
|
80
|
+
utilization: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
72
83
|
interface Performance {
|
|
73
84
|
/**
|
|
74
85
|
* If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
|
|
@@ -124,6 +135,16 @@ declare module "perf_hooks" {
|
|
|
124
135
|
* @param fn
|
|
125
136
|
*/
|
|
126
137
|
timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
|
|
141
|
+
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
|
|
142
|
+
* No other CPU idle time is taken into consideration.
|
|
143
|
+
*
|
|
144
|
+
* @param util1 The result of a previous call to eventLoopUtilization()
|
|
145
|
+
* @param util2 The result of a previous call to eventLoopUtilization() prior to util1
|
|
146
|
+
*/
|
|
147
|
+
eventLoopUtilization(util1?: EventLoopUtilization, util2?: EventLoopUtilization): EventLoopUtilization;
|
|
127
148
|
}
|
|
128
149
|
|
|
129
150
|
interface PerformanceObserverEntryList {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -131,13 +131,21 @@ declare module "repl" {
|
|
|
131
131
|
*/
|
|
132
132
|
readonly context: Context;
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
134
|
+
* Outdated alias for `input`.
|
|
135
135
|
*/
|
|
136
136
|
readonly inputStream: NodeJS.ReadableStream;
|
|
137
137
|
/**
|
|
138
|
-
*
|
|
138
|
+
* Outdated alias for `output`.
|
|
139
139
|
*/
|
|
140
140
|
readonly outputStream: NodeJS.WritableStream;
|
|
141
|
+
/**
|
|
142
|
+
* The `Readable` stream from which REPL input will be read.
|
|
143
|
+
*/
|
|
144
|
+
readonly input: NodeJS.ReadableStream;
|
|
145
|
+
/**
|
|
146
|
+
* The `Writable` stream to which REPL output will be written.
|
|
147
|
+
*/
|
|
148
|
+
readonly output: NodeJS.WritableStream;
|
|
141
149
|
/**
|
|
142
150
|
* The commands registered via `replServer.defineCommand()`.
|
|
143
151
|
*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -641,6 +641,17 @@ declare module "tls" {
|
|
|
641
641
|
* shared between applications. Unused by clients.
|
|
642
642
|
*/
|
|
643
643
|
sessionIdContext?: string;
|
|
644
|
+
/**
|
|
645
|
+
* 48-bytes of cryptographically strong pseudo-random data.
|
|
646
|
+
* See Session Resumption for more information.
|
|
647
|
+
*/
|
|
648
|
+
ticketKeys?: Buffer;
|
|
649
|
+
/**
|
|
650
|
+
* The number of seconds after which a TLS session created by the
|
|
651
|
+
* server will no longer be resumable. See Session Resumption for more
|
|
652
|
+
* information. Default: 300.
|
|
653
|
+
*/
|
|
654
|
+
sessionTimeout?: number;
|
|
644
655
|
}
|
|
645
656
|
|
|
646
657
|
interface SecureContext {
|
|
@@ -664,7 +675,7 @@ declare module "tls" {
|
|
|
664
675
|
* @deprecated
|
|
665
676
|
*/
|
|
666
677
|
function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
|
|
667
|
-
function createSecureContext(
|
|
678
|
+
function createSecureContext(options?: SecureContextOptions): SecureContext;
|
|
668
679
|
function getCiphers(): string[];
|
|
669
680
|
|
|
670
681
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
/// <reference lib="esnext.bigint" />
|
|
14
14
|
|
|
15
15
|
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
// tslint:disable-next-line:no-bad-reference
|
|
17
16
|
/// <reference path="../ts3.3/base.d.ts" />
|
|
18
17
|
|
|
19
18
|
// TypeScript 3.5-specific augmentations:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ declare module "worker_threads" {
|
|
|
2
2
|
import { Context } from "vm";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
4
|
import { Readable, Writable } from "stream";
|
|
5
|
+
import { promises } from "fs";
|
|
5
6
|
|
|
6
7
|
const isMainThread: boolean;
|
|
7
8
|
const parentPort: null | MessagePort;
|
|
@@ -15,7 +16,7 @@ declare module "worker_threads" {
|
|
|
15
16
|
readonly port2: MessagePort;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
type TransferListItem = ArrayBuffer | MessagePort;
|
|
19
|
+
type TransferListItem = ArrayBuffer | MessagePort | promises.FileHandle;
|
|
19
20
|
|
|
20
21
|
class MessagePort extends EventEmitter {
|
|
21
22
|
close(): void;
|
|
@@ -70,6 +71,7 @@ declare module "worker_threads" {
|
|
|
70
71
|
* Additional data to send in the first worker message.
|
|
71
72
|
*/
|
|
72
73
|
transferList?: TransferListItem[];
|
|
74
|
+
trackUnmanagedFds?: boolean;
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
interface ResourceLimits {
|
|
@@ -85,6 +87,11 @@ declare module "worker_threads" {
|
|
|
85
87
|
* The size of a pre-allocated memory range used for generated code.
|
|
86
88
|
*/
|
|
87
89
|
codeRangeSizeMb?: number;
|
|
90
|
+
/**
|
|
91
|
+
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
92
|
+
* @default 4
|
|
93
|
+
*/
|
|
94
|
+
stackSizeMb?: number;
|
|
88
95
|
}
|
|
89
96
|
|
|
90
97
|
class Worker extends EventEmitter {
|
|
@@ -92,6 +99,7 @@ declare module "worker_threads" {
|
|
|
92
99
|
readonly stdout: Readable;
|
|
93
100
|
readonly stderr: Readable;
|
|
94
101
|
readonly threadId: number;
|
|
102
|
+
readonly resourceLimits?: ResourceLimits;
|
|
95
103
|
|
|
96
104
|
constructor(filename: string, options?: WorkerOptions);
|
|
97
105
|
|
|
@@ -107,52 +115,72 @@ declare module "worker_threads" {
|
|
|
107
115
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
108
116
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
109
117
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
118
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
110
119
|
addListener(event: "online", listener: () => void): this;
|
|
111
120
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
112
121
|
|
|
113
122
|
emit(event: "error", err: Error): boolean;
|
|
114
123
|
emit(event: "exit", exitCode: number): boolean;
|
|
115
124
|
emit(event: "message", value: any): boolean;
|
|
125
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
116
126
|
emit(event: "online"): boolean;
|
|
117
127
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
118
128
|
|
|
119
129
|
on(event: "error", listener: (err: Error) => void): this;
|
|
120
130
|
on(event: "exit", listener: (exitCode: number) => void): this;
|
|
121
131
|
on(event: "message", listener: (value: any) => void): this;
|
|
132
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
122
133
|
on(event: "online", listener: () => void): this;
|
|
123
134
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
124
135
|
|
|
125
136
|
once(event: "error", listener: (err: Error) => void): this;
|
|
126
137
|
once(event: "exit", listener: (exitCode: number) => void): this;
|
|
127
138
|
once(event: "message", listener: (value: any) => void): this;
|
|
139
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
128
140
|
once(event: "online", listener: () => void): this;
|
|
129
141
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
130
142
|
|
|
131
143
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
132
144
|
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
133
145
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
146
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
134
147
|
prependListener(event: "online", listener: () => void): this;
|
|
135
148
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
136
149
|
|
|
137
150
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
138
151
|
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
139
152
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
153
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
140
154
|
prependOnceListener(event: "online", listener: () => void): this;
|
|
141
155
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
142
156
|
|
|
143
157
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
144
158
|
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
145
159
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
160
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
146
161
|
removeListener(event: "online", listener: () => void): this;
|
|
147
162
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
148
163
|
|
|
149
164
|
off(event: "error", listener: (err: Error) => void): this;
|
|
150
165
|
off(event: "exit", listener: (exitCode: number) => void): this;
|
|
151
166
|
off(event: "message", listener: (value: any) => void): this;
|
|
167
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
152
168
|
off(event: "online", listener: () => void): this;
|
|
153
169
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
154
170
|
}
|
|
155
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Mark an object as not transferable.
|
|
174
|
+
* If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
|
|
175
|
+
*
|
|
176
|
+
* In particular, this makes sense for objects that can be cloned, rather than transferred,
|
|
177
|
+
* and which are used by other objects on the sending side. For example, Node.js marks
|
|
178
|
+
* the `ArrayBuffer`s it uses for its Buffer pool with this.
|
|
179
|
+
*
|
|
180
|
+
* This operation cannot be undone.
|
|
181
|
+
*/
|
|
182
|
+
function markAsUntransferable(object: object): void;
|
|
183
|
+
|
|
156
184
|
/**
|
|
157
185
|
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
158
186
|
* object will be rendered unusable, and the returned `MessagePort` instance will
|
|
@@ -20,6 +20,7 @@ declare module "zlib" {
|
|
|
20
20
|
strategy?: number; // compression only
|
|
21
21
|
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
|
22
22
|
info?: boolean;
|
|
23
|
+
maxOutputLength?: number;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
interface BrotliOptions {
|
|
@@ -41,6 +42,7 @@ declare module "zlib" {
|
|
|
41
42
|
*/
|
|
42
43
|
[key: number]: boolean | number;
|
|
43
44
|
};
|
|
45
|
+
maxOutputLength?: number;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
interface Zlib {
|