@types/node 12.20.12 → 12.20.16
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 v12.20/README.md +1 -1
- node v12.20/assert.d.ts +3 -3
- node v12.20/async_hooks.d.ts +4 -4
- node v12.20/child_process.d.ts +63 -60
- node v12.20/cluster.d.ts +10 -10
- node v12.20/crypto.d.ts +31 -31
- node v12.20/dgram.d.ts +9 -9
- node v12.20/dns.d.ts +6 -6
- node v12.20/fs.d.ts +138 -102
- node v12.20/globals.d.ts +45 -45
- node v12.20/http.d.ts +88 -88
- node v12.20/http2.d.ts +63 -63
- node v12.20/https.d.ts +4 -4
- node v12.20/inspector.d.ts +149 -149
- node v12.20/net.d.ts +26 -26
- node v12.20/package.json +4 -3
- node v12.20/path.d.ts +5 -5
- node v12.20/perf_hooks.d.ts +4 -4
- node v12.20/querystring.d.ts +3 -3
- node v12.20/readline.d.ts +13 -13
- node v12.20/repl.d.ts +16 -16
- node v12.20/stream.d.ts +19 -19
- node v12.20/tls.d.ts +49 -49
- node v12.20/url.d.ts +16 -16
- node v12.20/util.d.ts +2 -2
- node v12.20/vm.d.ts +21 -21
- node v12.20/wasi.d.ts +4 -4
- node v12.20/worker_threads.d.ts +14 -14
- node v12.20/zlib.d.ts +16 -16
node v12.20/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/v12.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 07 Jul 2021 16:31:31 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v12.20/assert.d.ts
CHANGED
|
@@ -11,12 +11,12 @@ declare module 'assert' {
|
|
|
11
11
|
code: 'ERR_ASSERTION';
|
|
12
12
|
|
|
13
13
|
constructor(options?: {
|
|
14
|
-
message?: string;
|
|
14
|
+
message?: string | undefined;
|
|
15
15
|
actual?: any;
|
|
16
16
|
expected?: any;
|
|
17
|
-
operator?: string;
|
|
17
|
+
operator?: string | undefined;
|
|
18
18
|
// tslint:disable-next-line:ban-types
|
|
19
|
-
stackStartFn?: Function;
|
|
19
|
+
stackStartFn?: Function | undefined;
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
node v12.20/async_hooks.d.ts
CHANGED
|
@@ -85,18 +85,18 @@ declare module 'async_hooks' {
|
|
|
85
85
|
interface AsyncResourceOptions {
|
|
86
86
|
/**
|
|
87
87
|
* The ID of the execution context that created this async event.
|
|
88
|
-
*
|
|
88
|
+
* @default executionAsyncId()
|
|
89
89
|
*/
|
|
90
|
-
triggerAsyncId?: number;
|
|
90
|
+
triggerAsyncId?: number | undefined;
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Disables automatic `emitDestroy` when the object is garbage collected.
|
|
94
94
|
* This usually does not need to be set (even if `emitDestroy` is called
|
|
95
95
|
* manually), unless the resource's `asyncId` is retrieved and the
|
|
96
96
|
* sensitive API's `emitDestroy` is called with it.
|
|
97
|
-
*
|
|
97
|
+
* @default false
|
|
98
98
|
*/
|
|
99
|
-
requireManualDestroy?: boolean;
|
|
99
|
+
requireManualDestroy?: boolean | undefined;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
node v12.20/child_process.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare module 'child_process' {
|
|
|
7
7
|
stdin: Writable | null;
|
|
8
8
|
stdout: Readable | null;
|
|
9
9
|
stderr: Readable | null;
|
|
10
|
-
readonly channel?: Pipe | null;
|
|
10
|
+
readonly channel?: Pipe | null | undefined;
|
|
11
11
|
readonly stdio: [
|
|
12
12
|
Writable | null, // stdin
|
|
13
13
|
Readable | null, // stdout
|
|
@@ -115,39 +115,39 @@ declare module 'child_process' {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
interface MessageOptions {
|
|
118
|
-
keepOpen?: boolean;
|
|
118
|
+
keepOpen?: boolean | undefined;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
|
|
122
122
|
|
|
123
123
|
interface ProcessEnvOptions {
|
|
124
|
-
uid?: number;
|
|
125
|
-
gid?: number;
|
|
126
|
-
cwd?: string;
|
|
127
|
-
env?: NodeJS.ProcessEnv;
|
|
124
|
+
uid?: number | undefined;
|
|
125
|
+
gid?: number | undefined;
|
|
126
|
+
cwd?: string | undefined;
|
|
127
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
interface CommonOptions extends ProcessEnvOptions {
|
|
131
131
|
/**
|
|
132
132
|
* @default true
|
|
133
133
|
*/
|
|
134
|
-
windowsHide?: boolean;
|
|
134
|
+
windowsHide?: boolean | undefined;
|
|
135
135
|
/**
|
|
136
136
|
* @default 0
|
|
137
137
|
*/
|
|
138
|
-
timeout?: number;
|
|
138
|
+
timeout?: number | undefined;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
interface SpawnOptions extends CommonOptions {
|
|
142
|
-
argv0?: string;
|
|
143
|
-
stdio?: StdioOptions;
|
|
144
|
-
detached?: boolean;
|
|
145
|
-
shell?: boolean | string;
|
|
146
|
-
windowsVerbatimArguments?: boolean;
|
|
142
|
+
argv0?: string | undefined;
|
|
143
|
+
stdio?: StdioOptions | undefined;
|
|
144
|
+
detached?: boolean | undefined;
|
|
145
|
+
shell?: boolean | string | undefined;
|
|
146
|
+
windowsVerbatimArguments?: boolean | undefined;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
interface SpawnOptionsWithoutStdio extends SpawnOptions {
|
|
150
|
-
stdio?: 'pipe' | Array<null | undefined | 'pipe'
|
|
150
|
+
stdio?: 'pipe' | Array<null | undefined | 'pipe'> | undefined;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
type StdioNull = 'inherit' | 'ignore' | Stream;
|
|
@@ -246,9 +246,9 @@ declare module 'child_process' {
|
|
|
246
246
|
function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
|
|
247
247
|
|
|
248
248
|
interface ExecOptions extends CommonOptions {
|
|
249
|
-
shell?: string;
|
|
250
|
-
maxBuffer?: number;
|
|
251
|
-
killSignal?: NodeJS.Signals | number;
|
|
249
|
+
shell?: string | undefined;
|
|
250
|
+
maxBuffer?: number | undefined;
|
|
251
|
+
killSignal?: NodeJS.Signals | number | undefined;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
interface ExecOptionsWithStringEncoding extends ExecOptions {
|
|
@@ -260,10 +260,10 @@ declare module 'child_process' {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
interface ExecException extends Error {
|
|
263
|
-
cmd?: string;
|
|
264
|
-
killed?: boolean;
|
|
265
|
-
code?: number;
|
|
266
|
-
signal?: NodeJS.Signals;
|
|
263
|
+
cmd?: string | undefined;
|
|
264
|
+
killed?: boolean | undefined;
|
|
265
|
+
code?: number | undefined;
|
|
266
|
+
signal?: NodeJS.Signals | undefined;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
// no `options` definitely means stdout/stderr are `string`.
|
|
@@ -285,7 +285,7 @@ declare module 'child_process' {
|
|
|
285
285
|
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
|
286
286
|
function exec(
|
|
287
287
|
command: string,
|
|
288
|
-
options: ({ encoding?: string | null } & ExecOptions) | undefined | null,
|
|
288
|
+
options: ({ encoding?: string | null | undefined } & ExecOptions) | undefined | null,
|
|
289
289
|
callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
|
|
290
290
|
): ChildProcess;
|
|
291
291
|
|
|
@@ -299,14 +299,14 @@ declare module 'child_process' {
|
|
|
299
299
|
function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
|
|
300
300
|
function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
301
301
|
function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
302
|
-
function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
302
|
+
function __promisify__(command: string, options?: ({ encoding?: string | null | undefined } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
interface ExecFileOptions extends CommonOptions {
|
|
306
|
-
maxBuffer?: number;
|
|
307
|
-
killSignal?: NodeJS.Signals | number;
|
|
308
|
-
windowsVerbatimArguments?: boolean;
|
|
309
|
-
shell?: boolean | string;
|
|
306
|
+
maxBuffer?: number | undefined;
|
|
307
|
+
killSignal?: NodeJS.Signals | number | undefined;
|
|
308
|
+
windowsVerbatimArguments?: boolean | undefined;
|
|
309
|
+
shell?: boolean | string | undefined;
|
|
310
310
|
}
|
|
311
311
|
interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
|
312
312
|
encoding: BufferEncoding;
|
|
@@ -319,9 +319,9 @@ declare module 'child_process' {
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
function execFile(file: string): ChildProcess;
|
|
322
|
-
function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
322
|
+
function execFile(file: string, options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
323
323
|
function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
|
|
324
|
-
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
324
|
+
function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
325
325
|
|
|
326
326
|
// no `options` definitely means stdout/stderr are `string`.
|
|
327
327
|
function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
@@ -371,13 +371,13 @@ declare module 'child_process' {
|
|
|
371
371
|
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
|
372
372
|
function execFile(
|
|
373
373
|
file: string,
|
|
374
|
-
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
|
|
374
|
+
options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null,
|
|
375
375
|
callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
|
|
376
376
|
): ChildProcess;
|
|
377
377
|
function execFile(
|
|
378
378
|
file: string,
|
|
379
379
|
args: ReadonlyArray<string> | undefined | null,
|
|
380
|
-
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
|
|
380
|
+
options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null,
|
|
381
381
|
callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
|
|
382
382
|
): ChildProcess;
|
|
383
383
|
|
|
@@ -397,34 +397,37 @@ declare module 'child_process' {
|
|
|
397
397
|
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
398
398
|
function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
399
399
|
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
400
|
-
function __promisify__(
|
|
400
|
+
function __promisify__(
|
|
401
|
+
file: string,
|
|
402
|
+
options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null
|
|
403
|
+
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
401
404
|
function __promisify__(
|
|
402
405
|
file: string,
|
|
403
406
|
args: ReadonlyArray<string> | undefined | null,
|
|
404
|
-
options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
|
|
407
|
+
options: ({ encoding?: string | null | undefined } & ExecFileOptions) | undefined | null,
|
|
405
408
|
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
406
409
|
}
|
|
407
410
|
|
|
408
411
|
interface ForkOptions extends ProcessEnvOptions {
|
|
409
|
-
execPath?: string;
|
|
410
|
-
execArgv?: string[];
|
|
411
|
-
silent?: boolean;
|
|
412
|
-
stdio?: StdioOptions;
|
|
413
|
-
detached?: boolean;
|
|
414
|
-
windowsVerbatimArguments?: boolean;
|
|
412
|
+
execPath?: string | undefined;
|
|
413
|
+
execArgv?: string[] | undefined;
|
|
414
|
+
silent?: boolean | undefined;
|
|
415
|
+
stdio?: StdioOptions | undefined;
|
|
416
|
+
detached?: boolean | undefined;
|
|
417
|
+
windowsVerbatimArguments?: boolean | undefined;
|
|
415
418
|
}
|
|
416
419
|
function fork(modulePath: string, options?: ForkOptions): ChildProcess;
|
|
417
420
|
function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
|
|
418
421
|
|
|
419
422
|
interface SpawnSyncOptions extends CommonOptions {
|
|
420
|
-
argv0?: string; // Not specified in the docs
|
|
421
|
-
input?: string | NodeJS.ArrayBufferView;
|
|
422
|
-
stdio?: StdioOptions;
|
|
423
|
-
killSignal?: NodeJS.Signals | number;
|
|
424
|
-
maxBuffer?: number;
|
|
425
|
-
encoding?: string;
|
|
426
|
-
shell?: boolean | string;
|
|
427
|
-
windowsVerbatimArguments?: boolean;
|
|
423
|
+
argv0?: string | undefined; // Not specified in the docs
|
|
424
|
+
input?: string | NodeJS.ArrayBufferView | undefined;
|
|
425
|
+
stdio?: StdioOptions | undefined;
|
|
426
|
+
killSignal?: NodeJS.Signals | number | undefined;
|
|
427
|
+
maxBuffer?: number | undefined;
|
|
428
|
+
encoding?: string | undefined;
|
|
429
|
+
shell?: boolean | string | undefined;
|
|
430
|
+
windowsVerbatimArguments?: boolean | undefined;
|
|
428
431
|
}
|
|
429
432
|
interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
430
433
|
encoding: BufferEncoding;
|
|
@@ -439,7 +442,7 @@ declare module 'child_process' {
|
|
|
439
442
|
stderr: T;
|
|
440
443
|
status: number | null;
|
|
441
444
|
signal: NodeJS.Signals | null;
|
|
442
|
-
error?: Error;
|
|
445
|
+
error?: Error | undefined;
|
|
443
446
|
}
|
|
444
447
|
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
|
445
448
|
function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
@@ -450,12 +453,12 @@ declare module 'child_process' {
|
|
|
450
453
|
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
|
451
454
|
|
|
452
455
|
interface ExecSyncOptions extends CommonOptions {
|
|
453
|
-
input?: string | Uint8Array;
|
|
454
|
-
stdio?: StdioOptions;
|
|
455
|
-
shell?: string;
|
|
456
|
-
killSignal?: NodeJS.Signals | number;
|
|
457
|
-
maxBuffer?: number;
|
|
458
|
-
encoding?: string;
|
|
456
|
+
input?: string | Uint8Array | undefined;
|
|
457
|
+
stdio?: StdioOptions | undefined;
|
|
458
|
+
shell?: string | undefined;
|
|
459
|
+
killSignal?: NodeJS.Signals | number | undefined;
|
|
460
|
+
maxBuffer?: number | undefined;
|
|
461
|
+
encoding?: string | undefined;
|
|
459
462
|
}
|
|
460
463
|
interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
|
|
461
464
|
encoding: BufferEncoding;
|
|
@@ -469,12 +472,12 @@ declare module 'child_process' {
|
|
|
469
472
|
function execSync(command: string, options?: ExecSyncOptions): Buffer;
|
|
470
473
|
|
|
471
474
|
interface ExecFileSyncOptions extends CommonOptions {
|
|
472
|
-
input?: string | NodeJS.ArrayBufferView;
|
|
473
|
-
stdio?: StdioOptions;
|
|
474
|
-
killSignal?: NodeJS.Signals | number;
|
|
475
|
-
maxBuffer?: number;
|
|
476
|
-
encoding?: string;
|
|
477
|
-
shell?: boolean | string;
|
|
475
|
+
input?: string | NodeJS.ArrayBufferView | undefined;
|
|
476
|
+
stdio?: StdioOptions | undefined;
|
|
477
|
+
killSignal?: NodeJS.Signals | number | undefined;
|
|
478
|
+
maxBuffer?: number | undefined;
|
|
479
|
+
encoding?: string | undefined;
|
|
480
|
+
shell?: boolean | string | undefined;
|
|
478
481
|
}
|
|
479
482
|
interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
480
483
|
encoding: BufferEncoding;
|
node v12.20/cluster.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ declare module 'cluster' {
|
|
|
5
5
|
|
|
6
6
|
// interfaces
|
|
7
7
|
interface ClusterSettings {
|
|
8
|
-
execArgv?: string[]; // default: process.execArgv
|
|
9
|
-
exec?: string;
|
|
10
|
-
args?: string[];
|
|
11
|
-
silent?: boolean;
|
|
12
|
-
stdio?: any[];
|
|
13
|
-
uid?: number;
|
|
14
|
-
gid?: number;
|
|
15
|
-
inspectPort?: number | (() => number);
|
|
8
|
+
execArgv?: string[] | undefined; // default: process.execArgv
|
|
9
|
+
exec?: string | undefined;
|
|
10
|
+
args?: string[] | undefined;
|
|
11
|
+
silent?: boolean | undefined;
|
|
12
|
+
stdio?: any[] | undefined;
|
|
13
|
+
uid?: number | undefined;
|
|
14
|
+
gid?: number | undefined;
|
|
15
|
+
inspectPort?: number | (() => number) | undefined;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface Address {
|
|
@@ -99,10 +99,10 @@ declare module 'cluster' {
|
|
|
99
99
|
// TODO: cluster.schedulingPolicy
|
|
100
100
|
settings: ClusterSettings;
|
|
101
101
|
setupMaster(settings?: ClusterSettings): void;
|
|
102
|
-
worker?: Worker;
|
|
102
|
+
worker?: Worker | undefined;
|
|
103
103
|
workers?: {
|
|
104
104
|
[index: string]: Worker | undefined
|
|
105
|
-
};
|
|
105
|
+
} | undefined;
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* events.EventEmitter
|
node v12.20/crypto.d.ts
CHANGED
|
@@ -112,7 +112,7 @@ declare module 'crypto' {
|
|
|
112
112
|
* For XOF hash functions such as `shake256`, the
|
|
113
113
|
* outputLength option can be used to specify the desired output length in bytes.
|
|
114
114
|
*/
|
|
115
|
-
outputLength?: number;
|
|
115
|
+
outputLength?: number | undefined;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
/** @deprecated since v10.0.0 */
|
|
@@ -147,21 +147,21 @@ declare module 'crypto' {
|
|
|
147
147
|
interface KeyExportOptions<T extends KeyFormat> {
|
|
148
148
|
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
|
|
149
149
|
format: T;
|
|
150
|
-
cipher?: string;
|
|
151
|
-
passphrase?: string | Buffer;
|
|
150
|
+
cipher?: string | undefined;
|
|
151
|
+
passphrase?: string | Buffer | undefined;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
class KeyObject {
|
|
155
155
|
private constructor();
|
|
156
|
-
asymmetricKeyType?: KeyType;
|
|
156
|
+
asymmetricKeyType?: KeyType | undefined;
|
|
157
157
|
/**
|
|
158
158
|
* For asymmetric keys, this property represents the size of the embedded key in
|
|
159
159
|
* bytes. This property is `undefined` for symmetric keys.
|
|
160
160
|
*/
|
|
161
|
-
asymmetricKeySize?: number;
|
|
161
|
+
asymmetricKeySize?: number | undefined;
|
|
162
162
|
export(options: KeyExportOptions<'pem'>): string | Buffer;
|
|
163
163
|
export(options?: KeyExportOptions<'der'>): Buffer;
|
|
164
|
-
symmetricKeySize?: number;
|
|
164
|
+
symmetricKeySize?: number | undefined;
|
|
165
165
|
type: KeyObjectType;
|
|
166
166
|
}
|
|
167
167
|
|
|
@@ -176,7 +176,7 @@ declare module 'crypto' {
|
|
|
176
176
|
authTagLength: number;
|
|
177
177
|
}
|
|
178
178
|
interface CipherGCMOptions extends stream.TransformOptions {
|
|
179
|
-
authTagLength?: number;
|
|
179
|
+
authTagLength?: number | undefined;
|
|
180
180
|
}
|
|
181
181
|
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
182
182
|
function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
|
|
@@ -289,15 +289,15 @@ declare module 'crypto' {
|
|
|
289
289
|
|
|
290
290
|
interface PrivateKeyInput {
|
|
291
291
|
key: string | Buffer;
|
|
292
|
-
format?: KeyFormat;
|
|
293
|
-
type?: 'pkcs1' | 'pkcs8' | 'sec1';
|
|
294
|
-
passphrase?: string | Buffer;
|
|
292
|
+
format?: KeyFormat | undefined;
|
|
293
|
+
type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
|
|
294
|
+
passphrase?: string | Buffer | undefined;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
interface PublicKeyInput {
|
|
298
298
|
key: string | Buffer;
|
|
299
|
-
format?: KeyFormat;
|
|
300
|
-
type?: 'pkcs1' | 'spki';
|
|
299
|
+
format?: KeyFormat | undefined;
|
|
300
|
+
type?: 'pkcs1' | 'spki' | undefined;
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
|
|
@@ -312,9 +312,9 @@ declare module 'crypto' {
|
|
|
312
312
|
/**
|
|
313
313
|
* @See crypto.constants.RSA_PKCS1_PADDING
|
|
314
314
|
*/
|
|
315
|
-
padding?: number;
|
|
316
|
-
saltLength?: number;
|
|
317
|
-
dsaEncoding?: DSAEncoding;
|
|
315
|
+
padding?: number | undefined;
|
|
316
|
+
saltLength?: number | undefined;
|
|
317
|
+
dsaEncoding?: DSAEncoding | undefined;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
|
|
@@ -443,13 +443,13 @@ declare module 'crypto' {
|
|
|
443
443
|
): void;
|
|
444
444
|
|
|
445
445
|
interface ScryptOptions {
|
|
446
|
-
cost?: number;
|
|
447
|
-
blockSize?: number;
|
|
448
|
-
parallelization?: number;
|
|
449
|
-
N?: number;
|
|
450
|
-
r?: number;
|
|
451
|
-
p?: number;
|
|
452
|
-
maxmem?: number;
|
|
446
|
+
cost?: number | undefined;
|
|
447
|
+
blockSize?: number | undefined;
|
|
448
|
+
parallelization?: number | undefined;
|
|
449
|
+
N?: number | undefined;
|
|
450
|
+
r?: number | undefined;
|
|
451
|
+
p?: number | undefined;
|
|
452
|
+
maxmem?: number | undefined;
|
|
453
453
|
}
|
|
454
454
|
function scrypt(
|
|
455
455
|
password: BinaryLike,
|
|
@@ -468,17 +468,17 @@ declare module 'crypto' {
|
|
|
468
468
|
|
|
469
469
|
interface RsaPublicKey {
|
|
470
470
|
key: KeyLike;
|
|
471
|
-
padding?: number;
|
|
471
|
+
padding?: number | undefined;
|
|
472
472
|
}
|
|
473
473
|
interface RsaPrivateKey {
|
|
474
474
|
key: KeyLike;
|
|
475
|
-
passphrase?: string;
|
|
475
|
+
passphrase?: string | undefined;
|
|
476
476
|
/**
|
|
477
477
|
* @default 'sha1'
|
|
478
478
|
*/
|
|
479
|
-
oaepHash?: string;
|
|
480
|
-
oaepLabel?: NodeJS.TypedArray;
|
|
481
|
-
padding?: number;
|
|
479
|
+
oaepHash?: string | undefined;
|
|
480
|
+
oaepLabel?: NodeJS.TypedArray | undefined;
|
|
481
|
+
padding?: number | undefined;
|
|
482
482
|
}
|
|
483
483
|
function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
|
484
484
|
function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
|
@@ -524,8 +524,8 @@ declare module 'crypto' {
|
|
|
524
524
|
|
|
525
525
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
526
526
|
format: T;
|
|
527
|
-
cipher?: string;
|
|
528
|
-
passphrase?: string;
|
|
527
|
+
cipher?: string | undefined;
|
|
528
|
+
passphrase?: string | undefined;
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
interface KeyPairKeyObjectResult {
|
|
@@ -573,7 +573,7 @@ declare module 'crypto' {
|
|
|
573
573
|
/**
|
|
574
574
|
* @default 0x10001
|
|
575
575
|
*/
|
|
576
|
-
publicExponent?: number;
|
|
576
|
+
publicExponent?: number | undefined;
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
interface DSAKeyPairKeyObjectOptions {
|
|
@@ -596,7 +596,7 @@ declare module 'crypto' {
|
|
|
596
596
|
/**
|
|
597
597
|
* @default 0x10001
|
|
598
598
|
*/
|
|
599
|
-
publicExponent?: number;
|
|
599
|
+
publicExponent?: number | undefined;
|
|
600
600
|
|
|
601
601
|
publicKeyEncoding: {
|
|
602
602
|
type: 'pkcs1' | 'spki';
|
node v12.20/dgram.d.ts
CHANGED
|
@@ -11,24 +11,24 @@ declare module 'dgram' {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
interface BindOptions {
|
|
14
|
-
port?: number;
|
|
15
|
-
address?: string;
|
|
16
|
-
exclusive?: boolean;
|
|
17
|
-
fd?: number;
|
|
14
|
+
port?: number | undefined;
|
|
15
|
+
address?: string | undefined;
|
|
16
|
+
exclusive?: boolean | undefined;
|
|
17
|
+
fd?: number | undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
type SocketType = "udp4" | "udp6";
|
|
21
21
|
|
|
22
22
|
interface SocketOptions {
|
|
23
23
|
type: SocketType;
|
|
24
|
-
reuseAddr?: boolean;
|
|
24
|
+
reuseAddr?: boolean | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
|
-
ipv6Only?: boolean;
|
|
29
|
-
recvBufferSize?: number;
|
|
30
|
-
sendBufferSize?: number;
|
|
31
|
-
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
|
|
28
|
+
ipv6Only?: boolean | undefined;
|
|
29
|
+
recvBufferSize?: number | undefined;
|
|
30
|
+
sendBufferSize?: number | undefined;
|
|
31
|
+
lookup?: ((hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void) | undefined;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
node v12.20/dns.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ declare module 'dns' {
|
|
|
4
4
|
const V4MAPPED: number;
|
|
5
5
|
|
|
6
6
|
interface LookupOptions {
|
|
7
|
-
family?: number;
|
|
8
|
-
hints?: number;
|
|
9
|
-
all?: boolean;
|
|
10
|
-
verbatim?: boolean;
|
|
7
|
+
family?: number | undefined;
|
|
8
|
+
hints?: number | undefined;
|
|
9
|
+
all?: boolean | undefined;
|
|
10
|
+
verbatim?: boolean | undefined;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
interface LookupOneOptions extends LookupOptions {
|
|
14
|
-
all?: false;
|
|
14
|
+
all?: false | undefined;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
interface LookupAllOptions extends LookupOptions {
|
|
@@ -272,7 +272,7 @@ declare module 'dns' {
|
|
|
272
272
|
const CANCELLED: string;
|
|
273
273
|
|
|
274
274
|
interface ResolverOptions {
|
|
275
|
-
timeout?: number;
|
|
275
|
+
timeout?: number | undefined;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
class Resolver {
|