@types/node 10.17.47 → 10.17.51
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 v10.17/README.md +1 -1
- node v10.17/assert.d.ts +14 -10
- node v10.17/crypto.d.ts +323 -82
- node v10.17/domain.d.ts +5 -5
- node v10.17/events.d.ts +18 -27
- node v10.17/http.d.ts +1 -1
- node v10.17/package.json +3 -3
- node v10.17/stream.d.ts +3 -3
- node v10.17/ts3.6/assert.d.ts +14 -10
node v10.17/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/v10.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 14 Jan 2021 21:29:59 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v10.17/assert.d.ts
CHANGED
|
@@ -15,10 +15,13 @@ declare module 'assert' {
|
|
|
15
15
|
actual?: any;
|
|
16
16
|
expected?: any;
|
|
17
17
|
operator?: string;
|
|
18
|
+
// tslint:disable-next-line:ban-types
|
|
18
19
|
stackStartFn?: Function;
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
|
|
24
|
+
|
|
22
25
|
function fail(message?: string | Error): never;
|
|
23
26
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
24
27
|
function fail(
|
|
@@ -26,6 +29,7 @@ declare module 'assert' {
|
|
|
26
29
|
expected: any,
|
|
27
30
|
message?: string | Error,
|
|
28
31
|
operator?: string,
|
|
32
|
+
// tslint:disable-next-line:ban-types
|
|
29
33
|
stackStartFn?: Function,
|
|
30
34
|
): never;
|
|
31
35
|
function ok(value: any, message?: string | Error): asserts value;
|
|
@@ -42,23 +46,23 @@ declare module 'assert' {
|
|
|
42
46
|
function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
|
|
43
47
|
function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
44
48
|
|
|
45
|
-
function throws(block:
|
|
46
|
-
function throws(block:
|
|
47
|
-
function doesNotThrow(block:
|
|
48
|
-
function doesNotThrow(block:
|
|
49
|
+
function throws(block: () => any, message?: string | Error): void;
|
|
50
|
+
function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
51
|
+
function doesNotThrow(block: () => any, message?: string | Error): void;
|
|
52
|
+
function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
49
53
|
|
|
50
54
|
function ifError(value: any): asserts value is null | undefined;
|
|
51
55
|
|
|
52
|
-
function rejects(block:
|
|
56
|
+
function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
53
57
|
function rejects(
|
|
54
|
-
block:
|
|
55
|
-
error:
|
|
58
|
+
block: (() => Promise<any>) | Promise<any>,
|
|
59
|
+
error: AssertPredicate,
|
|
56
60
|
message?: string | Error,
|
|
57
61
|
): Promise<void>;
|
|
58
|
-
function doesNotReject(block:
|
|
62
|
+
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
59
63
|
function doesNotReject(
|
|
60
|
-
block:
|
|
61
|
-
error:
|
|
64
|
+
block: (() => Promise<any>) | Promise<any>,
|
|
65
|
+
error: AssertPredicate,
|
|
62
66
|
message?: string | Error,
|
|
63
67
|
): Promise<void>;
|
|
64
68
|
|
node v10.17/crypto.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import * as stream from
|
|
1
|
+
declare module 'crypto' {
|
|
2
|
+
import * as stream from 'stream';
|
|
3
3
|
|
|
4
4
|
interface Certificate {
|
|
5
5
|
exportChallenge(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
|
|
@@ -7,7 +7,7 @@ declare module "crypto" {
|
|
|
7
7
|
verifySpkac(spkac: Buffer | NodeJS.TypedArray | DataView): boolean;
|
|
8
8
|
}
|
|
9
9
|
const Certificate: {
|
|
10
|
-
new(): Certificate;
|
|
10
|
+
new (): Certificate;
|
|
11
11
|
(): Certificate;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -24,17 +24,23 @@ declare module "crypto" {
|
|
|
24
24
|
ciphers: string;
|
|
25
25
|
}
|
|
26
26
|
/** @deprecated since v0.11.13 - use tls.SecureContext instead. */
|
|
27
|
-
interface Credentials {
|
|
27
|
+
interface Credentials {
|
|
28
|
+
context?: any;
|
|
29
|
+
}
|
|
28
30
|
/** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
|
|
29
31
|
function createCredentials(details: CredentialDetails): Credentials;
|
|
30
32
|
function createHash(algorithm: string, options?: stream.TransformOptions): Hash;
|
|
31
|
-
function createHmac(
|
|
33
|
+
function createHmac(
|
|
34
|
+
algorithm: string,
|
|
35
|
+
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
36
|
+
options?: stream.TransformOptions,
|
|
37
|
+
): Hmac;
|
|
32
38
|
|
|
33
|
-
type Utf8AsciiLatin1Encoding =
|
|
34
|
-
type HexBase64Latin1Encoding =
|
|
35
|
-
type Utf8AsciiBinaryEncoding =
|
|
36
|
-
type HexBase64BinaryEncoding =
|
|
37
|
-
type ECDHKeyFormat =
|
|
39
|
+
type Utf8AsciiLatin1Encoding = 'utf8' | 'ascii' | 'latin1';
|
|
40
|
+
type HexBase64Latin1Encoding = 'latin1' | 'hex' | 'base64';
|
|
41
|
+
type Utf8AsciiBinaryEncoding = 'utf8' | 'ascii' | 'binary';
|
|
42
|
+
type HexBase64BinaryEncoding = 'binary' | 'base64' | 'hex';
|
|
43
|
+
type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
|
|
38
44
|
|
|
39
45
|
interface Hash extends stream.Transform {
|
|
40
46
|
update(data: string | Buffer | NodeJS.TypedArray | DataView): Hash;
|
|
@@ -57,21 +63,52 @@ declare module "crypto" {
|
|
|
57
63
|
authTagLength?: number;
|
|
58
64
|
}
|
|
59
65
|
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
60
|
-
function createCipher(
|
|
66
|
+
function createCipher(
|
|
67
|
+
algorithm: CipherCCMTypes,
|
|
68
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
69
|
+
options: CipherCCMOptions,
|
|
70
|
+
): CipherCCM;
|
|
61
71
|
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
62
|
-
function createCipher(
|
|
72
|
+
function createCipher(
|
|
73
|
+
algorithm: CipherGCMTypes,
|
|
74
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
75
|
+
options?: CipherGCMOptions,
|
|
76
|
+
): CipherGCM;
|
|
63
77
|
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
64
|
-
function createCipher(
|
|
78
|
+
function createCipher(
|
|
79
|
+
algorithm: string,
|
|
80
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
81
|
+
options?: stream.TransformOptions,
|
|
82
|
+
): Cipher;
|
|
65
83
|
|
|
66
|
-
function createCipheriv(
|
|
67
|
-
|
|
68
|
-
|
|
84
|
+
function createCipheriv(
|
|
85
|
+
algorithm: CipherCCMTypes,
|
|
86
|
+
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
87
|
+
iv: string | Buffer | NodeJS.TypedArray | DataView,
|
|
88
|
+
options: CipherCCMOptions,
|
|
89
|
+
): CipherCCM;
|
|
90
|
+
function createCipheriv(
|
|
91
|
+
algorithm: CipherGCMTypes,
|
|
92
|
+
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
93
|
+
iv: string | Buffer | NodeJS.TypedArray | DataView,
|
|
94
|
+
options?: CipherGCMOptions,
|
|
95
|
+
): CipherGCM;
|
|
96
|
+
function createCipheriv(
|
|
97
|
+
algorithm: string,
|
|
98
|
+
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
99
|
+
iv: string | Buffer | NodeJS.TypedArray | DataView,
|
|
100
|
+
options?: stream.TransformOptions,
|
|
101
|
+
): Cipher;
|
|
69
102
|
|
|
70
103
|
interface Cipher extends stream.Transform {
|
|
71
104
|
update(data: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
|
|
72
105
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
|
73
106
|
update(data: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64BinaryEncoding): string;
|
|
74
|
-
update(
|
|
107
|
+
update(
|
|
108
|
+
data: Buffer | NodeJS.TypedArray | DataView,
|
|
109
|
+
input_encoding: any,
|
|
110
|
+
output_encoding: HexBase64BinaryEncoding,
|
|
111
|
+
): string;
|
|
75
112
|
// second arg ignored
|
|
76
113
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string;
|
|
77
114
|
final(): Buffer;
|
|
@@ -89,11 +126,23 @@ declare module "crypto" {
|
|
|
89
126
|
getAuthTag(): Buffer;
|
|
90
127
|
}
|
|
91
128
|
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
92
|
-
function createDecipher(
|
|
129
|
+
function createDecipher(
|
|
130
|
+
algorithm: CipherCCMTypes,
|
|
131
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
132
|
+
options: CipherCCMOptions,
|
|
133
|
+
): DecipherCCM;
|
|
93
134
|
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
94
|
-
function createDecipher(
|
|
135
|
+
function createDecipher(
|
|
136
|
+
algorithm: CipherGCMTypes,
|
|
137
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
138
|
+
options?: CipherGCMOptions,
|
|
139
|
+
): DecipherGCM;
|
|
95
140
|
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
96
|
-
function createDecipher(
|
|
141
|
+
function createDecipher(
|
|
142
|
+
algorithm: string,
|
|
143
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
144
|
+
options?: stream.TransformOptions,
|
|
145
|
+
): Decipher;
|
|
97
146
|
|
|
98
147
|
function createDecipheriv(
|
|
99
148
|
algorithm: CipherCCMTypes,
|
|
@@ -107,12 +156,21 @@ declare module "crypto" {
|
|
|
107
156
|
iv: string | Buffer | NodeJS.TypedArray | DataView,
|
|
108
157
|
options?: CipherGCMOptions,
|
|
109
158
|
): DecipherGCM;
|
|
110
|
-
function createDecipheriv(
|
|
159
|
+
function createDecipheriv(
|
|
160
|
+
algorithm: string,
|
|
161
|
+
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
162
|
+
iv: string | Buffer | NodeJS.TypedArray | DataView,
|
|
163
|
+
options?: stream.TransformOptions,
|
|
164
|
+
): Decipher;
|
|
111
165
|
|
|
112
166
|
interface Decipher extends stream.Transform {
|
|
113
167
|
update(data: Buffer | NodeJS.TypedArray | DataView): Buffer;
|
|
114
168
|
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
|
115
|
-
update(
|
|
169
|
+
update(
|
|
170
|
+
data: Buffer | NodeJS.TypedArray | DataView,
|
|
171
|
+
input_encoding: HexBase64BinaryEncoding | undefined,
|
|
172
|
+
output_encoding: Utf8AsciiBinaryEncoding,
|
|
173
|
+
): string;
|
|
116
174
|
// second arg is ignored
|
|
117
175
|
update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string;
|
|
118
176
|
final(): Buffer;
|
|
@@ -134,8 +192,11 @@ declare module "crypto" {
|
|
|
134
192
|
interface Signer extends NodeJS.WritableStream {
|
|
135
193
|
update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
|
|
136
194
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
|
137
|
-
sign(private_key: string | { key: string; passphrase?: string
|
|
138
|
-
sign(
|
|
195
|
+
sign(private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number }): Buffer;
|
|
196
|
+
sign(
|
|
197
|
+
private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number },
|
|
198
|
+
output_format: HexBase64Latin1Encoding,
|
|
199
|
+
): string;
|
|
139
200
|
}
|
|
140
201
|
function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
|
|
141
202
|
interface Verify extends NodeJS.WritableStream {
|
|
@@ -146,18 +207,37 @@ declare module "crypto" {
|
|
|
146
207
|
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
|
|
147
208
|
// The signature field accepts a TypedArray type, but it is only available starting ES2017
|
|
148
209
|
}
|
|
149
|
-
function createDiffieHellman(
|
|
210
|
+
function createDiffieHellman(
|
|
211
|
+
prime_length: number,
|
|
212
|
+
generator?: number | Buffer | NodeJS.TypedArray | DataView,
|
|
213
|
+
): DiffieHellman;
|
|
150
214
|
function createDiffieHellman(prime: Buffer | NodeJS.TypedArray | DataView): DiffieHellman;
|
|
151
215
|
function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
|
|
152
|
-
function createDiffieHellman(
|
|
153
|
-
|
|
216
|
+
function createDiffieHellman(
|
|
217
|
+
prime: string,
|
|
218
|
+
prime_encoding: HexBase64Latin1Encoding,
|
|
219
|
+
generator: number | Buffer | NodeJS.TypedArray | DataView,
|
|
220
|
+
): DiffieHellman;
|
|
221
|
+
function createDiffieHellman(
|
|
222
|
+
prime: string,
|
|
223
|
+
prime_encoding: HexBase64Latin1Encoding,
|
|
224
|
+
generator: string,
|
|
225
|
+
generator_encoding: HexBase64Latin1Encoding,
|
|
226
|
+
): DiffieHellman;
|
|
154
227
|
interface DiffieHellman {
|
|
155
228
|
generateKeys(): Buffer;
|
|
156
229
|
generateKeys(encoding: HexBase64Latin1Encoding): string;
|
|
157
230
|
computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
|
|
158
231
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
|
159
|
-
computeSecret(
|
|
160
|
-
|
|
232
|
+
computeSecret(
|
|
233
|
+
other_public_key: Buffer | NodeJS.TypedArray | DataView,
|
|
234
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
235
|
+
): string;
|
|
236
|
+
computeSecret(
|
|
237
|
+
other_public_key: string,
|
|
238
|
+
input_encoding: HexBase64Latin1Encoding,
|
|
239
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
240
|
+
): string;
|
|
161
241
|
getPrime(): Buffer;
|
|
162
242
|
getPrime(encoding: HexBase64Latin1Encoding): string;
|
|
163
243
|
getGenerator(): Buffer;
|
|
@@ -181,19 +261,44 @@ declare module "crypto" {
|
|
|
181
261
|
digest: string,
|
|
182
262
|
callback: (err: Error | null, derivedKey: Buffer) => any,
|
|
183
263
|
): void;
|
|
184
|
-
function pbkdf2Sync(
|
|
264
|
+
function pbkdf2Sync(
|
|
265
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
266
|
+
salt: string | Buffer | NodeJS.TypedArray | DataView,
|
|
267
|
+
iterations: number,
|
|
268
|
+
keylen: number,
|
|
269
|
+
digest: string,
|
|
270
|
+
): Buffer;
|
|
185
271
|
|
|
186
272
|
function randomBytes(size: number): Buffer;
|
|
187
273
|
function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
188
274
|
function pseudoRandomBytes(size: number): Buffer;
|
|
189
275
|
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
190
276
|
|
|
191
|
-
function randomFillSync<T extends Buffer | NodeJS.TypedArray | DataView>(
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
277
|
+
function randomFillSync<T extends Buffer | NodeJS.TypedArray | DataView>(
|
|
278
|
+
buffer: T,
|
|
279
|
+
offset?: number,
|
|
280
|
+
size?: number,
|
|
281
|
+
): T;
|
|
282
|
+
function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
|
|
283
|
+
buffer: T,
|
|
284
|
+
callback: (err: Error | null, buf: T) => void,
|
|
285
|
+
): void;
|
|
286
|
+
function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
|
|
287
|
+
buffer: T,
|
|
288
|
+
offset: number,
|
|
289
|
+
callback: (err: Error | null, buf: T) => void,
|
|
290
|
+
): void;
|
|
291
|
+
function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
|
|
292
|
+
buffer: T,
|
|
293
|
+
offset: number,
|
|
294
|
+
size: number,
|
|
295
|
+
callback: (err: Error | null, buf: T) => void,
|
|
296
|
+
): void;
|
|
195
297
|
|
|
196
298
|
interface ScryptOptions {
|
|
299
|
+
cost?: number;
|
|
300
|
+
blockSize?: number;
|
|
301
|
+
parallelization?: number;
|
|
197
302
|
N?: number;
|
|
198
303
|
r?: number;
|
|
199
304
|
p?: number;
|
|
@@ -202,7 +307,8 @@ declare module "crypto" {
|
|
|
202
307
|
function scrypt(
|
|
203
308
|
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
204
309
|
salt: string | Buffer | NodeJS.TypedArray | DataView,
|
|
205
|
-
keylen: number,
|
|
310
|
+
keylen: number,
|
|
311
|
+
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
206
312
|
): void;
|
|
207
313
|
function scrypt(
|
|
208
314
|
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
@@ -211,7 +317,12 @@ declare module "crypto" {
|
|
|
211
317
|
options: ScryptOptions,
|
|
212
318
|
callback: (err: Error | null, derivedKey: Buffer) => void,
|
|
213
319
|
): void;
|
|
214
|
-
function scryptSync(
|
|
320
|
+
function scryptSync(
|
|
321
|
+
password: string | Buffer | NodeJS.TypedArray | DataView,
|
|
322
|
+
salt: string | Buffer | NodeJS.TypedArray | DataView,
|
|
323
|
+
keylen: number,
|
|
324
|
+
options?: ScryptOptions,
|
|
325
|
+
): Buffer;
|
|
215
326
|
|
|
216
327
|
interface RsaPublicKey {
|
|
217
328
|
key: string;
|
|
@@ -235,15 +346,22 @@ declare module "crypto" {
|
|
|
235
346
|
key: string | Buffer | NodeJS.TypedArray | DataView,
|
|
236
347
|
curve: string,
|
|
237
348
|
inputEncoding?: HexBase64Latin1Encoding,
|
|
238
|
-
outputEncoding?:
|
|
239
|
-
format?:
|
|
349
|
+
outputEncoding?: 'latin1' | 'hex' | 'base64',
|
|
350
|
+
format?: 'uncompressed' | 'compressed' | 'hybrid',
|
|
240
351
|
): Buffer | string;
|
|
241
352
|
generateKeys(): Buffer;
|
|
242
353
|
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
|
243
354
|
computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
|
|
244
355
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
|
245
|
-
computeSecret(
|
|
246
|
-
|
|
356
|
+
computeSecret(
|
|
357
|
+
other_public_key: Buffer | NodeJS.TypedArray | DataView,
|
|
358
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
359
|
+
): string;
|
|
360
|
+
computeSecret(
|
|
361
|
+
other_public_key: string,
|
|
362
|
+
input_encoding: HexBase64Latin1Encoding,
|
|
363
|
+
output_encoding: HexBase64Latin1Encoding,
|
|
364
|
+
): string;
|
|
247
365
|
getPrivateKey(): Buffer;
|
|
248
366
|
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
|
249
367
|
getPublicKey(): Buffer;
|
|
@@ -252,7 +370,10 @@ declare module "crypto" {
|
|
|
252
370
|
setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
|
|
253
371
|
}
|
|
254
372
|
function createECDH(curve_name: string): ECDH;
|
|
255
|
-
function timingSafeEqual(
|
|
373
|
+
function timingSafeEqual(
|
|
374
|
+
a: Buffer | NodeJS.TypedArray | DataView,
|
|
375
|
+
b: Buffer | NodeJS.TypedArray | DataView,
|
|
376
|
+
): boolean;
|
|
256
377
|
/** @deprecated since v10.0.0 */
|
|
257
378
|
const DEFAULT_ENCODING: string;
|
|
258
379
|
|
|
@@ -323,50 +444,170 @@ declare module "crypto" {
|
|
|
323
444
|
privateKey: T2;
|
|
324
445
|
}
|
|
325
446
|
|
|
326
|
-
function generateKeyPairSync(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
function generateKeyPairSync(
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
function generateKeyPairSync(
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
function
|
|
344
|
-
|
|
447
|
+
function generateKeyPairSync(
|
|
448
|
+
type: 'rsa',
|
|
449
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
450
|
+
): KeyPairSyncResult<string, string>;
|
|
451
|
+
function generateKeyPairSync(
|
|
452
|
+
type: 'rsa',
|
|
453
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
454
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
455
|
+
function generateKeyPairSync(
|
|
456
|
+
type: 'rsa',
|
|
457
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
458
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
459
|
+
function generateKeyPairSync(
|
|
460
|
+
type: 'rsa',
|
|
461
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
462
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
463
|
+
|
|
464
|
+
function generateKeyPairSync(
|
|
465
|
+
type: 'dsa',
|
|
466
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
467
|
+
): KeyPairSyncResult<string, string>;
|
|
468
|
+
function generateKeyPairSync(
|
|
469
|
+
type: 'dsa',
|
|
470
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
471
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
472
|
+
function generateKeyPairSync(
|
|
473
|
+
type: 'dsa',
|
|
474
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
475
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
476
|
+
function generateKeyPairSync(
|
|
477
|
+
type: 'dsa',
|
|
478
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
479
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
480
|
+
|
|
481
|
+
function generateKeyPairSync(
|
|
482
|
+
type: 'ec',
|
|
483
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
484
|
+
): KeyPairSyncResult<string, string>;
|
|
485
|
+
function generateKeyPairSync(
|
|
486
|
+
type: 'ec',
|
|
487
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
488
|
+
): KeyPairSyncResult<string, Buffer>;
|
|
489
|
+
function generateKeyPairSync(
|
|
490
|
+
type: 'ec',
|
|
491
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
492
|
+
): KeyPairSyncResult<Buffer, string>;
|
|
493
|
+
function generateKeyPairSync(
|
|
494
|
+
type: 'ec',
|
|
495
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
496
|
+
): KeyPairSyncResult<Buffer, Buffer>;
|
|
497
|
+
|
|
498
|
+
function generateKeyPair(
|
|
499
|
+
type: 'rsa',
|
|
500
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
501
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
502
|
+
): void;
|
|
503
|
+
function generateKeyPair(
|
|
504
|
+
type: 'rsa',
|
|
505
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
506
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
507
|
+
): void;
|
|
508
|
+
function generateKeyPair(
|
|
509
|
+
type: 'rsa',
|
|
510
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
511
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
512
|
+
): void;
|
|
513
|
+
function generateKeyPair(
|
|
514
|
+
type: 'rsa',
|
|
515
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
516
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
517
|
+
): void;
|
|
345
518
|
|
|
346
|
-
function generateKeyPair(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
519
|
+
function generateKeyPair(
|
|
520
|
+
type: 'dsa',
|
|
521
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
522
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
523
|
+
): void;
|
|
524
|
+
function generateKeyPair(
|
|
525
|
+
type: 'dsa',
|
|
526
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
527
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
528
|
+
): void;
|
|
529
|
+
function generateKeyPair(
|
|
530
|
+
type: 'dsa',
|
|
531
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
532
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
533
|
+
): void;
|
|
534
|
+
function generateKeyPair(
|
|
535
|
+
type: 'dsa',
|
|
536
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
537
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
538
|
+
): void;
|
|
350
539
|
|
|
351
|
-
function generateKeyPair(
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
540
|
+
function generateKeyPair(
|
|
541
|
+
type: 'ec',
|
|
542
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
543
|
+
callback: (err: Error | null, publicKey: string, privateKey: string) => void,
|
|
544
|
+
): void;
|
|
545
|
+
function generateKeyPair(
|
|
546
|
+
type: 'ec',
|
|
547
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
548
|
+
callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
|
|
549
|
+
): void;
|
|
550
|
+
function generateKeyPair(
|
|
551
|
+
type: 'ec',
|
|
552
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
553
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
|
|
554
|
+
): void;
|
|
555
|
+
function generateKeyPair(
|
|
556
|
+
type: 'ec',
|
|
557
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
558
|
+
callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
|
|
559
|
+
): void;
|
|
355
560
|
|
|
356
561
|
namespace generateKeyPair {
|
|
357
|
-
function __promisify__(
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
function __promisify__(
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
function __promisify__(
|
|
370
|
-
|
|
562
|
+
function __promisify__(
|
|
563
|
+
type: 'rsa',
|
|
564
|
+
options: RSAKeyPairOptions<'pem', 'pem'>,
|
|
565
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
566
|
+
function __promisify__(
|
|
567
|
+
type: 'rsa',
|
|
568
|
+
options: RSAKeyPairOptions<'pem', 'der'>,
|
|
569
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
570
|
+
function __promisify__(
|
|
571
|
+
type: 'rsa',
|
|
572
|
+
options: RSAKeyPairOptions<'der', 'pem'>,
|
|
573
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
574
|
+
function __promisify__(
|
|
575
|
+
type: 'rsa',
|
|
576
|
+
options: RSAKeyPairOptions<'der', 'der'>,
|
|
577
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
578
|
+
|
|
579
|
+
function __promisify__(
|
|
580
|
+
type: 'dsa',
|
|
581
|
+
options: DSAKeyPairOptions<'pem', 'pem'>,
|
|
582
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
583
|
+
function __promisify__(
|
|
584
|
+
type: 'dsa',
|
|
585
|
+
options: DSAKeyPairOptions<'pem', 'der'>,
|
|
586
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
587
|
+
function __promisify__(
|
|
588
|
+
type: 'dsa',
|
|
589
|
+
options: DSAKeyPairOptions<'der', 'pem'>,
|
|
590
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
591
|
+
function __promisify__(
|
|
592
|
+
type: 'dsa',
|
|
593
|
+
options: DSAKeyPairOptions<'der', 'der'>,
|
|
594
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
595
|
+
|
|
596
|
+
function __promisify__(
|
|
597
|
+
type: 'ec',
|
|
598
|
+
options: ECKeyPairOptions<'pem', 'pem'>,
|
|
599
|
+
): Promise<{ publicKey: string; privateKey: string }>;
|
|
600
|
+
function __promisify__(
|
|
601
|
+
type: 'ec',
|
|
602
|
+
options: ECKeyPairOptions<'pem', 'der'>,
|
|
603
|
+
): Promise<{ publicKey: string; privateKey: Buffer }>;
|
|
604
|
+
function __promisify__(
|
|
605
|
+
type: 'ec',
|
|
606
|
+
options: ECKeyPairOptions<'der', 'pem'>,
|
|
607
|
+
): Promise<{ publicKey: Buffer; privateKey: string }>;
|
|
608
|
+
function __promisify__(
|
|
609
|
+
type: 'ec',
|
|
610
|
+
options: ECKeyPairOptions<'der', 'der'>,
|
|
611
|
+
): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
|
|
371
612
|
}
|
|
372
613
|
}
|
node v10.17/domain.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import
|
|
1
|
+
declare module 'domain' {
|
|
2
|
+
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
|
-
class Domain extends
|
|
4
|
+
class Domain extends EventEmitter implements NodeJS.Domain {
|
|
5
5
|
run(fn: Function): void;
|
|
6
|
-
add(emitter:
|
|
7
|
-
remove(emitter:
|
|
6
|
+
add(emitter: EventEmitter): void;
|
|
7
|
+
remove(emitter: EventEmitter): void;
|
|
8
8
|
bind(cb: (err: Error, data: any) => any): any;
|
|
9
9
|
intercept(cb: (data: any) => any): any;
|
|
10
10
|
members: any[];
|
node v10.17/events.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
class internal extends NodeJS.EventEmitter { }
|
|
3
|
-
|
|
1
|
+
declare module 'events' {
|
|
4
2
|
interface NodeEventTarget {
|
|
5
3
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
6
4
|
}
|
|
@@ -9,31 +7,24 @@ declare module "events" {
|
|
|
9
7
|
addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
|
|
10
8
|
}
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
class EventEmitter extends NodeJS.EventEmitter {
|
|
11
|
+
constructor();
|
|
12
|
+
|
|
13
|
+
static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
|
|
14
|
+
static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
|
|
15
|
+
|
|
16
|
+
/** @deprecated since v4.0.0 */
|
|
17
|
+
static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
|
|
18
|
+
|
|
19
|
+
// TODO: This should be described using a static getter/setter pair:
|
|
20
|
+
static defaultMaxListeners: number;
|
|
21
|
+
}
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
25
|
-
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
26
|
-
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
27
|
-
removeAllListeners(event?: string | symbol): this;
|
|
28
|
-
setMaxListeners(n: number): this;
|
|
29
|
-
getMaxListeners(): number;
|
|
30
|
-
listeners(event: string | symbol): Function[];
|
|
31
|
-
rawListeners(event: string | symbol): Function[];
|
|
32
|
-
emit(event: string | symbol, ...args: any[]): boolean;
|
|
33
|
-
eventNames(): Array<string | symbol>;
|
|
34
|
-
listenerCount(type: string | symbol): number;
|
|
35
|
-
}
|
|
23
|
+
import internal = require('events');
|
|
24
|
+
namespace EventEmitter {
|
|
25
|
+
// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
|
|
26
|
+
export { internal as EventEmitter };
|
|
36
27
|
}
|
|
37
28
|
|
|
38
|
-
export =
|
|
29
|
+
export = EventEmitter;
|
|
39
30
|
}
|
node v10.17/http.d.ts
CHANGED
|
@@ -160,7 +160,7 @@ declare module "http" {
|
|
|
160
160
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders): void;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
// https://github.com/nodejs/node/blob/
|
|
163
|
+
// https://github.com/nodejs/node/blob/v10.23.0/lib/_http_client.js#L65
|
|
164
164
|
class ClientRequest extends OutgoingMessage {
|
|
165
165
|
connection: net.Socket;
|
|
166
166
|
socket: net.Socket;
|
node v10.17/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.17.
|
|
3
|
+
"version": "10.17.51",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -196,6 +196,6 @@
|
|
|
196
196
|
},
|
|
197
197
|
"scripts": {},
|
|
198
198
|
"dependencies": {},
|
|
199
|
-
"typesPublisherContentHash": "
|
|
200
|
-
"typeScriptVersion": "3.
|
|
199
|
+
"typesPublisherContentHash": "bbd718db1c53e260f6ff473038d10401fd5cef497e1370e55cf0651a29743384",
|
|
200
|
+
"typeScriptVersion": "3.4"
|
|
201
201
|
}
|
node v10.17/stream.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import
|
|
1
|
+
declare module 'stream' {
|
|
2
|
+
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
|
-
class internal extends
|
|
4
|
+
class internal extends EventEmitter {
|
|
5
5
|
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
|
6
6
|
}
|
|
7
7
|
|
node v10.17/ts3.6/assert.d.ts
CHANGED
|
@@ -15,10 +15,13 @@ declare module 'assert' {
|
|
|
15
15
|
actual?: any;
|
|
16
16
|
expected?: any;
|
|
17
17
|
operator?: string;
|
|
18
|
+
// tslint:disable-next-line:ban-types
|
|
18
19
|
stackStartFn?: Function;
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
|
|
24
|
+
|
|
22
25
|
function fail(message?: string | Error): never;
|
|
23
26
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
24
27
|
function fail(
|
|
@@ -26,6 +29,7 @@ declare module 'assert' {
|
|
|
26
29
|
expected: any,
|
|
27
30
|
message?: string | Error,
|
|
28
31
|
operator?: string,
|
|
32
|
+
// tslint:disable-next-line:ban-types
|
|
29
33
|
stackStartFn?: Function,
|
|
30
34
|
): never;
|
|
31
35
|
function ok(value: any, message?: string | Error): void;
|
|
@@ -42,23 +46,23 @@ declare module 'assert' {
|
|
|
42
46
|
function deepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
43
47
|
function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
|
|
44
48
|
|
|
45
|
-
function throws(block:
|
|
46
|
-
function throws(block:
|
|
47
|
-
function doesNotThrow(block:
|
|
48
|
-
function doesNotThrow(block:
|
|
49
|
+
function throws(block: () => any, message?: string | Error): void;
|
|
50
|
+
function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
51
|
+
function doesNotThrow(block: () => any, message?: string | Error): void;
|
|
52
|
+
function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
|
|
49
53
|
|
|
50
54
|
function ifError(value: any): void;
|
|
51
55
|
|
|
52
|
-
function rejects(block:
|
|
56
|
+
function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
53
57
|
function rejects(
|
|
54
|
-
block:
|
|
55
|
-
error:
|
|
58
|
+
block: (() => Promise<any>) | Promise<any>,
|
|
59
|
+
error: AssertPredicate,
|
|
56
60
|
message?: string | Error,
|
|
57
61
|
): Promise<void>;
|
|
58
|
-
function doesNotReject(block:
|
|
62
|
+
function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
|
|
59
63
|
function doesNotReject(
|
|
60
|
-
block:
|
|
61
|
-
error:
|
|
64
|
+
block: (() => Promise<any>) | Promise<any>,
|
|
65
|
+
error: AssertPredicate,
|
|
62
66
|
message?: string | Error,
|
|
63
67
|
): Promise<void>;
|
|
64
68
|
|