@types/node 14.10.2 → 14.11.2
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 +3 -3
- node/child_process.d.ts +1 -1
- node/crypto.d.ts +20 -12
- node/fs.d.ts +2141 -18
- node/globals.d.ts +600 -7
- node/http.d.ts +14 -0
- node/index.d.ts +2 -1
- node/package.json +7 -7
- node/process.d.ts +397 -3
- node/{ts3.1 → ts3.4}/assert.d.ts +0 -0
- node/ts3.4/base.d.ts +37 -4
- node/{ts3.1 → ts3.4}/globals.global.d.ts +0 -0
- node/ts3.4/index.d.ts +2 -6
- node/ts3.6/index.d.ts +1 -1
- node/util.d.ts +190 -3
- node/ts3.1/base.d.ts +0 -42
- node/ts3.1/fs.d.ts +0 -2132
- node/ts3.1/globals.d.ts +0 -598
- node/ts3.1/index.d.ts +0 -44
- node/ts3.1/process.d.ts +0 -405
- node/ts3.1/util.d.ts +0 -194
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: Tue,
|
|
11
|
+
* Last updated: Tue, 22 Sep 2020 00:22:04 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
|
-
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout
|
|
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.
|