@types/node 16.0.0 → 16.0.1

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 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: Sat, 03 Jul 2021 00:31:26 GMT
11
+ * Last updated: Wed, 07 Jul 2021 16:31:27 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
node/assert.d.ts CHANGED
@@ -11,16 +11,16 @@ declare module 'assert' {
11
11
 
12
12
  constructor(options?: {
13
13
  /** If provided, the error message is set to this value. */
14
- message?: string;
14
+ message?: string | undefined;
15
15
  /** The `actual` property on the error instance. */
16
- actual?: unknown;
16
+ actual?: unknown | undefined;
17
17
  /** The `expected` property on the error instance. */
18
- expected?: unknown;
18
+ expected?: unknown | undefined;
19
19
  /** The `operator` property on the error instance. */
20
- operator?: string;
20
+ operator?: string | undefined;
21
21
  /** If provided, the generated stack trace omits frames before this function. */
22
22
  // tslint:disable-next-line:ban-types
23
- stackStartFn?: Function;
23
+ stackStartFn?: Function | undefined;
24
24
  });
25
25
  }
26
26
 
node/async_hooks.d.ts CHANGED
@@ -87,7 +87,7 @@ declare module 'async_hooks' {
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.
@@ -96,7 +96,7 @@ declare module 'async_hooks' {
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/buffer.d.ts CHANGED
@@ -28,14 +28,14 @@ declare module 'buffer' {
28
28
  /**
29
29
  * @default 'utf8'
30
30
  */
31
- encoding?: BufferEncoding;
31
+ encoding?: BufferEncoding | undefined;
32
32
 
33
33
  /**
34
34
  * The Blob content-type. The intent is for `type` to convey
35
35
  * the MIME media type of the data, however no validation of the type format
36
36
  * is performed.
37
37
  */
38
- type?: string;
38
+ type?: string | undefined;
39
39
  }
40
40
 
41
41
  /**
node/child_process.d.ts CHANGED
@@ -11,7 +11,7 @@ declare module 'child_process' {
11
11
  stdin: Writable | null;
12
12
  stdout: Readable | null;
13
13
  stderr: Readable | null;
14
- readonly channel?: Pipe | null;
14
+ readonly channel?: Pipe | null | undefined;
15
15
  readonly stdio: [
16
16
  Writable | null, // stdin
17
17
  Readable | null, // stdout
@@ -20,7 +20,7 @@ declare module 'child_process' {
20
20
  Readable | Writable | null | undefined // extra
21
21
  ];
22
22
  readonly killed: boolean;
23
- readonly pid?: number;
23
+ readonly pid?: number | undefined;
24
24
  readonly connected: boolean;
25
25
  readonly exitCode: number | null;
26
26
  readonly signalCode: NodeJS.Signals | null;
@@ -126,7 +126,7 @@ declare module 'child_process' {
126
126
  }
127
127
 
128
128
  interface MessageOptions {
129
- keepOpen?: boolean;
129
+ keepOpen?: boolean | undefined;
130
130
  }
131
131
 
132
132
  type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
@@ -140,51 +140,51 @@ declare module 'child_process' {
140
140
  * Specify the kind of serialization used for sending messages between processes.
141
141
  * @default 'json'
142
142
  */
143
- serialization?: SerializationType;
143
+ serialization?: SerializationType | undefined;
144
144
 
145
145
  /**
146
146
  * The signal value to be used when the spawned process will be killed by the abort signal.
147
147
  * @default 'SIGTERM'
148
148
  */
149
- killSignal?: NodeJS.Signals | number;
149
+ killSignal?: NodeJS.Signals | number | undefined;
150
150
 
151
151
  /**
152
152
  * In milliseconds the maximum amount of time the process is allowed to run.
153
153
  */
154
- timeout?: number;
154
+ timeout?: number | undefined;
155
155
  }
156
156
 
157
157
  interface ProcessEnvOptions {
158
- uid?: number;
159
- gid?: number;
160
- cwd?: string;
161
- env?: NodeJS.ProcessEnv;
158
+ uid?: number | undefined;
159
+ gid?: number | undefined;
160
+ cwd?: string | undefined;
161
+ env?: NodeJS.ProcessEnv | undefined;
162
162
  }
163
163
 
164
164
  interface CommonOptions extends ProcessEnvOptions {
165
165
  /**
166
166
  * @default true
167
167
  */
168
- windowsHide?: boolean;
168
+ windowsHide?: boolean | undefined;
169
169
  /**
170
170
  * @default 0
171
171
  */
172
- timeout?: number;
172
+ timeout?: number | undefined;
173
173
  }
174
174
 
175
175
  interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
176
- argv0?: string;
177
- stdio?: StdioOptions;
178
- shell?: boolean | string;
179
- windowsVerbatimArguments?: boolean;
176
+ argv0?: string | undefined;
177
+ stdio?: StdioOptions | undefined;
178
+ shell?: boolean | string | undefined;
179
+ windowsVerbatimArguments?: boolean | undefined;
180
180
  }
181
181
 
182
182
  interface SpawnOptions extends CommonSpawnOptions {
183
- detached?: boolean;
183
+ detached?: boolean | undefined;
184
184
  }
185
185
 
186
186
  interface SpawnOptionsWithoutStdio extends SpawnOptions {
187
- stdio?: StdioPipeNamed | StdioPipe[];
187
+ stdio?: StdioPipeNamed | StdioPipe[] | undefined;
188
188
  }
189
189
 
190
190
  type StdioNull = 'inherit' | 'ignore' | Stream;
@@ -284,9 +284,9 @@ declare module 'child_process' {
284
284
  function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
285
285
 
286
286
  interface ExecOptions extends CommonOptions {
287
- shell?: string;
288
- maxBuffer?: number;
289
- killSignal?: NodeJS.Signals | number;
287
+ shell?: string | undefined;
288
+ maxBuffer?: number | undefined;
289
+ killSignal?: NodeJS.Signals | number | undefined;
290
290
  }
291
291
 
292
292
  interface ExecOptionsWithStringEncoding extends ExecOptions {
@@ -298,10 +298,10 @@ declare module 'child_process' {
298
298
  }
299
299
 
300
300
  interface ExecException extends Error {
301
- cmd?: string;
302
- killed?: boolean;
303
- code?: number;
304
- signal?: NodeJS.Signals;
301
+ cmd?: string | undefined;
302
+ killed?: boolean | undefined;
303
+ code?: number | undefined;
304
+ signal?: NodeJS.Signals | undefined;
305
305
  }
306
306
 
307
307
  // no `options` definitely means stdout/stderr are `string`.
@@ -345,11 +345,11 @@ declare module 'child_process' {
345
345
  }
346
346
 
347
347
  interface ExecFileOptions extends CommonOptions, Abortable {
348
- maxBuffer?: number;
349
- killSignal?: NodeJS.Signals | number;
350
- windowsVerbatimArguments?: boolean;
351
- shell?: boolean | string;
352
- signal?: AbortSignal;
348
+ maxBuffer?: number | undefined;
349
+ killSignal?: NodeJS.Signals | number | undefined;
350
+ windowsVerbatimArguments?: boolean | undefined;
351
+ shell?: boolean | string | undefined;
352
+ signal?: AbortSignal | undefined;
353
353
  }
354
354
  interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
355
355
  encoding: BufferEncoding;
@@ -450,26 +450,26 @@ declare module 'child_process' {
450
450
  }
451
451
 
452
452
  interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
453
- execPath?: string;
454
- execArgv?: string[];
455
- silent?: boolean;
456
- stdio?: StdioOptions;
457
- detached?: boolean;
458
- windowsVerbatimArguments?: boolean;
453
+ execPath?: string | undefined;
454
+ execArgv?: string[] | undefined;
455
+ silent?: boolean | undefined;
456
+ stdio?: StdioOptions | undefined;
457
+ detached?: boolean | undefined;
458
+ windowsVerbatimArguments?: boolean | undefined;
459
459
  }
460
460
  function fork(modulePath: string, options?: ForkOptions): ChildProcess;
461
461
  function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
462
462
 
463
463
  interface SpawnSyncOptions extends CommonSpawnOptions {
464
- input?: string | NodeJS.ArrayBufferView;
465
- maxBuffer?: number;
466
- encoding?: BufferEncoding | 'buffer' | null;
464
+ input?: string | NodeJS.ArrayBufferView | undefined;
465
+ maxBuffer?: number | undefined;
466
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
467
467
  }
468
468
  interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
469
469
  encoding: BufferEncoding;
470
470
  }
471
471
  interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
472
- encoding?: 'buffer' | null;
472
+ encoding?: 'buffer' | null | undefined;
473
473
  }
474
474
  interface SpawnSyncReturns<T> {
475
475
  pid: number;
@@ -478,7 +478,7 @@ declare module 'child_process' {
478
478
  stderr: T;
479
479
  status: number | null;
480
480
  signal: NodeJS.Signals | null;
481
- error?: Error;
481
+ error?: Error | undefined;
482
482
  }
483
483
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
484
484
  function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
@@ -489,21 +489,21 @@ declare module 'child_process' {
489
489
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
490
490
 
491
491
  interface CommonExecOptions extends ProcessEnvOptions {
492
- input?: string | NodeJS.ArrayBufferView;
493
- stdio?: StdioOptions;
494
- killSignal?: NodeJS.Signals | number;
495
- maxBuffer?: number;
496
- encoding?: BufferEncoding | 'buffer' | null;
492
+ input?: string | NodeJS.ArrayBufferView | undefined;
493
+ stdio?: StdioOptions | undefined;
494
+ killSignal?: NodeJS.Signals | number | undefined;
495
+ maxBuffer?: number | undefined;
496
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
497
497
  }
498
498
 
499
499
  interface ExecSyncOptions extends CommonExecOptions {
500
- shell?: string;
500
+ shell?: string | undefined;
501
501
  }
502
502
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
503
503
  encoding: BufferEncoding;
504
504
  }
505
505
  interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
506
- encoding?: 'buffer' | null;
506
+ encoding?: 'buffer' | null | undefined;
507
507
  }
508
508
  function execSync(command: string): Buffer;
509
509
  function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
@@ -511,7 +511,7 @@ declare module 'child_process' {
511
511
  function execSync(command: string, options?: ExecSyncOptions): Buffer;
512
512
 
513
513
  interface ExecFileSyncOptions extends CommonExecOptions {
514
- shell?: boolean | string;
514
+ shell?: boolean | string | undefined;
515
515
  }
516
516
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
517
517
  encoding: BufferEncoding;
node/cluster.d.ts CHANGED
@@ -5,14 +5,14 @@ declare module 'cluster' {
5
5
  import * as net from 'net';
6
6
 
7
7
  export 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
  export interface Address {
@@ -105,8 +105,8 @@ declare module 'cluster' {
105
105
  * `setupPrimary` is used to change the default 'fork' behavior. Once called, the settings will be present in cluster.settings.
106
106
  */
107
107
  setupPrimary(settings?: ClusterSettings): void;
108
- readonly worker?: Worker;
109
- readonly workers?: NodeJS.Dict<Worker>;
108
+ readonly worker?: Worker | undefined;
109
+ readonly workers?: NodeJS.Dict<Worker> | undefined;
110
110
 
111
111
  readonly SCHED_NONE: number;
112
112
  readonly SCHED_RR: number;
node/console.d.ts CHANGED
@@ -109,10 +109,10 @@ declare module 'console' {
109
109
  namespace console {
110
110
  interface ConsoleConstructorOptions {
111
111
  stdout: NodeJS.WritableStream;
112
- stderr?: NodeJS.WritableStream;
113
- ignoreErrors?: boolean;
114
- colorMode?: boolean | 'auto';
115
- inspectOptions?: InspectOptions;
112
+ stderr?: NodeJS.WritableStream | undefined;
113
+ ignoreErrors?: boolean | undefined;
114
+ colorMode?: boolean | 'auto' | undefined;
115
+ inspectOptions?: InspectOptions | undefined;
116
116
  }
117
117
 
118
118
  interface ConsoleConstructor {
node/crypto.d.ts CHANGED
@@ -154,7 +154,7 @@ declare module 'crypto' {
154
154
  * For XOF hash functions such as `shake256`, the
155
155
  * outputLength option can be used to specify the desired output length in bytes.
156
156
  */
157
- outputLength?: number;
157
+ outputLength?: number | undefined;
158
158
  }
159
159
 
160
160
  /** @deprecated since v10.0.0 */
@@ -193,26 +193,26 @@ declare module 'crypto' {
193
193
  interface KeyExportOptions<T extends KeyFormat> {
194
194
  type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
195
195
  format: T;
196
- cipher?: string;
197
- passphrase?: string | Buffer;
196
+ cipher?: string | undefined;
197
+ passphrase?: string | Buffer | undefined;
198
198
  }
199
199
  interface JwkKeyExportOptions {
200
200
  format: 'jwk';
201
201
  }
202
202
  interface JsonWebKey {
203
- crv?: string;
204
- d?: string;
205
- dp?: string;
206
- dq?: string;
207
- e?: string;
208
- k?: string;
209
- kty?: string;
210
- n?: string;
211
- p?: string;
212
- q?: string;
213
- qi?: string;
214
- x?: string;
215
- y?: string;
203
+ crv?: string | undefined;
204
+ d?: string | undefined;
205
+ dp?: string | undefined;
206
+ dq?: string | undefined;
207
+ e?: string | undefined;
208
+ k?: string | undefined;
209
+ kty?: string | undefined;
210
+ n?: string | undefined;
211
+ p?: string | undefined;
212
+ q?: string | undefined;
213
+ qi?: string | undefined;
214
+ x?: string | undefined;
215
+ y?: string | undefined;
216
216
  [key: string]: unknown;
217
217
  }
218
218
 
@@ -220,19 +220,19 @@ declare module 'crypto' {
220
220
  /**
221
221
  * Key size in bits (RSA, DSA).
222
222
  */
223
- modulusLength?: number;
223
+ modulusLength?: number | undefined;
224
224
  /**
225
225
  * Public exponent (RSA).
226
226
  */
227
- publicExponent?: bigint;
227
+ publicExponent?: bigint | undefined;
228
228
  /**
229
229
  * Size of q in bits (DSA).
230
230
  */
231
- divisorLength?: number;
231
+ divisorLength?: number | undefined;
232
232
  /**
233
233
  * Name of the curve (EC).
234
234
  */
235
- namedCurve?: string;
235
+ namedCurve?: string | undefined;
236
236
  }
237
237
 
238
238
  interface JwkKeyExportOptions {
@@ -241,23 +241,23 @@ declare module 'crypto' {
241
241
 
242
242
  class KeyObject {
243
243
  private constructor();
244
- asymmetricKeyType?: KeyType;
244
+ asymmetricKeyType?: KeyType | undefined;
245
245
  /**
246
246
  * For asymmetric keys, this property represents the size of the embedded key in
247
247
  * bytes. This property is `undefined` for symmetric keys.
248
248
  */
249
- asymmetricKeySize?: number;
249
+ asymmetricKeySize?: number | undefined;
250
250
  /**
251
251
  * This property exists only on asymmetric keys. Depending on the type of the key,
252
252
  * this object contains information about the key. None of the information obtained
253
253
  * through this property can be used to uniquely identify a key or to compromise the
254
254
  * security of the key.
255
255
  */
256
- asymmetricKeyDetails?: AsymmetricKeyDetails;
256
+ asymmetricKeyDetails?: AsymmetricKeyDetails | undefined;
257
257
  export(options: KeyExportOptions<'pem'>): string | Buffer;
258
258
  export(options?: KeyExportOptions<'der'>): Buffer;
259
259
  export(options?: JwkKeyExportOptions): JsonWebKey;
260
- symmetricKeySize?: number;
260
+ symmetricKeySize?: number | undefined;
261
261
  type: KeyObjectType;
262
262
  }
263
263
 
@@ -272,7 +272,7 @@ declare module 'crypto' {
272
272
  authTagLength: number;
273
273
  }
274
274
  interface CipherGCMOptions extends stream.TransformOptions {
275
- authTagLength?: number;
275
+ authTagLength?: number | undefined;
276
276
  }
277
277
  /** @deprecated since v10.0.0 use `createCipheriv()` */
278
278
  function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
@@ -369,15 +369,15 @@ declare module 'crypto' {
369
369
 
370
370
  interface PrivateKeyInput {
371
371
  key: string | Buffer;
372
- format?: KeyFormat;
373
- type?: 'pkcs1' | 'pkcs8' | 'sec1';
374
- passphrase?: string | Buffer;
372
+ format?: KeyFormat | undefined;
373
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
374
+ passphrase?: string | Buffer | undefined;
375
375
  }
376
376
 
377
377
  interface PublicKeyInput {
378
378
  key: string | Buffer;
379
- format?: KeyFormat;
380
- type?: 'pkcs1' | 'spki';
379
+ format?: KeyFormat | undefined;
380
+ type?: 'pkcs1' | 'spki' | undefined;
381
381
  }
382
382
 
383
383
  function generateKey(type: 'hmac' | 'aes', options: {length: number}, callback: (err: Error | null, key: KeyObject) => void): void;
@@ -399,9 +399,9 @@ declare module 'crypto' {
399
399
  /**
400
400
  * @See crypto.constants.RSA_PKCS1_PADDING
401
401
  */
402
- padding?: number;
403
- saltLength?: number;
404
- dsaEncoding?: DSAEncoding;
402
+ padding?: number | undefined;
403
+ saltLength?: number | undefined;
404
+ dsaEncoding?: DSAEncoding | undefined;
405
405
  }
406
406
 
407
407
  interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions { }
@@ -530,13 +530,13 @@ declare module 'crypto' {
530
530
  ): void;
531
531
 
532
532
  interface ScryptOptions {
533
- cost?: number;
534
- blockSize?: number;
535
- parallelization?: number;
536
- N?: number;
537
- r?: number;
538
- p?: number;
539
- maxmem?: number;
533
+ cost?: number | undefined;
534
+ blockSize?: number | undefined;
535
+ parallelization?: number | undefined;
536
+ N?: number | undefined;
537
+ r?: number | undefined;
538
+ p?: number | undefined;
539
+ maxmem?: number | undefined;
540
540
  }
541
541
  function scrypt(
542
542
  password: BinaryLike,
@@ -555,17 +555,17 @@ declare module 'crypto' {
555
555
 
556
556
  interface RsaPublicKey {
557
557
  key: KeyLike;
558
- padding?: number;
558
+ padding?: number | undefined;
559
559
  }
560
560
  interface RsaPrivateKey {
561
561
  key: KeyLike;
562
- passphrase?: string;
562
+ passphrase?: string | undefined;
563
563
  /**
564
564
  * @default 'sha1'
565
565
  */
566
- oaepHash?: string;
567
- oaepLabel?: NodeJS.TypedArray;
568
- padding?: number;
566
+ oaepHash?: string | undefined;
567
+ oaepLabel?: NodeJS.TypedArray | undefined;
568
+ padding?: number | undefined;
569
569
  }
570
570
  function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
571
571
  function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
@@ -611,8 +611,8 @@ declare module 'crypto' {
611
611
 
612
612
  interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
613
613
  format: T;
614
- cipher?: string;
615
- passphrase?: string;
614
+ cipher?: string | undefined;
615
+ passphrase?: string | undefined;
616
616
  }
617
617
 
618
618
  interface KeyPairKeyObjectResult {
@@ -660,7 +660,7 @@ declare module 'crypto' {
660
660
  /**
661
661
  * @default 0x10001
662
662
  */
663
- publicExponent?: number;
663
+ publicExponent?: number | undefined;
664
664
  }
665
665
 
666
666
  interface DSAKeyPairKeyObjectOptions {
@@ -683,7 +683,7 @@ declare module 'crypto' {
683
683
  /**
684
684
  * @default 0x10001
685
685
  */
686
- publicExponent?: number;
686
+ publicExponent?: number | undefined;
687
687
 
688
688
  publicKeyEncoding: {
689
689
  type: 'pkcs1' | 'spki';
@@ -1270,11 +1270,11 @@ declare module 'crypto' {
1270
1270
  /**
1271
1271
  * A test key length.
1272
1272
  */
1273
- keyLength?: number;
1273
+ keyLength?: number | undefined;
1274
1274
  /**
1275
1275
  * A test IV length.
1276
1276
  */
1277
- ivLength?: number;
1277
+ ivLength?: number | undefined;
1278
1278
  }
1279
1279
 
1280
1280
  interface CipherInfo {
@@ -1290,12 +1290,12 @@ declare module 'crypto' {
1290
1290
  * The block size of the cipher in bytes.
1291
1291
  * This property is omitted when mode is 'stream'.
1292
1292
  */
1293
- blockSize?: number;
1293
+ blockSize?: number | undefined;
1294
1294
  /**
1295
1295
  * The expected or default initialization vector length in bytes.
1296
1296
  * This property is omitted if the cipher does not use an initialization vector.
1297
1297
  */
1298
- ivLength?: number;
1298
+ ivLength?: number | undefined;
1299
1299
  /**
1300
1300
  * The expected or default key length in bytes.
1301
1301
  */
@@ -1374,7 +1374,7 @@ declare module 'crypto' {
1374
1374
  *
1375
1375
  * @default `false`
1376
1376
  */
1377
- disableEntropyCache?: boolean;
1377
+ disableEntropyCache?: boolean | undefined;
1378
1378
  }
1379
1379
 
1380
1380
  function randomUUID(options?: RandomUUIDOptions): string;
@@ -1450,7 +1450,7 @@ declare module 'crypto' {
1450
1450
  /**
1451
1451
  * The issuer certificate or `undefined` if the issuer certificate is not available.
1452
1452
  */
1453
- readonly issuerCertificate?: X509Certificate;
1453
+ readonly issuerCertificate?: X509Certificate | undefined;
1454
1454
 
1455
1455
  /**
1456
1456
  * The public key for this certificate.
@@ -1537,13 +1537,13 @@ declare module 'crypto' {
1537
1537
  type LargeNumberLike = NodeJS.ArrayBufferView | SharedArrayBuffer | ArrayBuffer | bigint;
1538
1538
 
1539
1539
  interface GeneratePrimeOptions {
1540
- add?: LargeNumberLike;
1541
- rem?: LargeNumberLike;
1540
+ add?: LargeNumberLike | undefined;
1541
+ rem?: LargeNumberLike | undefined;
1542
1542
  /**
1543
1543
  * @default false
1544
1544
  */
1545
- safe?: boolean;
1546
- bigint?: boolean;
1545
+ safe?: boolean | undefined;
1546
+ bigint?: boolean | undefined;
1547
1547
  }
1548
1548
 
1549
1549
  interface GeneratePrimeOptionsBigInt extends GeneratePrimeOptions {
@@ -1551,7 +1551,7 @@ declare module 'crypto' {
1551
1551
  }
1552
1552
 
1553
1553
  interface GeneratePrimeOptionsArrayBuffer extends GeneratePrimeOptions {
1554
- bigint?: false;
1554
+ bigint?: false | undefined;
1555
1555
  }
1556
1556
 
1557
1557
  function generatePrime(size: number, callback: (err: Error | null, prime: ArrayBuffer) => void): void;
@@ -1573,7 +1573,7 @@ declare module 'crypto' {
1573
1573
  *
1574
1574
  * @default 0
1575
1575
  */
1576
- checks?: number;
1576
+ checks?: number | undefined;
1577
1577
  }
1578
1578
 
1579
1579
  /**
node/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 extends Abortable {
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;