@types/node 14.17.2 → 14.17.6

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 v14.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/v14.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 02 Jun 2021 07:31:35 GMT
11
+ * Last updated: Sat, 24 Jul 2021 17:31:17 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v14.17/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
16
  actual?: any;
17
17
  /** The `expected` property on the error instance. */
18
18
  expected?: any;
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
 
@@ -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
  /**
@@ -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
@@ -119,7 +119,7 @@ declare module 'child_process' {
119
119
  }
120
120
 
121
121
  interface MessageOptions {
122
- keepOpen?: boolean;
122
+ keepOpen?: boolean | undefined;
123
123
  }
124
124
 
125
125
  type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
@@ -131,40 +131,40 @@ declare module 'child_process' {
131
131
  * Specify the kind of serialization used for sending messages between processes.
132
132
  * @default 'json'
133
133
  */
134
- serialization?: SerializationType;
134
+ serialization?: SerializationType | undefined;
135
135
  }
136
136
 
137
137
  interface ProcessEnvOptions {
138
- uid?: number;
139
- gid?: number;
140
- cwd?: string;
141
- env?: NodeJS.ProcessEnv;
138
+ uid?: number | undefined;
139
+ gid?: number | undefined;
140
+ cwd?: string | undefined;
141
+ env?: NodeJS.ProcessEnv | undefined;
142
142
  }
143
143
 
144
144
  interface CommonOptions extends ProcessEnvOptions {
145
145
  /**
146
146
  * @default true
147
147
  */
148
- windowsHide?: boolean;
148
+ windowsHide?: boolean | undefined;
149
149
  /**
150
150
  * @default 0
151
151
  */
152
- timeout?: number;
152
+ timeout?: number | undefined;
153
153
  }
154
154
 
155
155
  interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
156
- argv0?: string;
157
- stdio?: StdioOptions;
158
- shell?: boolean | string;
159
- windowsVerbatimArguments?: boolean;
156
+ argv0?: string | undefined;
157
+ stdio?: StdioOptions | undefined;
158
+ shell?: boolean | string | undefined;
159
+ windowsVerbatimArguments?: boolean | undefined;
160
160
  }
161
161
 
162
162
  interface SpawnOptions extends CommonSpawnOptions {
163
- detached?: boolean;
163
+ detached?: boolean | undefined;
164
164
  }
165
165
 
166
166
  interface SpawnOptionsWithoutStdio extends SpawnOptions {
167
- stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
167
+ stdio?: 'pipe' | Array<null | undefined | 'pipe'> | undefined;
168
168
  }
169
169
 
170
170
  type StdioNull = 'inherit' | 'ignore' | Stream;
@@ -263,9 +263,9 @@ declare module 'child_process' {
263
263
  function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
264
264
 
265
265
  interface ExecOptions extends CommonOptions {
266
- shell?: string;
267
- maxBuffer?: number;
268
- killSignal?: NodeJS.Signals | number;
266
+ shell?: string | undefined;
267
+ maxBuffer?: number | undefined;
268
+ killSignal?: NodeJS.Signals | number | undefined;
269
269
  }
270
270
 
271
271
  interface ExecOptionsWithStringEncoding extends ExecOptions {
@@ -277,10 +277,10 @@ declare module 'child_process' {
277
277
  }
278
278
 
279
279
  interface ExecException extends Error {
280
- cmd?: string;
281
- killed?: boolean;
282
- code?: number;
283
- signal?: NodeJS.Signals;
280
+ cmd?: string | undefined;
281
+ killed?: boolean | undefined;
282
+ code?: number | undefined;
283
+ signal?: NodeJS.Signals | undefined;
284
284
  }
285
285
 
286
286
  // no `options` definitely means stdout/stderr are `string`.
@@ -324,10 +324,10 @@ declare module 'child_process' {
324
324
  }
325
325
 
326
326
  interface ExecFileOptions extends CommonOptions {
327
- maxBuffer?: number;
328
- killSignal?: NodeJS.Signals | number;
329
- windowsVerbatimArguments?: boolean;
330
- shell?: boolean | string;
327
+ maxBuffer?: number | undefined;
328
+ killSignal?: NodeJS.Signals | number | undefined;
329
+ windowsVerbatimArguments?: boolean | undefined;
330
+ shell?: boolean | string | undefined;
331
331
  }
332
332
  interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
333
333
  encoding: BufferEncoding;
@@ -428,27 +428,27 @@ declare module 'child_process' {
428
428
  }
429
429
 
430
430
  interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
431
- execPath?: string;
432
- execArgv?: string[];
433
- silent?: boolean;
434
- stdio?: StdioOptions;
435
- detached?: boolean;
436
- windowsVerbatimArguments?: boolean;
431
+ execPath?: string | undefined;
432
+ execArgv?: string[] | undefined;
433
+ silent?: boolean | undefined;
434
+ stdio?: StdioOptions | undefined;
435
+ detached?: boolean | undefined;
436
+ windowsVerbatimArguments?: boolean | undefined;
437
437
  }
438
438
  function fork(modulePath: string, options?: ForkOptions): ChildProcess;
439
439
  function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
440
440
 
441
441
  interface SpawnSyncOptions extends CommonSpawnOptions {
442
- input?: string | NodeJS.ArrayBufferView;
443
- killSignal?: NodeJS.Signals | number;
444
- maxBuffer?: number;
445
- encoding?: BufferEncoding | 'buffer' | null;
442
+ input?: string | NodeJS.ArrayBufferView | undefined;
443
+ killSignal?: NodeJS.Signals | number | undefined;
444
+ maxBuffer?: number | undefined;
445
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
446
446
  }
447
447
  interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
448
448
  encoding: BufferEncoding;
449
449
  }
450
450
  interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
451
- encoding?: 'buffer' | null;
451
+ encoding?: 'buffer' | null | undefined;
452
452
  }
453
453
  interface SpawnSyncReturns<T> {
454
454
  pid: number;
@@ -457,7 +457,7 @@ declare module 'child_process' {
457
457
  stderr: T;
458
458
  status: number | null;
459
459
  signal: NodeJS.Signals | null;
460
- error?: Error;
460
+ error?: Error | undefined;
461
461
  }
462
462
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
463
463
  function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
@@ -468,18 +468,18 @@ declare module 'child_process' {
468
468
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
469
469
 
470
470
  interface ExecSyncOptions extends CommonOptions {
471
- input?: string | Uint8Array;
472
- stdio?: StdioOptions;
473
- shell?: string;
474
- killSignal?: NodeJS.Signals | number;
475
- maxBuffer?: number;
476
- encoding?: BufferEncoding | 'buffer' | null;
471
+ input?: string | Uint8Array | undefined;
472
+ stdio?: StdioOptions | undefined;
473
+ shell?: string | undefined;
474
+ killSignal?: NodeJS.Signals | number | undefined;
475
+ maxBuffer?: number | undefined;
476
+ encoding?: BufferEncoding | 'buffer' | null | undefined;
477
477
  }
478
478
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
479
479
  encoding: BufferEncoding;
480
480
  }
481
481
  interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
482
- encoding?: 'buffer' | null;
482
+ encoding?: 'buffer' | null | undefined;
483
483
  }
484
484
  function execSync(command: string): Buffer;
485
485
  function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
@@ -487,12 +487,12 @@ declare module 'child_process' {
487
487
  function execSync(command: string, options?: ExecSyncOptions): Buffer;
488
488
 
489
489
  interface ExecFileSyncOptions extends CommonOptions {
490
- input?: string | NodeJS.ArrayBufferView;
491
- stdio?: StdioOptions;
492
- killSignal?: NodeJS.Signals | number;
493
- maxBuffer?: number;
494
- encoding?: BufferEncoding;
495
- shell?: boolean | string;
490
+ input?: string | NodeJS.ArrayBufferView | undefined;
491
+ stdio?: StdioOptions | undefined;
492
+ killSignal?: NodeJS.Signals | number | undefined;
493
+ maxBuffer?: number | undefined;
494
+ encoding?: BufferEncoding | undefined;
495
+ shell?: boolean | string | undefined;
496
496
  }
497
497
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
498
498
  encoding: BufferEncoding;
@@ -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,8 +99,8 @@ declare module 'cluster' {
99
99
  schedulingPolicy: number;
100
100
  settings: ClusterSettings;
101
101
  setupMaster(settings?: ClusterSettings): void;
102
- worker?: Worker;
103
- workers?: NodeJS.Dict<Worker>;
102
+ worker?: Worker | undefined;
103
+ workers?: NodeJS.Dict<Worker> | undefined;
104
104
 
105
105
  readonly SCHED_NONE: number;
106
106
  readonly SCHED_RR: number;
@@ -25,16 +25,16 @@ declare module 'console' {
25
25
  */
26
26
  countReset(label?: string): void;
27
27
  /**
28
- * The `console.debug()` function is an alias for {@link console.log()}.
28
+ * The `console.debug()` function is an alias for {@link console.log}.
29
29
  */
30
30
  debug(message?: any, ...optionalParams: any[]): void;
31
31
  /**
32
- * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
32
+ * Uses {@link util.inspect} on `obj` and prints the resulting string to `stdout`.
33
33
  * This function bypasses any custom `inspect()` function defined on `obj`.
34
34
  */
35
35
  dir(obj: any, options?: InspectOptions): void;
36
36
  /**
37
- * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
37
+ * This method calls {@link console.log} passing it the arguments received. Please note that this method does not produce any XML formatting
38
38
  */
39
39
  dirxml(...data: any[]): void;
40
40
  /**
@@ -47,7 +47,7 @@ declare module 'console' {
47
47
  */
48
48
  group(...label: any[]): void;
49
49
  /**
50
- * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
50
+ * The `console.groupCollapsed()` function is an alias for {@link console.group}.
51
51
  */
52
52
  groupCollapsed(...label: any[]): void;
53
53
  /**
@@ -55,7 +55,7 @@ declare module 'console' {
55
55
  */
56
56
  groupEnd(): void;
57
57
  /**
58
- * The {@link console.info()} function is an alias for {@link console.log()}.
58
+ * The {@link console.info} function is an alias for {@link console.log}.
59
59
  */
60
60
  info(message?: any, ...optionalParams: any[]): void;
61
61
  /**
@@ -72,19 +72,19 @@ declare module 'console' {
72
72
  */
73
73
  time(label?: string): void;
74
74
  /**
75
- * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
75
+ * Stops a timer that was previously started by calling {@link console.time} and prints the result to `stdout`.
76
76
  */
77
77
  timeEnd(label?: string): void;
78
78
  /**
79
- * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
79
+ * For a timer that was previously started by calling {@link console.time}, prints the elapsed time and other `data` arguments to `stdout`.
80
80
  */
81
81
  timeLog(label?: string, ...data: any[]): void;
82
82
  /**
83
- * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
83
+ * Prints to `stderr` the string 'Trace :', followed by the {@link util.format} formatted message and stack trace to the current position in the code.
84
84
  */
85
85
  trace(message?: any, ...optionalParams: any[]): void;
86
86
  /**
87
- * The {@link console.warn()} function is an alias for {@link console.error()}.
87
+ * The {@link console.warn} function is an alias for {@link console.error}.
88
88
  */
89
89
  warn(message?: any, ...optionalParams: any[]): void;
90
90
 
@@ -111,10 +111,10 @@ declare module 'console' {
111
111
  namespace NodeJS {
112
112
  interface ConsoleConstructorOptions {
113
113
  stdout: WritableStream;
114
- stderr?: WritableStream;
115
- ignoreErrors?: boolean;
116
- colorMode?: boolean | 'auto';
117
- inspectOptions?: InspectOptions;
114
+ stderr?: WritableStream | undefined;
115
+ ignoreErrors?: boolean | undefined;
116
+ colorMode?: boolean | 'auto' | undefined;
117
+ inspectOptions?: InspectOptions | undefined;
118
118
  }
119
119
 
120
120
  interface ConsoleConstructor {
node v14.17/crypto.d.ts CHANGED
@@ -130,7 +130,7 @@ declare module 'crypto' {
130
130
  * For XOF hash functions such as `shake256`, the
131
131
  * outputLength option can be used to specify the desired output length in bytes.
132
132
  */
133
- outputLength?: number;
133
+ outputLength?: number | undefined;
134
134
  }
135
135
 
136
136
  /** @deprecated since v10.0.0 */
@@ -169,21 +169,21 @@ declare module 'crypto' {
169
169
  interface KeyExportOptions<T extends KeyFormat> {
170
170
  type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
171
171
  format: T;
172
- cipher?: string;
173
- passphrase?: string | Buffer;
172
+ cipher?: string | undefined;
173
+ passphrase?: string | Buffer | undefined;
174
174
  }
175
175
 
176
176
  class KeyObject {
177
177
  private constructor();
178
- asymmetricKeyType?: KeyType;
178
+ asymmetricKeyType?: KeyType | undefined;
179
179
  /**
180
180
  * For asymmetric keys, this property represents the size of the embedded key in
181
181
  * bytes. This property is `undefined` for symmetric keys.
182
182
  */
183
- asymmetricKeySize?: number;
183
+ asymmetricKeySize?: number | undefined;
184
184
  export(options: KeyExportOptions<'pem'>): string | Buffer;
185
185
  export(options?: KeyExportOptions<'der'>): Buffer;
186
- symmetricKeySize?: number;
186
+ symmetricKeySize?: number | undefined;
187
187
  type: KeyObjectType;
188
188
  }
189
189
 
@@ -198,7 +198,7 @@ declare module 'crypto' {
198
198
  authTagLength: number;
199
199
  }
200
200
  interface CipherGCMOptions extends stream.TransformOptions {
201
- authTagLength?: number;
201
+ authTagLength?: number | undefined;
202
202
  }
203
203
  /** @deprecated since v10.0.0 use `createCipheriv()` */
204
204
  function createCipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): CipherCCM;
@@ -295,15 +295,15 @@ declare module 'crypto' {
295
295
 
296
296
  interface PrivateKeyInput {
297
297
  key: string | Buffer;
298
- format?: KeyFormat;
299
- type?: 'pkcs1' | 'pkcs8' | 'sec1';
300
- passphrase?: string | Buffer;
298
+ format?: KeyFormat | undefined;
299
+ type?: 'pkcs1' | 'pkcs8' | 'sec1' | undefined;
300
+ passphrase?: string | Buffer | undefined;
301
301
  }
302
302
 
303
303
  interface PublicKeyInput {
304
304
  key: string | Buffer;
305
- format?: KeyFormat;
306
- type?: 'pkcs1' | 'spki';
305
+ format?: KeyFormat | undefined;
306
+ type?: 'pkcs1' | 'spki' | undefined;
307
307
  }
308
308
 
309
309
  function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
@@ -318,9 +318,9 @@ declare module 'crypto' {
318
318
  /**
319
319
  * @See crypto.constants.RSA_PKCS1_PADDING
320
320
  */
321
- padding?: number;
322
- saltLength?: number;
323
- dsaEncoding?: DSAEncoding;
321
+ padding?: number | undefined;
322
+ saltLength?: number | undefined;
323
+ dsaEncoding?: DSAEncoding | undefined;
324
324
  }
325
325
 
326
326
  interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
@@ -457,19 +457,19 @@ declare module 'crypto' {
457
457
  *
458
458
  * @default `false`
459
459
  */
460
- disableEntropyCache?: boolean;
460
+ disableEntropyCache?: boolean | undefined;
461
461
  }
462
462
 
463
463
  function randomUUID(options?: RandomUUIDOptions): string;
464
464
 
465
465
  interface ScryptOptions {
466
- cost?: number;
467
- blockSize?: number;
468
- parallelization?: number;
469
- N?: number;
470
- r?: number;
471
- p?: number;
472
- maxmem?: number;
466
+ cost?: number | undefined;
467
+ blockSize?: number | undefined;
468
+ parallelization?: number | undefined;
469
+ N?: number | undefined;
470
+ r?: number | undefined;
471
+ p?: number | undefined;
472
+ maxmem?: number | undefined;
473
473
  }
474
474
  function scrypt(
475
475
  password: BinaryLike,
@@ -488,17 +488,17 @@ declare module 'crypto' {
488
488
 
489
489
  interface RsaPublicKey {
490
490
  key: KeyLike;
491
- padding?: number;
491
+ padding?: number | undefined;
492
492
  }
493
493
  interface RsaPrivateKey {
494
494
  key: KeyLike;
495
- passphrase?: string;
495
+ passphrase?: string | undefined;
496
496
  /**
497
497
  * @default 'sha1'
498
498
  */
499
- oaepHash?: string;
500
- oaepLabel?: NodeJS.TypedArray;
501
- padding?: number;
499
+ oaepHash?: string | undefined;
500
+ oaepLabel?: NodeJS.TypedArray | undefined;
501
+ padding?: number | undefined;
502
502
  }
503
503
  function publicEncrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
504
504
  function publicDecrypt(key: RsaPublicKey | RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
@@ -544,8 +544,8 @@ declare module 'crypto' {
544
544
 
545
545
  interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
546
546
  format: T;
547
- cipher?: string;
548
- passphrase?: string;
547
+ cipher?: string | undefined;
548
+ passphrase?: string | undefined;
549
549
  }
550
550
 
551
551
  interface KeyPairKeyObjectResult {
@@ -593,7 +593,7 @@ declare module 'crypto' {
593
593
  /**
594
594
  * @default 0x10001
595
595
  */
596
- publicExponent?: number;
596
+ publicExponent?: number | undefined;
597
597
  }
598
598
 
599
599
  interface DSAKeyPairKeyObjectOptions {
@@ -616,7 +616,7 @@ declare module 'crypto' {
616
616
  /**
617
617
  * @default 0x10001
618
618
  */
619
- publicExponent?: number;
619
+ publicExponent?: number | undefined;
620
620
 
621
621
  publicKeyEncoding: {
622
622
  type: 'pkcs1' | 'spki';
node v14.17/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 v14.17/dns.d.ts CHANGED
@@ -9,14 +9,14 @@ declare module 'dns' {
9
9
  const ALL: number;
10
10
 
11
11
  interface LookupOptions {
12
- family?: number;
13
- hints?: number;
14
- all?: boolean;
15
- verbatim?: boolean;
12
+ family?: number | undefined;
13
+ hints?: number | undefined;
14
+ all?: boolean | undefined;
15
+ verbatim?: boolean | undefined;
16
16
  }
17
17
 
18
18
  interface LookupOneOptions extends LookupOptions {
19
- all?: false;
19
+ all?: false | undefined;
20
20
  }
21
21
 
22
22
  interface LookupAllOptions extends LookupOptions {
@@ -277,7 +277,7 @@ declare module 'dns' {
277
277
  const CANCELLED: string;
278
278
 
279
279
  interface ResolverOptions {
280
- timeout?: number;
280
+ timeout?: number | undefined;
281
281
  }
282
282
 
283
283
  class Resolver {
node v14.17/events.d.ts CHANGED
@@ -3,7 +3,7 @@ declare module 'events' {
3
3
  /**
4
4
  * Enables automatic capturing of promise rejection.
5
5
  */
6
- captureRejections?: boolean;
6
+ captureRejections?: boolean | undefined;
7
7
  }
8
8
 
9
9
  interface NodeEventTarget {