@types/node 12.20.13 → 12.20.17
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 +2 -2
- 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 +89 -89
- 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 +13 -13
- 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 +20 -20
- 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/tls.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ declare module 'tls' {
|
|
|
70
70
|
/**
|
|
71
71
|
* The name property is available only when type is 'ECDH'.
|
|
72
72
|
*/
|
|
73
|
-
name?: string;
|
|
73
|
+
name?: string | undefined;
|
|
74
74
|
/**
|
|
75
75
|
* The size of parameter of an ephemeral key exchange.
|
|
76
76
|
*/
|
|
@@ -85,7 +85,7 @@ declare module 'tls' {
|
|
|
85
85
|
/**
|
|
86
86
|
* Optional passphrase.
|
|
87
87
|
*/
|
|
88
|
-
passphrase?: string;
|
|
88
|
+
passphrase?: string | undefined;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
interface PxfObject {
|
|
@@ -96,7 +96,7 @@ declare module 'tls' {
|
|
|
96
96
|
/**
|
|
97
97
|
* Optional passphrase.
|
|
98
98
|
*/
|
|
99
|
-
passphrase?: string;
|
|
99
|
+
passphrase?: string | undefined;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
@@ -104,22 +104,22 @@ declare module 'tls' {
|
|
|
104
104
|
* If true the TLS socket will be instantiated in server-mode.
|
|
105
105
|
* Defaults to false.
|
|
106
106
|
*/
|
|
107
|
-
isServer?: boolean;
|
|
107
|
+
isServer?: boolean | undefined;
|
|
108
108
|
/**
|
|
109
109
|
* An optional net.Server instance.
|
|
110
110
|
*/
|
|
111
|
-
server?: net.Server;
|
|
111
|
+
server?: net.Server | undefined;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* An optional Buffer instance containing a TLS session.
|
|
115
115
|
*/
|
|
116
|
-
session?: Buffer;
|
|
116
|
+
session?: Buffer | undefined;
|
|
117
117
|
/**
|
|
118
118
|
* If true, specifies that the OCSP status request extension will be
|
|
119
119
|
* added to the client hello and an 'OCSPResponse' event will be
|
|
120
120
|
* emitted on the socket before establishing a secure communication
|
|
121
121
|
*/
|
|
122
|
-
requestOCSP?: boolean;
|
|
122
|
+
requestOCSP?: boolean | undefined;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
class TLSSocket extends net.Socket {
|
|
@@ -147,7 +147,7 @@ declare module 'tls' {
|
|
|
147
147
|
* String containing the selected ALPN protocol.
|
|
148
148
|
* When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
|
|
149
149
|
*/
|
|
150
|
-
alpnProtocol?: string;
|
|
150
|
+
alpnProtocol?: string | undefined;
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* Returns an object representing the local certificate. The returned
|
|
@@ -259,7 +259,7 @@ declare module 'tls' {
|
|
|
259
259
|
* is successfully completed.
|
|
260
260
|
* @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
|
|
261
261
|
*/
|
|
262
|
-
renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean;
|
|
262
|
+
renegotiate(options: { rejectUnauthorized?: boolean | undefined, requestCert?: boolean | undefined }, callback: (err: Error | null) => void): undefined | boolean;
|
|
263
263
|
/**
|
|
264
264
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
265
265
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -331,25 +331,25 @@ declare module 'tls' {
|
|
|
331
331
|
/**
|
|
332
332
|
* An optional TLS context object from tls.createSecureContext()
|
|
333
333
|
*/
|
|
334
|
-
secureContext?: SecureContext;
|
|
334
|
+
secureContext?: SecureContext | undefined;
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* When enabled, TLS packet trace information is written to `stderr`. This can be
|
|
338
338
|
* used to debug TLS connection problems.
|
|
339
339
|
* @default false
|
|
340
340
|
*/
|
|
341
|
-
enableTrace?: boolean;
|
|
341
|
+
enableTrace?: boolean | undefined;
|
|
342
342
|
/**
|
|
343
343
|
* If true the server will request a certificate from clients that
|
|
344
344
|
* connect and attempt to verify that certificate. Defaults to
|
|
345
345
|
* false.
|
|
346
346
|
*/
|
|
347
|
-
requestCert?: boolean;
|
|
347
|
+
requestCert?: boolean | undefined;
|
|
348
348
|
/**
|
|
349
349
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
350
350
|
* (Protocols should be ordered by their priority.)
|
|
351
351
|
*/
|
|
352
|
-
ALPNProtocols?: string[] | Uint8Array[] | Uint8Array;
|
|
352
|
+
ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
|
|
353
353
|
/**
|
|
354
354
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
355
355
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -359,14 +359,14 @@ declare module 'tls' {
|
|
|
359
359
|
* SecureContext.) If SNICallback wasn't provided the default callback
|
|
360
360
|
* with high-level API will be used (see below).
|
|
361
361
|
*/
|
|
362
|
-
SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
|
|
362
|
+
SNICallback?: ((servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void) | undefined;
|
|
363
363
|
/**
|
|
364
364
|
* If true the server will reject any connection which is not
|
|
365
365
|
* authorized with the list of supplied CAs. This option only has an
|
|
366
366
|
* effect if requestCert is true.
|
|
367
367
|
* @default true
|
|
368
368
|
*/
|
|
369
|
-
rejectUnauthorized?: boolean;
|
|
369
|
+
rejectUnauthorized?: boolean | undefined;
|
|
370
370
|
}
|
|
371
371
|
|
|
372
372
|
interface TlsOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
@@ -376,30 +376,30 @@ declare module 'tls' {
|
|
|
376
376
|
* the tls.Server object whenever a handshake times out. Default:
|
|
377
377
|
* 120000 (120 seconds).
|
|
378
378
|
*/
|
|
379
|
-
handshakeTimeout?: number;
|
|
379
|
+
handshakeTimeout?: number | undefined;
|
|
380
380
|
/**
|
|
381
381
|
* The number of seconds after which a TLS session created by the
|
|
382
382
|
* server will no longer be resumable. See Session Resumption for more
|
|
383
383
|
* information. Default: 300.
|
|
384
384
|
*/
|
|
385
|
-
sessionTimeout?: number;
|
|
385
|
+
sessionTimeout?: number | undefined;
|
|
386
386
|
/**
|
|
387
387
|
* 48-bytes of cryptographically strong pseudo-random data.
|
|
388
388
|
*/
|
|
389
|
-
ticketKeys?: Buffer;
|
|
389
|
+
ticketKeys?: Buffer | undefined;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
393
|
-
host?: string;
|
|
394
|
-
port?: number;
|
|
395
|
-
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
396
|
-
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
397
|
-
checkServerIdentity?: typeof checkServerIdentity;
|
|
398
|
-
servername?: string; // SNI TLS Extension
|
|
399
|
-
session?: Buffer;
|
|
400
|
-
minDHSize?: number;
|
|
401
|
-
lookup?: net.LookupFunction;
|
|
402
|
-
timeout?: number;
|
|
393
|
+
host?: string | undefined;
|
|
394
|
+
port?: number | undefined;
|
|
395
|
+
path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
396
|
+
socket?: net.Socket | undefined; // Establish secure connection on a given socket rather than creating a new socket
|
|
397
|
+
checkServerIdentity?: typeof checkServerIdentity | undefined;
|
|
398
|
+
servername?: string | undefined; // SNI TLS Extension
|
|
399
|
+
session?: Buffer | undefined;
|
|
400
|
+
minDHSize?: number | undefined;
|
|
401
|
+
lookup?: net.LookupFunction | undefined;
|
|
402
|
+
timeout?: number | undefined;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
class Server extends net.Server {
|
|
@@ -498,7 +498,7 @@ declare module 'tls' {
|
|
|
498
498
|
* the well-known CAs curated by Mozilla. Mozilla's CAs are completely
|
|
499
499
|
* replaced when CAs are explicitly specified using this option.
|
|
500
500
|
*/
|
|
501
|
-
ca?: string | Buffer | Array<string | Buffer
|
|
501
|
+
ca?: string | Buffer | Array<string | Buffer> | undefined;
|
|
502
502
|
/**
|
|
503
503
|
* Cert chains in PEM format. One cert chain should be provided per
|
|
504
504
|
* private key. Each cert chain should consist of the PEM formatted
|
|
@@ -510,29 +510,29 @@ declare module 'tls' {
|
|
|
510
510
|
* intermediate certificates are not provided, the peer will not be
|
|
511
511
|
* able to validate the certificate, and the handshake will fail.
|
|
512
512
|
*/
|
|
513
|
-
cert?: string | Buffer | Array<string | Buffer
|
|
513
|
+
cert?: string | Buffer | Array<string | Buffer> | undefined;
|
|
514
514
|
/**
|
|
515
515
|
* Colon-separated list of supported signature algorithms. The list
|
|
516
516
|
* can contain digest algorithms (SHA256, MD5 etc.), public key
|
|
517
517
|
* algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
|
|
518
518
|
* 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
|
|
519
519
|
*/
|
|
520
|
-
sigalgs?: string;
|
|
520
|
+
sigalgs?: string | undefined;
|
|
521
521
|
/**
|
|
522
522
|
* Cipher suite specification, replacing the default. For more
|
|
523
523
|
* information, see modifying the default cipher suite. Permitted
|
|
524
524
|
* ciphers can be obtained via tls.getCiphers(). Cipher names must be
|
|
525
525
|
* uppercased in order for OpenSSL to accept them.
|
|
526
526
|
*/
|
|
527
|
-
ciphers?: string;
|
|
527
|
+
ciphers?: string | undefined;
|
|
528
528
|
/**
|
|
529
529
|
* Name of an OpenSSL engine which can provide the client certificate.
|
|
530
530
|
*/
|
|
531
|
-
clientCertEngine?: string;
|
|
531
|
+
clientCertEngine?: string | undefined;
|
|
532
532
|
/**
|
|
533
533
|
* PEM formatted CRLs (Certificate Revocation Lists).
|
|
534
534
|
*/
|
|
535
|
-
crl?: string | Buffer | Array<string | Buffer
|
|
535
|
+
crl?: string | Buffer | Array<string | Buffer> | undefined;
|
|
536
536
|
/**
|
|
537
537
|
* Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
|
|
538
538
|
* openssl dhparam to create the parameters. The key length must be
|
|
@@ -541,7 +541,7 @@ declare module 'tls' {
|
|
|
541
541
|
* stronger security. If omitted or invalid, the parameters are
|
|
542
542
|
* silently discarded and DHE ciphers will not be available.
|
|
543
543
|
*/
|
|
544
|
-
dhparam?: string | Buffer;
|
|
544
|
+
dhparam?: string | Buffer | undefined;
|
|
545
545
|
/**
|
|
546
546
|
* A string describing a named curve or a colon separated list of curve
|
|
547
547
|
* NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
|
|
@@ -551,13 +551,13 @@ declare module 'tls' {
|
|
|
551
551
|
* name and description of each available elliptic curve. Default:
|
|
552
552
|
* tls.DEFAULT_ECDH_CURVE.
|
|
553
553
|
*/
|
|
554
|
-
ecdhCurve?: string;
|
|
554
|
+
ecdhCurve?: string | undefined;
|
|
555
555
|
/**
|
|
556
556
|
* Attempt to use the server's cipher suite preferences instead of the
|
|
557
557
|
* client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
|
|
558
558
|
* set in secureOptions
|
|
559
559
|
*/
|
|
560
|
-
honorCipherOrder?: boolean;
|
|
560
|
+
honorCipherOrder?: boolean | undefined;
|
|
561
561
|
/**
|
|
562
562
|
* Private keys in PEM format. PEM allows the option of private keys
|
|
563
563
|
* being encrypted. Encrypted keys will be decrypted with
|
|
@@ -568,18 +568,18 @@ declare module 'tls' {
|
|
|
568
568
|
* object.passphrase is optional. Encrypted keys will be decrypted with
|
|
569
569
|
* object.passphrase if provided, or options.passphrase if it is not.
|
|
570
570
|
*/
|
|
571
|
-
key?: string | Buffer | Array<Buffer | KeyObject
|
|
571
|
+
key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
|
|
572
572
|
/**
|
|
573
573
|
* Name of an OpenSSL engine to get private key from. Should be used
|
|
574
574
|
* together with privateKeyIdentifier.
|
|
575
575
|
*/
|
|
576
|
-
privateKeyEngine?: string;
|
|
576
|
+
privateKeyEngine?: string | undefined;
|
|
577
577
|
/**
|
|
578
578
|
* Identifier of a private key managed by an OpenSSL engine. Should be
|
|
579
579
|
* used together with privateKeyEngine. Should not be set together with
|
|
580
580
|
* key, because both options define a private key in different ways.
|
|
581
581
|
*/
|
|
582
|
-
privateKeyIdentifier?: string;
|
|
582
|
+
privateKeyIdentifier?: string | undefined;
|
|
583
583
|
/**
|
|
584
584
|
* Optionally set the maximum TLS version to allow. One
|
|
585
585
|
* of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
|
|
@@ -588,7 +588,7 @@ declare module 'tls' {
|
|
|
588
588
|
* `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
|
|
589
589
|
* `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
|
|
590
590
|
*/
|
|
591
|
-
maxVersion?: SecureVersion;
|
|
591
|
+
maxVersion?: SecureVersion | undefined;
|
|
592
592
|
/**
|
|
593
593
|
* Optionally set the minimum TLS version to allow. One
|
|
594
594
|
* of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
|
|
@@ -599,11 +599,11 @@ declare module 'tls' {
|
|
|
599
599
|
* `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
|
|
600
600
|
* 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
|
|
601
601
|
*/
|
|
602
|
-
minVersion?: SecureVersion;
|
|
602
|
+
minVersion?: SecureVersion | undefined;
|
|
603
603
|
/**
|
|
604
604
|
* Shared passphrase used for a single private key and/or a PFX.
|
|
605
605
|
*/
|
|
606
|
-
passphrase?: string;
|
|
606
|
+
passphrase?: string | undefined;
|
|
607
607
|
/**
|
|
608
608
|
* PFX or PKCS12 encoded private key and certificate chain. pfx is an
|
|
609
609
|
* alternative to providing key and cert individually. PFX is usually
|
|
@@ -614,13 +614,13 @@ declare module 'tls' {
|
|
|
614
614
|
* object.passphrase is optional. Encrypted PFX will be decrypted with
|
|
615
615
|
* object.passphrase if provided, or options.passphrase if it is not.
|
|
616
616
|
*/
|
|
617
|
-
pfx?: string | Buffer | Array<string | Buffer | PxfObject
|
|
617
|
+
pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
|
|
618
618
|
/**
|
|
619
619
|
* Optionally affect the OpenSSL protocol behavior, which is not
|
|
620
620
|
* usually necessary. This should be used carefully if at all! Value is
|
|
621
621
|
* a numeric bitmask of the SSL_OP_* options from OpenSSL Options
|
|
622
622
|
*/
|
|
623
|
-
secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options
|
|
623
|
+
secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
|
|
624
624
|
/**
|
|
625
625
|
* Legacy mechanism to select the TLS protocol version to use, it does
|
|
626
626
|
* not support independent control of the minimum and maximum version,
|
|
@@ -632,23 +632,23 @@ declare module 'tls' {
|
|
|
632
632
|
* TLS versions less than 1.2, but it may be required for
|
|
633
633
|
* interoperability. Default: none, see minVersion.
|
|
634
634
|
*/
|
|
635
|
-
secureProtocol?: string;
|
|
635
|
+
secureProtocol?: string | undefined;
|
|
636
636
|
/**
|
|
637
637
|
* Opaque identifier used by servers to ensure session state is not
|
|
638
638
|
* shared between applications. Unused by clients.
|
|
639
639
|
*/
|
|
640
|
-
sessionIdContext?: string;
|
|
640
|
+
sessionIdContext?: string | undefined;
|
|
641
641
|
/**
|
|
642
642
|
* 48-bytes of cryptographically strong pseudo-random data.
|
|
643
643
|
* See Session Resumption for more information.
|
|
644
644
|
*/
|
|
645
|
-
ticketKeys?: Buffer;
|
|
645
|
+
ticketKeys?: Buffer | undefined;
|
|
646
646
|
/**
|
|
647
647
|
* The number of seconds after which a TLS session created by the
|
|
648
648
|
* server will no longer be resumable. See Session Resumption for more
|
|
649
649
|
* information. Default: 300.
|
|
650
650
|
*/
|
|
651
|
-
sessionTimeout?: number;
|
|
651
|
+
sessionTimeout?: number | undefined;
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
interface SecureContext {
|
node v12.20/url.d.ts
CHANGED
|
@@ -3,18 +3,18 @@ declare module 'url' {
|
|
|
3
3
|
|
|
4
4
|
// Input to `url.format`
|
|
5
5
|
interface UrlObject {
|
|
6
|
-
auth?: string | null;
|
|
7
|
-
hash?: string | null;
|
|
8
|
-
host?: string | null;
|
|
9
|
-
hostname?: string | null;
|
|
10
|
-
href?: string | null;
|
|
11
|
-
path?: string | null;
|
|
12
|
-
pathname?: string | null;
|
|
13
|
-
protocol?: string | null;
|
|
14
|
-
search?: string | null;
|
|
15
|
-
slashes?: boolean | null;
|
|
16
|
-
port?: string | number | null;
|
|
17
|
-
query?: string | null | ParsedUrlQueryInput;
|
|
6
|
+
auth?: string | null | undefined;
|
|
7
|
+
hash?: string | null | undefined;
|
|
8
|
+
host?: string | null | undefined;
|
|
9
|
+
hostname?: string | null | undefined;
|
|
10
|
+
href?: string | null | undefined;
|
|
11
|
+
path?: string | null | undefined;
|
|
12
|
+
pathname?: string | null | undefined;
|
|
13
|
+
protocol?: string | null | undefined;
|
|
14
|
+
search?: string | null | undefined;
|
|
15
|
+
slashes?: boolean | null | undefined;
|
|
16
|
+
port?: string | number | null | undefined;
|
|
17
|
+
query?: string | null | ParsedUrlQueryInput | undefined;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// Output of `url.parse`
|
|
@@ -74,10 +74,10 @@ declare module 'url' {
|
|
|
74
74
|
function pathToFileURL(url: string): URL;
|
|
75
75
|
|
|
76
76
|
interface URLFormatOptions {
|
|
77
|
-
auth?: boolean;
|
|
78
|
-
fragment?: boolean;
|
|
79
|
-
search?: boolean;
|
|
80
|
-
unicode?: boolean;
|
|
77
|
+
auth?: boolean | undefined;
|
|
78
|
+
fragment?: boolean | undefined;
|
|
79
|
+
search?: boolean | undefined;
|
|
80
|
+
unicode?: boolean | undefined;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
class URL {
|
node v12.20/util.d.ts
CHANGED
|
@@ -172,11 +172,11 @@ declare module 'util' {
|
|
|
172
172
|
readonly ignoreBOM: boolean;
|
|
173
173
|
constructor(
|
|
174
174
|
encoding?: string,
|
|
175
|
-
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
|
175
|
+
options?: { fatal?: boolean | undefined; ignoreBOM?: boolean | undefined }
|
|
176
176
|
);
|
|
177
177
|
decode(
|
|
178
178
|
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
|
|
179
|
-
options?: { stream?: boolean }
|
|
179
|
+
options?: { stream?: boolean | undefined }
|
|
180
180
|
): string;
|
|
181
181
|
}
|
|
182
182
|
|
node v12.20/vm.d.ts
CHANGED
|
@@ -7,63 +7,63 @@ declare module 'vm' {
|
|
|
7
7
|
* Specifies the filename used in stack traces produced by this script.
|
|
8
8
|
* Default: `''`.
|
|
9
9
|
*/
|
|
10
|
-
filename?: string;
|
|
10
|
+
filename?: string | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* Specifies the line number offset that is displayed in stack traces produced by this script.
|
|
13
13
|
* Default: `0`.
|
|
14
14
|
*/
|
|
15
|
-
lineOffset?: number;
|
|
15
|
+
lineOffset?: number | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Specifies the column number offset that is displayed in stack traces produced by this script.
|
|
18
18
|
* @default 0
|
|
19
19
|
*/
|
|
20
|
-
columnOffset?: number;
|
|
20
|
+
columnOffset?: number | undefined;
|
|
21
21
|
}
|
|
22
22
|
interface ScriptOptions extends BaseOptions {
|
|
23
|
-
displayErrors?: boolean;
|
|
24
|
-
timeout?: number;
|
|
25
|
-
cachedData?: Buffer;
|
|
23
|
+
displayErrors?: boolean | undefined;
|
|
24
|
+
timeout?: number | undefined;
|
|
25
|
+
cachedData?: Buffer | undefined;
|
|
26
26
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
27
|
-
produceCachedData?: boolean;
|
|
27
|
+
produceCachedData?: boolean | undefined;
|
|
28
28
|
}
|
|
29
29
|
interface RunningScriptOptions extends BaseOptions {
|
|
30
30
|
/**
|
|
31
31
|
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
|
32
32
|
* Default: `true`.
|
|
33
33
|
*/
|
|
34
|
-
displayErrors?: boolean;
|
|
34
|
+
displayErrors?: boolean | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* Specifies the number of milliseconds to execute code before terminating execution.
|
|
37
37
|
* If execution is terminated, an `Error` will be thrown. This value must be a strictly positive integer.
|
|
38
38
|
*/
|
|
39
|
-
timeout?: number;
|
|
39
|
+
timeout?: number | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
|
42
42
|
* Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
|
|
43
43
|
* If execution is terminated, an `Error` will be thrown.
|
|
44
44
|
* Default: `false`.
|
|
45
45
|
*/
|
|
46
|
-
breakOnSigint?: boolean;
|
|
46
|
+
breakOnSigint?: boolean | undefined;
|
|
47
47
|
}
|
|
48
48
|
interface CompileFunctionOptions extends BaseOptions {
|
|
49
49
|
/**
|
|
50
50
|
* Provides an optional data with V8's code cache data for the supplied source.
|
|
51
51
|
*/
|
|
52
|
-
cachedData?: Buffer;
|
|
52
|
+
cachedData?: Buffer | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* Specifies whether to produce new cache data.
|
|
55
55
|
* Default: `false`,
|
|
56
56
|
*/
|
|
57
|
-
produceCachedData?: boolean;
|
|
57
|
+
produceCachedData?: boolean | undefined;
|
|
58
58
|
/**
|
|
59
59
|
* The sandbox/context in which the said function should be compiled in.
|
|
60
60
|
*/
|
|
61
|
-
parsingContext?: Context;
|
|
61
|
+
parsingContext?: Context | undefined;
|
|
62
62
|
|
|
63
63
|
/**
|
|
64
64
|
* An array containing a collection of context extensions (objects wrapping the current scope) to be applied while compiling
|
|
65
65
|
*/
|
|
66
|
-
contextExtensions?: Object[];
|
|
66
|
+
contextExtensions?: Object[] | undefined;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
interface CreateContextOptions {
|
|
@@ -71,7 +71,7 @@ declare module 'vm' {
|
|
|
71
71
|
* Human-readable name of the newly created context.
|
|
72
72
|
* @default 'VM Context i' Where i is an ascending numerical index of the created context.
|
|
73
73
|
*/
|
|
74
|
-
name?: string;
|
|
74
|
+
name?: string | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Corresponds to the newly created context for display purposes.
|
|
77
77
|
* The origin should be formatted like a `URL`, but with only the scheme, host, and port (if necessary),
|
|
@@ -79,20 +79,20 @@ declare module 'vm' {
|
|
|
79
79
|
* Most notably, this string should omit the trailing slash, as that denotes a path.
|
|
80
80
|
* @default ''
|
|
81
81
|
*/
|
|
82
|
-
origin?: string;
|
|
82
|
+
origin?: string | undefined;
|
|
83
83
|
codeGeneration?: {
|
|
84
84
|
/**
|
|
85
85
|
* If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
|
|
86
86
|
* will throw an EvalError.
|
|
87
87
|
* @default true
|
|
88
88
|
*/
|
|
89
|
-
strings?: boolean;
|
|
89
|
+
strings?: boolean | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
|
|
92
92
|
* @default true
|
|
93
93
|
*/
|
|
94
|
-
wasm?: boolean;
|
|
95
|
-
};
|
|
94
|
+
wasm?: boolean | undefined;
|
|
95
|
+
} | undefined;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
class Script {
|
|
@@ -101,7 +101,7 @@ declare module 'vm' {
|
|
|
101
101
|
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
|
|
102
102
|
runInThisContext(options?: RunningScriptOptions): any;
|
|
103
103
|
createCachedData(): Buffer;
|
|
104
|
-
cachedDataRejected?: boolean;
|
|
104
|
+
cachedDataRejected?: boolean | undefined;
|
|
105
105
|
}
|
|
106
106
|
function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
|
|
107
107
|
function isContext(sandbox: Context): boolean;
|
node v12.20/wasi.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ declare module 'wasi' {
|
|
|
5
5
|
* see as command line arguments. The first argument is the virtual path to the
|
|
6
6
|
* WASI command itself.
|
|
7
7
|
*/
|
|
8
|
-
args?: string[];
|
|
8
|
+
args?: string[] | undefined;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* An object similar to `process.env` that the WebAssembly
|
|
12
12
|
* application will see as its environment.
|
|
13
13
|
*/
|
|
14
|
-
env?: object;
|
|
14
|
+
env?: object | undefined;
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* This object represents the WebAssembly application's
|
|
@@ -19,7 +19,7 @@ declare module 'wasi' {
|
|
|
19
19
|
* directories within the sandbox. The corresponding values in `preopens` are
|
|
20
20
|
* the real paths to those directories on the host machine.
|
|
21
21
|
*/
|
|
22
|
-
preopens?: NodeJS.Dict<string
|
|
22
|
+
preopens?: NodeJS.Dict<string> | undefined;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* By default, WASI applications terminate the Node.js
|
|
@@ -28,7 +28,7 @@ declare module 'wasi' {
|
|
|
28
28
|
* process.
|
|
29
29
|
* @default false
|
|
30
30
|
*/
|
|
31
|
-
returnOnExit?: boolean;
|
|
31
|
+
returnOnExit?: boolean | undefined;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
class WASI {
|
node v12.20/worker_threads.d.ts
CHANGED
|
@@ -59,39 +59,39 @@ declare module 'worker_threads' {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
interface WorkerOptions {
|
|
62
|
-
eval?: boolean;
|
|
63
|
-
env?: NodeJS.ProcessEnv | typeof SHARE_ENV;
|
|
62
|
+
eval?: boolean | undefined;
|
|
63
|
+
env?: NodeJS.ProcessEnv | typeof SHARE_ENV | undefined;
|
|
64
64
|
workerData?: any;
|
|
65
|
-
stdin?: boolean;
|
|
66
|
-
stdout?: boolean;
|
|
67
|
-
stderr?: boolean;
|
|
68
|
-
execArgv?: string[];
|
|
69
|
-
resourceLimits?: ResourceLimits;
|
|
65
|
+
stdin?: boolean | undefined;
|
|
66
|
+
stdout?: boolean | undefined;
|
|
67
|
+
stderr?: boolean | undefined;
|
|
68
|
+
execArgv?: string[] | undefined;
|
|
69
|
+
resourceLimits?: ResourceLimits | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* Additional data to send in the first worker message.
|
|
72
72
|
*/
|
|
73
|
-
transferList?: TransferListItem[];
|
|
74
|
-
trackUnmanagedFds?: boolean;
|
|
73
|
+
transferList?: TransferListItem[] | undefined;
|
|
74
|
+
trackUnmanagedFds?: boolean | undefined;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
interface ResourceLimits {
|
|
78
78
|
/**
|
|
79
79
|
* The maximum size of a heap space for recently created objects.
|
|
80
80
|
*/
|
|
81
|
-
maxYoungGenerationSizeMb?: number;
|
|
81
|
+
maxYoungGenerationSizeMb?: number | undefined;
|
|
82
82
|
/**
|
|
83
83
|
* The maximum size of the main heap in MB.
|
|
84
84
|
*/
|
|
85
|
-
maxOldGenerationSizeMb?: number;
|
|
85
|
+
maxOldGenerationSizeMb?: number | undefined;
|
|
86
86
|
/**
|
|
87
87
|
* The size of a pre-allocated memory range used for generated code.
|
|
88
88
|
*/
|
|
89
|
-
codeRangeSizeMb?: number;
|
|
89
|
+
codeRangeSizeMb?: number | undefined;
|
|
90
90
|
/**
|
|
91
91
|
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
92
92
|
* @default 4
|
|
93
93
|
*/
|
|
94
|
-
stackSizeMb?: number;
|
|
94
|
+
stackSizeMb?: number | undefined;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
class Worker extends EventEmitter {
|
|
@@ -99,7 +99,7 @@ declare module 'worker_threads' {
|
|
|
99
99
|
readonly stdout: Readable;
|
|
100
100
|
readonly stderr: Readable;
|
|
101
101
|
readonly threadId: number;
|
|
102
|
-
readonly resourceLimits?: ResourceLimits;
|
|
102
|
+
readonly resourceLimits?: ResourceLimits | undefined;
|
|
103
103
|
|
|
104
104
|
constructor(filename: string, options?: WorkerOptions);
|
|
105
105
|
|
node v12.20/zlib.d.ts
CHANGED
|
@@ -5,51 +5,51 @@ declare module 'zlib' {
|
|
|
5
5
|
/**
|
|
6
6
|
* @default constants.Z_NO_FLUSH
|
|
7
7
|
*/
|
|
8
|
-
flush?: number;
|
|
8
|
+
flush?: number | undefined;
|
|
9
9
|
/**
|
|
10
10
|
* @default constants.Z_FINISH
|
|
11
11
|
*/
|
|
12
|
-
finishFlush?: number;
|
|
12
|
+
finishFlush?: number | undefined;
|
|
13
13
|
/**
|
|
14
14
|
* @default 16*1024
|
|
15
15
|
*/
|
|
16
|
-
chunkSize?: number;
|
|
17
|
-
windowBits?: number;
|
|
18
|
-
level?: number; // compression only
|
|
19
|
-
memLevel?: number; // compression only
|
|
20
|
-
strategy?: number; // compression only
|
|
21
|
-
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
|
|
22
|
-
info?: boolean;
|
|
23
|
-
maxOutputLength?: number;
|
|
16
|
+
chunkSize?: number | undefined;
|
|
17
|
+
windowBits?: number | undefined;
|
|
18
|
+
level?: number | undefined; // compression only
|
|
19
|
+
memLevel?: number | undefined; // compression only
|
|
20
|
+
strategy?: number | undefined; // compression only
|
|
21
|
+
dictionary?: NodeJS.ArrayBufferView | ArrayBuffer | undefined; // deflate/inflate only, empty dictionary by default
|
|
22
|
+
info?: boolean | undefined;
|
|
23
|
+
maxOutputLength?: number | undefined;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
interface BrotliOptions {
|
|
27
27
|
/**
|
|
28
28
|
* @default constants.BROTLI_OPERATION_PROCESS
|
|
29
29
|
*/
|
|
30
|
-
flush?: number;
|
|
30
|
+
flush?: number | undefined;
|
|
31
31
|
/**
|
|
32
32
|
* @default constants.BROTLI_OPERATION_FINISH
|
|
33
33
|
*/
|
|
34
|
-
finishFlush?: number;
|
|
34
|
+
finishFlush?: number | undefined;
|
|
35
35
|
/**
|
|
36
36
|
* @default 16*1024
|
|
37
37
|
*/
|
|
38
|
-
chunkSize?: number;
|
|
38
|
+
chunkSize?: number | undefined;
|
|
39
39
|
params?: {
|
|
40
40
|
/**
|
|
41
41
|
* Each key is a `constants.BROTLI_*` constant.
|
|
42
42
|
*/
|
|
43
43
|
[key: number]: boolean | number;
|
|
44
|
-
};
|
|
45
|
-
maxOutputLength?: number;
|
|
44
|
+
} | undefined;
|
|
45
|
+
maxOutputLength?: number | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
interface Zlib {
|
|
49
49
|
/** @deprecated Use bytesWritten instead. */
|
|
50
50
|
readonly bytesRead: number;
|
|
51
51
|
readonly bytesWritten: number;
|
|
52
|
-
shell?: boolean | string;
|
|
52
|
+
shell?: boolean | string | undefined;
|
|
53
53
|
close(callback?: () => void): void;
|
|
54
54
|
flush(kind?: number, callback?: () => void): void;
|
|
55
55
|
flush(callback?: () => void): void;
|