@types/node 16.7.7 → 16.7.11
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/crypto.d.ts +68 -2
- node/globals.d.ts +0 -1
- node/package.json +2 -2
- node/stream.d.ts +1 -0
- node/tls.d.ts +3 -2
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: Mon,
|
|
11
|
+
* Last updated: Mon, 06 Sep 2021 22:01:20 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node/crypto.d.ts
CHANGED
|
@@ -2207,7 +2207,7 @@ declare module 'crypto' {
|
|
|
2207
2207
|
function timingSafeEqual(a: NodeJS.ArrayBufferView, b: NodeJS.ArrayBufferView): boolean;
|
|
2208
2208
|
/** @deprecated since v10.0.0 */
|
|
2209
2209
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2210
|
-
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2210
|
+
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2211
2211
|
type KeyFormat = 'pem' | 'der';
|
|
2212
2212
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2213
2213
|
format: T;
|
|
@@ -2238,6 +2238,16 @@ declare module 'crypto' {
|
|
|
2238
2238
|
*/
|
|
2239
2239
|
publicExponent?: number | undefined;
|
|
2240
2240
|
}
|
|
2241
|
+
interface RSAPSSKeyPairKeyObjectOptions {
|
|
2242
|
+
/**
|
|
2243
|
+
* Key size in bits
|
|
2244
|
+
*/
|
|
2245
|
+
modulusLength: number;
|
|
2246
|
+
/**
|
|
2247
|
+
* @default 0x10001
|
|
2248
|
+
*/
|
|
2249
|
+
publicExponent?: number | undefined;
|
|
2250
|
+
}
|
|
2241
2251
|
interface DSAKeyPairKeyObjectOptions {
|
|
2242
2252
|
/**
|
|
2243
2253
|
* Key size in bits
|
|
@@ -2265,6 +2275,23 @@ declare module 'crypto' {
|
|
|
2265
2275
|
type: 'pkcs1' | 'pkcs8';
|
|
2266
2276
|
};
|
|
2267
2277
|
}
|
|
2278
|
+
interface RSAPSSKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2279
|
+
/**
|
|
2280
|
+
* Key size in bits
|
|
2281
|
+
*/
|
|
2282
|
+
modulusLength: number;
|
|
2283
|
+
/**
|
|
2284
|
+
* @default 0x10001
|
|
2285
|
+
*/
|
|
2286
|
+
publicExponent?: number | undefined;
|
|
2287
|
+
publicKeyEncoding: {
|
|
2288
|
+
type: 'spki';
|
|
2289
|
+
format: PubF;
|
|
2290
|
+
};
|
|
2291
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
2292
|
+
type: 'pkcs8';
|
|
2293
|
+
};
|
|
2294
|
+
}
|
|
2268
2295
|
interface DSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
2269
2296
|
/**
|
|
2270
2297
|
* Key size in bits
|
|
@@ -2374,13 +2401,18 @@ declare module 'crypto' {
|
|
|
2374
2401
|
* When PEM encoding was selected, the respective key will be a string, otherwise
|
|
2375
2402
|
* it will be a buffer containing the data encoded as DER.
|
|
2376
2403
|
* @since v10.12.0
|
|
2377
|
-
* @param type Must be `'rsa'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
|
|
2404
|
+
* @param type Must be `'rsa'`, `'rsa-pss'`, `'dsa'`, `'ec'`, `'ed25519'`, `'ed448'`, `'x25519'`, `'x448'`, or `'dh'`.
|
|
2378
2405
|
*/
|
|
2379
2406
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
2380
2407
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
2381
2408
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
2382
2409
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
2383
2410
|
function generateKeyPairSync(type: 'rsa', options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2411
|
+
function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
2412
|
+
function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
2413
|
+
function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
2414
|
+
function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
2415
|
+
function generateKeyPairSync(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2384
2416
|
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
2385
2417
|
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
2386
2418
|
function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
@@ -2455,6 +2487,11 @@ declare module 'crypto' {
|
|
|
2455
2487
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
2456
2488
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
2457
2489
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
2490
|
+
function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
2491
|
+
function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
2492
|
+
function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
2493
|
+
function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
2494
|
+
function generateKeyPair(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
2458
2495
|
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
2459
2496
|
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
2460
2497
|
function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
@@ -2515,6 +2552,35 @@ declare module 'crypto' {
|
|
|
2515
2552
|
privateKey: Buffer;
|
|
2516
2553
|
}>;
|
|
2517
2554
|
function __promisify__(type: 'rsa', options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2555
|
+
function __promisify__(
|
|
2556
|
+
type: 'rsa-pss',
|
|
2557
|
+
options: RSAPSSKeyPairOptions<'pem', 'pem'>
|
|
2558
|
+
): Promise<{
|
|
2559
|
+
publicKey: string;
|
|
2560
|
+
privateKey: string;
|
|
2561
|
+
}>;
|
|
2562
|
+
function __promisify__(
|
|
2563
|
+
type: 'rsa-pss',
|
|
2564
|
+
options: RSAPSSKeyPairOptions<'pem', 'der'>
|
|
2565
|
+
): Promise<{
|
|
2566
|
+
publicKey: string;
|
|
2567
|
+
privateKey: Buffer;
|
|
2568
|
+
}>;
|
|
2569
|
+
function __promisify__(
|
|
2570
|
+
type: 'rsa-pss',
|
|
2571
|
+
options: RSAPSSKeyPairOptions<'der', 'pem'>
|
|
2572
|
+
): Promise<{
|
|
2573
|
+
publicKey: Buffer;
|
|
2574
|
+
privateKey: string;
|
|
2575
|
+
}>;
|
|
2576
|
+
function __promisify__(
|
|
2577
|
+
type: 'rsa-pss',
|
|
2578
|
+
options: RSAPSSKeyPairOptions<'der', 'der'>
|
|
2579
|
+
): Promise<{
|
|
2580
|
+
publicKey: Buffer;
|
|
2581
|
+
privateKey: Buffer;
|
|
2582
|
+
}>;
|
|
2583
|
+
function __promisify__(type: 'rsa-pss', options: RSAPSSKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
2518
2584
|
function __promisify__(
|
|
2519
2585
|
type: 'dsa',
|
|
2520
2586
|
options: DSAKeyPairOptions<'pem', 'pem'>
|
node/globals.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.11",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
},
|
|
226
226
|
"scripts": {},
|
|
227
227
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "f185bf25fe51fbc365324efc258555fb42c9744aab414077408e6948418e661f",
|
|
229
229
|
"typeScriptVersion": "3.7"
|
|
230
230
|
}
|
node/stream.d.ts
CHANGED
|
@@ -790,6 +790,7 @@ declare module 'stream' {
|
|
|
790
790
|
readonly writableLength: number;
|
|
791
791
|
readonly writableObjectMode: boolean;
|
|
792
792
|
readonly writableCorked: number;
|
|
793
|
+
allowHalfOpen: boolean;
|
|
793
794
|
constructor(opts?: DuplexOptions);
|
|
794
795
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
795
796
|
_writev?(
|
node/tls.d.ts
CHANGED
|
@@ -160,9 +160,10 @@ declare module 'tls' {
|
|
|
160
160
|
encrypted: boolean;
|
|
161
161
|
/**
|
|
162
162
|
* String containing the selected ALPN protocol.
|
|
163
|
-
*
|
|
163
|
+
* Before a handshake has completed, this value is always null.
|
|
164
|
+
* When a handshake is completed but not ALPN protocol was selected, tlsSocket.alpnProtocol equals false.
|
|
164
165
|
*/
|
|
165
|
-
alpnProtocol
|
|
166
|
+
alpnProtocol: string | false | null;
|
|
166
167
|
/**
|
|
167
168
|
* Returns an object representing the local certificate. The returned object has
|
|
168
169
|
* some properties corresponding to the fields of the certificate.
|