@types/node 14.10.3 → 14.11.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/README.md +2 -2
- node/child_process.d.ts +1 -1
- node/crypto.d.ts +20 -12
- node/http.d.ts +16 -4
- node/index.d.ts +2 -1
- node/package.json +7 -2
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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: Mon, 05 Oct 2020 22:04:50 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
|
|
|
15
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), [Alexander T.](https://github.com/a-tarasyuk), [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), [Flarna](https://github.com/Flarna), [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), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [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),
|
|
16
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [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), [Flarna](https://github.com/Flarna), [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), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [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), and [Victor Perin](https://github.com/victorperin).
|
node/child_process.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ declare module "child_process" {
|
|
|
23
23
|
readonly pid: number;
|
|
24
24
|
readonly connected: boolean;
|
|
25
25
|
readonly exitCode: number | null;
|
|
26
|
-
readonly signalCode:
|
|
26
|
+
readonly signalCode: NodeJS.Signals | null;
|
|
27
27
|
readonly spawnargs: string[];
|
|
28
28
|
readonly spawnfile: string;
|
|
29
29
|
kill(signal?: NodeJS.Signals | number): boolean;
|
node/crypto.d.ts
CHANGED
|
@@ -211,14 +211,14 @@ declare module "crypto" {
|
|
|
211
211
|
final(output_encoding: BufferEncoding): string;
|
|
212
212
|
setAutoPadding(auto_padding?: boolean): this;
|
|
213
213
|
// getAuthTag(): Buffer;
|
|
214
|
-
// setAAD(buffer:
|
|
214
|
+
// setAAD(buffer: NodeJS.ArrayBufferView): this;
|
|
215
215
|
}
|
|
216
216
|
interface CipherCCM extends Cipher {
|
|
217
|
-
setAAD(buffer:
|
|
217
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
|
|
218
218
|
getAuthTag(): Buffer;
|
|
219
219
|
}
|
|
220
220
|
interface CipherGCM extends Cipher {
|
|
221
|
-
setAAD(buffer:
|
|
221
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
222
222
|
getAuthTag(): Buffer;
|
|
223
223
|
}
|
|
224
224
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
@@ -282,16 +282,27 @@ declare module "crypto" {
|
|
|
282
282
|
|
|
283
283
|
function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
|
|
284
284
|
|
|
285
|
+
type DSAEncoding = 'der' | 'ieee-p1363';
|
|
286
|
+
|
|
285
287
|
interface SigningOptions {
|
|
286
288
|
/**
|
|
287
289
|
* @See crypto.constants.RSA_PKCS1_PADDING
|
|
288
290
|
*/
|
|
289
291
|
padding?: number;
|
|
290
292
|
saltLength?: number;
|
|
293
|
+
dsaEncoding?: DSAEncoding;
|
|
291
294
|
}
|
|
292
295
|
|
|
293
296
|
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {
|
|
294
297
|
}
|
|
298
|
+
interface SignKeyObjectInput extends SigningOptions {
|
|
299
|
+
key: KeyObject;
|
|
300
|
+
}
|
|
301
|
+
interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {
|
|
302
|
+
}
|
|
303
|
+
interface VerifyKeyObjectInput extends SigningOptions {
|
|
304
|
+
key: KeyObject;
|
|
305
|
+
}
|
|
295
306
|
|
|
296
307
|
type KeyLike = string | Buffer | KeyObject;
|
|
297
308
|
|
|
@@ -300,8 +311,8 @@ declare module "crypto" {
|
|
|
300
311
|
|
|
301
312
|
update(data: BinaryLike): Signer;
|
|
302
313
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
|
303
|
-
sign(private_key:
|
|
304
|
-
sign(private_key:
|
|
314
|
+
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
315
|
+
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, output_format: HexBase64Latin1Encoding): string;
|
|
305
316
|
}
|
|
306
317
|
|
|
307
318
|
function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
|
|
@@ -310,8 +321,8 @@ declare module "crypto" {
|
|
|
310
321
|
|
|
311
322
|
update(data: BinaryLike): Verify;
|
|
312
323
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
|
|
313
|
-
verify(object:
|
|
314
|
-
verify(object:
|
|
324
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
|
325
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
|
|
315
326
|
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
|
|
316
327
|
// The signature field accepts a TypedArray type, but it is only available starting ES2017
|
|
317
328
|
}
|
|
@@ -672,10 +683,7 @@ declare module "crypto" {
|
|
|
672
683
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
673
684
|
* passed to [`crypto.createPrivateKey()`][].
|
|
674
685
|
*/
|
|
675
|
-
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignPrivateKeyInput): Buffer;
|
|
676
|
-
|
|
677
|
-
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {
|
|
678
|
-
}
|
|
686
|
+
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
679
687
|
|
|
680
688
|
/**
|
|
681
689
|
* Calculates and returns the signature for `data` using the given private key and
|
|
@@ -685,7 +693,7 @@ declare module "crypto" {
|
|
|
685
693
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
686
694
|
* passed to [`crypto.createPublicKey()`][].
|
|
687
695
|
*/
|
|
688
|
-
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike |
|
|
696
|
+
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
|
689
697
|
|
|
690
698
|
/**
|
|
691
699
|
* Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
|
node/http.d.ts
CHANGED
|
@@ -131,6 +131,12 @@ declare module "http" {
|
|
|
131
131
|
*/
|
|
132
132
|
headersTimeout: number;
|
|
133
133
|
keepAliveTimeout: number;
|
|
134
|
+
/**
|
|
135
|
+
* Sets the timeout value in milliseconds for receiving the entire request from the client.
|
|
136
|
+
* @default 0
|
|
137
|
+
* {@link https://nodejs.org/api/http.html#http_server_requesttimeout}
|
|
138
|
+
*/
|
|
139
|
+
requestTimeout: number;
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
interface Server extends HttpBase {}
|
|
@@ -154,8 +160,8 @@ declare module "http" {
|
|
|
154
160
|
/**
|
|
155
161
|
* @deprecate Use `socket` instead.
|
|
156
162
|
*/
|
|
157
|
-
connection: Socket;
|
|
158
|
-
socket: Socket;
|
|
163
|
+
connection: Socket | null;
|
|
164
|
+
socket: Socket | null;
|
|
159
165
|
|
|
160
166
|
constructor();
|
|
161
167
|
|
|
@@ -199,8 +205,6 @@ declare module "http" {
|
|
|
199
205
|
|
|
200
206
|
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
|
|
201
207
|
class ClientRequest extends OutgoingMessage {
|
|
202
|
-
connection: Socket;
|
|
203
|
-
socket: Socket;
|
|
204
208
|
aborted: number;
|
|
205
209
|
|
|
206
210
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
@@ -345,6 +349,10 @@ declare module "http" {
|
|
|
345
349
|
* Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
|
|
346
350
|
*/
|
|
347
351
|
maxSockets?: number;
|
|
352
|
+
/**
|
|
353
|
+
* Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
|
|
354
|
+
*/
|
|
355
|
+
maxTotalSockets?: number;
|
|
348
356
|
/**
|
|
349
357
|
* Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
|
|
350
358
|
*/
|
|
@@ -353,6 +361,10 @@ declare module "http" {
|
|
|
353
361
|
* Socket timeout in milliseconds. This will set the timeout after the socket is connected.
|
|
354
362
|
*/
|
|
355
363
|
timeout?: number;
|
|
364
|
+
/**
|
|
365
|
+
* Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
|
|
366
|
+
*/
|
|
367
|
+
scheduling?: 'fifo' | 'lifo';
|
|
356
368
|
}
|
|
357
369
|
|
|
358
370
|
class Agent {
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 14.
|
|
1
|
+
// Type definitions for non-npm package Node.js 14.11
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
|
44
44
|
// Anna Henningsen <https://github.com/addaleax>
|
|
45
45
|
// Jason Kwok <https://github.com/JasonHK>
|
|
46
|
+
// Victor Perin <https://github.com/victorperin>
|
|
46
47
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
47
48
|
|
|
48
49
|
// NOTE: These definitions support NodeJS and TypeScript 3.7.
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.11.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -218,6 +218,11 @@
|
|
|
218
218
|
"name": "Jason Kwok",
|
|
219
219
|
"url": "https://github.com/JasonHK",
|
|
220
220
|
"githubUsername": "JasonHK"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "Victor Perin",
|
|
224
|
+
"url": "https://github.com/victorperin",
|
|
225
|
+
"githubUsername": "victorperin"
|
|
221
226
|
}
|
|
222
227
|
],
|
|
223
228
|
"main": "",
|
|
@@ -241,6 +246,6 @@
|
|
|
241
246
|
},
|
|
242
247
|
"scripts": {},
|
|
243
248
|
"dependencies": {},
|
|
244
|
-
"typesPublisherContentHash": "
|
|
249
|
+
"typesPublisherContentHash": "e61b1046b3b57702fa1490be3eac265478a0632828289948b939a4312112135b",
|
|
245
250
|
"typeScriptVersion": "3.2"
|
|
246
251
|
}
|