@types/node 14.11.7 → 14.11.8
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/README.md +1 -1
- node/package.json +2 -2
- node/punycode.d.ts +56 -0
- node/worker_threads.d.ts +49 -3
node/README.md
CHANGED
|
@@ -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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 09 Oct 2020 06:51:10 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.11.
|
|
3
|
+
"version": "14.11.8",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -246,6 +246,6 @@
|
|
|
246
246
|
},
|
|
247
247
|
"scripts": {},
|
|
248
248
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
249
|
+
"typesPublisherContentHash": "2648fdcf6d0b183d3a081cb17833d47c55084f5245aa4f9a8ea246ed71a45a8b",
|
|
250
250
|
"typeScriptVersion": "3.2"
|
|
251
251
|
}
|
node/punycode.d.ts
CHANGED
|
@@ -1,12 +1,68 @@
|
|
|
1
1
|
declare module "punycode" {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated since v7.0.0
|
|
4
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
5
|
+
* In a future major version of Node.js this module will be removed.
|
|
6
|
+
* Users currently depending on the punycode module should switch to using
|
|
7
|
+
* the userland-provided Punycode.js module instead.
|
|
8
|
+
*/
|
|
2
9
|
function decode(string: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated since v7.0.0
|
|
12
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
13
|
+
* In a future major version of Node.js this module will be removed.
|
|
14
|
+
* Users currently depending on the punycode module should switch to using
|
|
15
|
+
* the userland-provided Punycode.js module instead.
|
|
16
|
+
*/
|
|
3
17
|
function encode(string: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated since v7.0.0
|
|
20
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
21
|
+
* In a future major version of Node.js this module will be removed.
|
|
22
|
+
* Users currently depending on the punycode module should switch to using
|
|
23
|
+
* the userland-provided Punycode.js module instead.
|
|
24
|
+
*/
|
|
4
25
|
function toUnicode(domain: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated since v7.0.0
|
|
28
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
29
|
+
* In a future major version of Node.js this module will be removed.
|
|
30
|
+
* Users currently depending on the punycode module should switch to using
|
|
31
|
+
* the userland-provided Punycode.js module instead.
|
|
32
|
+
*/
|
|
5
33
|
function toASCII(domain: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated since v7.0.0
|
|
36
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
37
|
+
* In a future major version of Node.js this module will be removed.
|
|
38
|
+
* Users currently depending on the punycode module should switch to using
|
|
39
|
+
* the userland-provided Punycode.js module instead.
|
|
40
|
+
*/
|
|
6
41
|
const ucs2: ucs2;
|
|
7
42
|
interface ucs2 {
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated since v7.0.0
|
|
45
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
46
|
+
* In a future major version of Node.js this module will be removed.
|
|
47
|
+
* Users currently depending on the punycode module should switch to using
|
|
48
|
+
* the userland-provided Punycode.js module instead.
|
|
49
|
+
*/
|
|
8
50
|
decode(string: string): number[];
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated since v7.0.0
|
|
53
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
54
|
+
* In a future major version of Node.js this module will be removed.
|
|
55
|
+
* Users currently depending on the punycode module should switch to using
|
|
56
|
+
* the userland-provided Punycode.js module instead.
|
|
57
|
+
*/
|
|
9
58
|
encode(codePoints: number[]): string;
|
|
10
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated since v7.0.0
|
|
62
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
63
|
+
* In a future major version of Node.js this module will be removed.
|
|
64
|
+
* Users currently depending on the punycode module should switch to using
|
|
65
|
+
* the userland-provided Punycode.js module instead.
|
|
66
|
+
*/
|
|
11
67
|
const version: string;
|
|
12
68
|
}
|
node/worker_threads.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ declare module "worker_threads" {
|
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
4
|
import { Readable, Writable } from "stream";
|
|
5
5
|
import { URL } from "url";
|
|
6
|
+
import { FileHandle } from "fs/promises";
|
|
6
7
|
|
|
7
8
|
const isMainThread: boolean;
|
|
8
9
|
const parentPort: null | MessagePort;
|
|
10
|
+
const resourceLimits: ResourceLimits;
|
|
9
11
|
const SHARE_ENV: unique symbol;
|
|
10
12
|
const threadId: number;
|
|
11
13
|
const workerData: any;
|
|
@@ -15,43 +17,53 @@ declare module "worker_threads" {
|
|
|
15
17
|
readonly port2: MessagePort;
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
|
|
21
|
+
|
|
18
22
|
class MessagePort extends EventEmitter {
|
|
19
23
|
close(): void;
|
|
20
|
-
postMessage(value: any, transferList?:
|
|
24
|
+
postMessage(value: any, transferList?: TransferListItem[]): void;
|
|
21
25
|
ref(): void;
|
|
22
26
|
unref(): void;
|
|
23
27
|
start(): void;
|
|
24
28
|
|
|
25
29
|
addListener(event: "close", listener: () => void): this;
|
|
26
30
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
31
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
27
32
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
28
33
|
|
|
29
34
|
emit(event: "close"): boolean;
|
|
30
35
|
emit(event: "message", value: any): boolean;
|
|
36
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
31
37
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
32
38
|
|
|
33
39
|
on(event: "close", listener: () => void): this;
|
|
34
40
|
on(event: "message", listener: (value: any) => void): this;
|
|
41
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
35
42
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
36
43
|
|
|
37
44
|
once(event: "close", listener: () => void): this;
|
|
38
45
|
once(event: "message", listener: (value: any) => void): this;
|
|
46
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
39
47
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
40
48
|
|
|
41
49
|
prependListener(event: "close", listener: () => void): this;
|
|
42
50
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
51
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
43
52
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
44
53
|
|
|
45
54
|
prependOnceListener(event: "close", listener: () => void): this;
|
|
46
55
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
56
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
47
57
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
48
58
|
|
|
49
59
|
removeListener(event: "close", listener: () => void): this;
|
|
50
60
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
61
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
51
62
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
52
63
|
|
|
53
64
|
off(event: "close", listener: () => void): this;
|
|
54
65
|
off(event: "message", listener: (value: any) => void): this;
|
|
66
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
55
67
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
56
68
|
}
|
|
57
69
|
|
|
@@ -74,14 +86,28 @@ declare module "worker_threads" {
|
|
|
74
86
|
/**
|
|
75
87
|
* Additional data to send in the first worker message.
|
|
76
88
|
*/
|
|
77
|
-
transferList?:
|
|
89
|
+
transferList?: TransferListItem[];
|
|
78
90
|
trackUnmanagedFds?: boolean;
|
|
79
91
|
}
|
|
80
92
|
|
|
81
93
|
interface ResourceLimits {
|
|
94
|
+
/**
|
|
95
|
+
* The maximum size of a heap space for recently created objects.
|
|
96
|
+
*/
|
|
82
97
|
maxYoungGenerationSizeMb?: number;
|
|
98
|
+
/**
|
|
99
|
+
* The maximum size of the main heap in MB.
|
|
100
|
+
*/
|
|
83
101
|
maxOldGenerationSizeMb?: number;
|
|
102
|
+
/**
|
|
103
|
+
* The size of a pre-allocated memory range used for generated code.
|
|
104
|
+
*/
|
|
84
105
|
codeRangeSizeMb?: number;
|
|
106
|
+
/**
|
|
107
|
+
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
108
|
+
* @default 4
|
|
109
|
+
*/
|
|
110
|
+
stackSizeMb?: number;
|
|
85
111
|
}
|
|
86
112
|
|
|
87
113
|
class Worker extends EventEmitter {
|
|
@@ -98,7 +124,7 @@ declare module "worker_threads" {
|
|
|
98
124
|
*/
|
|
99
125
|
constructor(filename: string | URL, options?: WorkerOptions);
|
|
100
126
|
|
|
101
|
-
postMessage(value: any, transferList?:
|
|
127
|
+
postMessage(value: any, transferList?: TransferListItem[]): void;
|
|
102
128
|
ref(): void;
|
|
103
129
|
unref(): void;
|
|
104
130
|
/**
|
|
@@ -120,52 +146,72 @@ declare module "worker_threads" {
|
|
|
120
146
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
121
147
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
122
148
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
149
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
123
150
|
addListener(event: "online", listener: () => void): this;
|
|
124
151
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
125
152
|
|
|
126
153
|
emit(event: "error", err: Error): boolean;
|
|
127
154
|
emit(event: "exit", exitCode: number): boolean;
|
|
128
155
|
emit(event: "message", value: any): boolean;
|
|
156
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
129
157
|
emit(event: "online"): boolean;
|
|
130
158
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
131
159
|
|
|
132
160
|
on(event: "error", listener: (err: Error) => void): this;
|
|
133
161
|
on(event: "exit", listener: (exitCode: number) => void): this;
|
|
134
162
|
on(event: "message", listener: (value: any) => void): this;
|
|
163
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
135
164
|
on(event: "online", listener: () => void): this;
|
|
136
165
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
137
166
|
|
|
138
167
|
once(event: "error", listener: (err: Error) => void): this;
|
|
139
168
|
once(event: "exit", listener: (exitCode: number) => void): this;
|
|
140
169
|
once(event: "message", listener: (value: any) => void): this;
|
|
170
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
141
171
|
once(event: "online", listener: () => void): this;
|
|
142
172
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
143
173
|
|
|
144
174
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
145
175
|
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
146
176
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
177
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
147
178
|
prependListener(event: "online", listener: () => void): this;
|
|
148
179
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
149
180
|
|
|
150
181
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
151
182
|
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
152
183
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
184
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
153
185
|
prependOnceListener(event: "online", listener: () => void): this;
|
|
154
186
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
155
187
|
|
|
156
188
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
157
189
|
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
158
190
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
191
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
159
192
|
removeListener(event: "online", listener: () => void): this;
|
|
160
193
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
161
194
|
|
|
162
195
|
off(event: "error", listener: (err: Error) => void): this;
|
|
163
196
|
off(event: "exit", listener: (exitCode: number) => void): this;
|
|
164
197
|
off(event: "message", listener: (value: any) => void): this;
|
|
198
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
165
199
|
off(event: "online", listener: () => void): this;
|
|
166
200
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
167
201
|
}
|
|
168
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Mark an object as not transferable.
|
|
205
|
+
* If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
|
|
206
|
+
*
|
|
207
|
+
* In particular, this makes sense for objects that can be cloned, rather than transferred,
|
|
208
|
+
* and which are used by other objects on the sending side. For example, Node.js marks
|
|
209
|
+
* the `ArrayBuffer`s it uses for its Buffer pool with this.
|
|
210
|
+
*
|
|
211
|
+
* This operation cannot be undone.
|
|
212
|
+
*/
|
|
213
|
+
function markAsUntransferable(object: object): void;
|
|
214
|
+
|
|
169
215
|
/**
|
|
170
216
|
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
171
217
|
* object will be rendered unusable, and the returned `MessagePort` instance will
|