@types/node 15.14.7 → 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 v15.14 → node}/LICENSE +0 -0
- node v15.14/README.md → node/README.md +3 -3
- node/assert/strict.d.ts +9 -0
- node v15.14/assert.d.ts → node/assert.d.ts +35 -30
- node v15.14/async_hooks.d.ts → node/async_hooks.d.ts +7 -3
- {node v15.14 → node}/base.d.ts +0 -0
- node/buffer.d.ts +357 -0
- node v15.14/child_process.d.ts → node/child_process.d.ts +54 -50
- node v15.14/cluster.d.ts → node/cluster.d.ts +33 -108
- node v15.14/console.d.ts → node/console.d.ts +24 -23
- node v15.14/constants.d.ts → node/constants.d.ts +5 -0
- node v15.14/crypto.d.ts → node/crypto.d.ts +82 -67
- node v15.14/dgram.d.ts → node/dgram.d.ts +13 -9
- node v15.14/diagnostic_channel.d.ts → node/diagnostic_channel.d.ts +4 -0
- node v15.14/dns/promises.d.ts → node/dns/promises.d.ts +4 -0
- node v15.14/dns.d.ts → node/dns.d.ts +15 -11
- node/domain.d.ts +25 -0
- node v15.14/events.d.ts → node/events.d.ts +8 -3
- node v15.14/fs/promises.d.ts → node/fs/promises.d.ts +25 -17
- node v15.14/fs.d.ts → node/fs.d.ts +71 -75
- node/globals.d.ts +274 -0
- node/globals.global.d.ts +1 -0
- node v15.14/http.d.ts → node/http.d.ts +109 -167
- node v15.14/http2.d.ts → node/http2.d.ts +69 -66
- node/https.d.ts +40 -0
- node v15.14/index.d.ts → node/index.d.ts +1 -1
- node v15.14/inspector.d.ts → node/inspector.d.ts +152 -470
- node v15.14/module.d.ts → node/module.d.ts +25 -4
- node v15.14/net.d.ts → node/net.d.ts +34 -36
- node v15.14/os.d.ts → node/os.d.ts +4 -0
- node v15.14/package.json → node/package.json +2 -2
- node v15.14/path.d.ts → node/path.d.ts +10 -5
- node v15.14/perf_hooks.d.ts → node/perf_hooks.d.ts +70 -23
- node v15.14/process.d.ts → node/process.d.ts +54 -51
- node v15.14/punycode.d.ts → node/punycode.d.ts +4 -0
- node v15.14/querystring.d.ts → node/querystring.d.ts +7 -3
- node v15.14/readline.d.ts → node/readline.d.ts +20 -16
- node v15.14/repl.d.ts → node/repl.d.ts +18 -14
- node v15.14/stream/promises.d.ts → node/stream/promises.d.ts +4 -0
- node v15.14/stream.d.ts → node/stream.d.ts +22 -17
- node v15.14/string_decoder.d.ts → node/string_decoder.d.ts +4 -0
- node v15.14/timers/promises.d.ts → node/timers/promises.d.ts +4 -0
- node/timers.d.ts +92 -0
- node v15.14/tls.d.ts → node/tls.d.ts +54 -50
- node v15.14/trace_events.d.ts → node/trace_events.d.ts +4 -0
- node v15.14/ts3.6/assert.d.ts → node/ts3.6/assert.d.ts +26 -26
- {node v15.14 → node}/ts3.6/base.d.ts +0 -0
- {node v15.14 → node}/ts3.6/index.d.ts +0 -0
- node v15.14/tty.d.ts → node/tty.d.ts +4 -0
- node v15.14/url.d.ts → node/url.d.ts +19 -15
- node/util/types.d.ts +57 -0
- node v15.14/util.d.ts → node/util.d.ts +67 -21
- node v15.14/v8.d.ts → node/v8.d.ts +4 -0
- node v15.14/vm.d.ts → node/vm.d.ts +28 -24
- node v15.14/wasi.d.ts → node/wasi.d.ts +11 -7
- node v15.14/worker_threads.d.ts → node/worker_threads.d.ts +19 -15
- node v15.14/zlib.d.ts → node/zlib.d.ts +20 -16
- node v15.14/assert/strict.d.ts +0 -4
- node v15.14/buffer.d.ts +0 -112
- node v15.14/domain.d.ts +0 -24
- node v15.14/globals.d.ts +0 -659
- node v15.14/globals.global.d.ts +0 -1
- node v15.14/https.d.ts +0 -139
- node v15.14/timers.d.ts +0 -27
- node v15.14/util/types.d.ts +0 -53
|
@@ -76,7 +76,7 @@ declare module 'tls' {
|
|
|
76
76
|
/**
|
|
77
77
|
* The name property is available only when type is 'ECDH'.
|
|
78
78
|
*/
|
|
79
|
-
name?: string;
|
|
79
|
+
name?: string | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* The size of parameter of an ephemeral key exchange.
|
|
82
82
|
*/
|
|
@@ -91,7 +91,7 @@ declare module 'tls' {
|
|
|
91
91
|
/**
|
|
92
92
|
* Optional passphrase.
|
|
93
93
|
*/
|
|
94
|
-
passphrase?: string;
|
|
94
|
+
passphrase?: string | undefined;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
interface PxfObject {
|
|
@@ -102,7 +102,7 @@ declare module 'tls' {
|
|
|
102
102
|
/**
|
|
103
103
|
* Optional passphrase.
|
|
104
104
|
*/
|
|
105
|
-
passphrase?: string;
|
|
105
|
+
passphrase?: string | undefined;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
interface TLSSocketOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
@@ -110,22 +110,22 @@ declare module 'tls' {
|
|
|
110
110
|
* If true the TLS socket will be instantiated in server-mode.
|
|
111
111
|
* Defaults to false.
|
|
112
112
|
*/
|
|
113
|
-
isServer?: boolean;
|
|
113
|
+
isServer?: boolean | undefined;
|
|
114
114
|
/**
|
|
115
115
|
* An optional net.Server instance.
|
|
116
116
|
*/
|
|
117
|
-
server?: net.Server;
|
|
117
|
+
server?: net.Server | undefined;
|
|
118
118
|
|
|
119
119
|
/**
|
|
120
120
|
* An optional Buffer instance containing a TLS session.
|
|
121
121
|
*/
|
|
122
|
-
session?: Buffer;
|
|
122
|
+
session?: Buffer | undefined;
|
|
123
123
|
/**
|
|
124
124
|
* If true, specifies that the OCSP status request extension will be
|
|
125
125
|
* added to the client hello and an 'OCSPResponse' event will be
|
|
126
126
|
* emitted on the socket before establishing a secure communication
|
|
127
127
|
*/
|
|
128
|
-
requestOCSP?: boolean;
|
|
128
|
+
requestOCSP?: boolean | undefined;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
class TLSSocket extends net.Socket {
|
|
@@ -153,7 +153,7 @@ declare module 'tls' {
|
|
|
153
153
|
* String containing the selected ALPN protocol.
|
|
154
154
|
* When ALPN has no selected protocol, tlsSocket.alpnProtocol equals false.
|
|
155
155
|
*/
|
|
156
|
-
alpnProtocol?: string;
|
|
156
|
+
alpnProtocol?: string | undefined;
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
159
|
* Returns an object representing the local certificate. The returned
|
|
@@ -265,7 +265,7 @@ declare module 'tls' {
|
|
|
265
265
|
* is successfully completed.
|
|
266
266
|
* @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
|
|
267
267
|
*/
|
|
268
|
-
renegotiate(options: { rejectUnauthorized?: boolean, requestCert?: boolean }, callback: (err: Error | null) => void): undefined | boolean;
|
|
268
|
+
renegotiate(options: { rejectUnauthorized?: boolean | undefined, requestCert?: boolean | undefined }, callback: (err: Error | null) => void): undefined | boolean;
|
|
269
269
|
/**
|
|
270
270
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
271
271
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -355,25 +355,25 @@ declare module 'tls' {
|
|
|
355
355
|
/**
|
|
356
356
|
* An optional TLS context object from tls.createSecureContext()
|
|
357
357
|
*/
|
|
358
|
-
secureContext?: SecureContext;
|
|
358
|
+
secureContext?: SecureContext | undefined;
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* When enabled, TLS packet trace information is written to `stderr`. This can be
|
|
362
362
|
* used to debug TLS connection problems.
|
|
363
363
|
* @default false
|
|
364
364
|
*/
|
|
365
|
-
enableTrace?: boolean;
|
|
365
|
+
enableTrace?: boolean | undefined;
|
|
366
366
|
/**
|
|
367
367
|
* If true the server will request a certificate from clients that
|
|
368
368
|
* connect and attempt to verify that certificate. Defaults to
|
|
369
369
|
* false.
|
|
370
370
|
*/
|
|
371
|
-
requestCert?: boolean;
|
|
371
|
+
requestCert?: boolean | undefined;
|
|
372
372
|
/**
|
|
373
373
|
* An array of strings or a Buffer naming possible ALPN protocols.
|
|
374
374
|
* (Protocols should be ordered by their priority.)
|
|
375
375
|
*/
|
|
376
|
-
ALPNProtocols?: string[] | Uint8Array[] | Uint8Array;
|
|
376
|
+
ALPNProtocols?: string[] | Uint8Array[] | Uint8Array | undefined;
|
|
377
377
|
/**
|
|
378
378
|
* SNICallback(servername, cb) <Function> A function that will be
|
|
379
379
|
* called if the client supports SNI TLS extension. Two arguments
|
|
@@ -383,14 +383,14 @@ declare module 'tls' {
|
|
|
383
383
|
* SecureContext.) If SNICallback wasn't provided the default callback
|
|
384
384
|
* with high-level API will be used (see below).
|
|
385
385
|
*/
|
|
386
|
-
SNICallback?: (servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void;
|
|
386
|
+
SNICallback?: ((servername: string, cb: (err: Error | null, ctx: SecureContext) => void) => void) | undefined;
|
|
387
387
|
/**
|
|
388
388
|
* If true the server will reject any connection which is not
|
|
389
389
|
* authorized with the list of supplied CAs. This option only has an
|
|
390
390
|
* effect if requestCert is true.
|
|
391
391
|
* @default true
|
|
392
392
|
*/
|
|
393
|
-
rejectUnauthorized?: boolean;
|
|
393
|
+
rejectUnauthorized?: boolean | undefined;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
|
|
@@ -400,17 +400,17 @@ declare module 'tls' {
|
|
|
400
400
|
* the tls.Server object whenever a handshake times out. Default:
|
|
401
401
|
* 120000 (120 seconds).
|
|
402
402
|
*/
|
|
403
|
-
handshakeTimeout?: number;
|
|
403
|
+
handshakeTimeout?: number | undefined;
|
|
404
404
|
/**
|
|
405
405
|
* The number of seconds after which a TLS session created by the
|
|
406
406
|
* server will no longer be resumable. See Session Resumption for more
|
|
407
407
|
* information. Default: 300.
|
|
408
408
|
*/
|
|
409
|
-
sessionTimeout?: number;
|
|
409
|
+
sessionTimeout?: number | undefined;
|
|
410
410
|
/**
|
|
411
411
|
* 48-bytes of cryptographically strong pseudo-random data.
|
|
412
412
|
*/
|
|
413
|
-
ticketKeys?: Buffer;
|
|
413
|
+
ticketKeys?: Buffer | undefined;
|
|
414
414
|
|
|
415
415
|
/**
|
|
416
416
|
*
|
|
@@ -439,7 +439,7 @@ declare module 'tls' {
|
|
|
439
439
|
* in TLS 1.3. Upon failing to set pskIdentityHint `tlsClientError` will be
|
|
440
440
|
* emitted with `ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED` code.
|
|
441
441
|
*/
|
|
442
|
-
pskIdentityHint?: string;
|
|
442
|
+
pskIdentityHint?: string | undefined;
|
|
443
443
|
}
|
|
444
444
|
|
|
445
445
|
interface PSKCallbackNegotation {
|
|
@@ -448,16 +448,16 @@ declare module 'tls' {
|
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
interface ConnectionOptions extends SecureContextOptions, CommonConnectionOptions {
|
|
451
|
-
host?: string;
|
|
452
|
-
port?: number;
|
|
453
|
-
path?: string; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
454
|
-
socket?: net.Socket; // Establish secure connection on a given socket rather than creating a new socket
|
|
455
|
-
checkServerIdentity?: typeof checkServerIdentity;
|
|
456
|
-
servername?: string; // SNI TLS Extension
|
|
457
|
-
session?: Buffer;
|
|
458
|
-
minDHSize?: number;
|
|
459
|
-
lookup?: net.LookupFunction;
|
|
460
|
-
timeout?: number;
|
|
451
|
+
host?: string | undefined;
|
|
452
|
+
port?: number | undefined;
|
|
453
|
+
path?: string | undefined; // Creates unix socket connection to path. If this option is specified, `host` and `port` are ignored.
|
|
454
|
+
socket?: net.Socket | undefined; // Establish secure connection on a given socket rather than creating a new socket
|
|
455
|
+
checkServerIdentity?: typeof checkServerIdentity | undefined;
|
|
456
|
+
servername?: string | undefined; // SNI TLS Extension
|
|
457
|
+
session?: Buffer | undefined;
|
|
458
|
+
minDHSize?: number | undefined;
|
|
459
|
+
lookup?: net.LookupFunction | undefined;
|
|
460
|
+
timeout?: number | undefined;
|
|
461
461
|
/**
|
|
462
462
|
* When negotiating TLS-PSK (pre-shared keys), this function is called
|
|
463
463
|
* with optional identity `hint` provided by the server or `null`
|
|
@@ -580,7 +580,7 @@ declare module 'tls' {
|
|
|
580
580
|
* the well-known CAs curated by Mozilla. Mozilla's CAs are completely
|
|
581
581
|
* replaced when CAs are explicitly specified using this option.
|
|
582
582
|
*/
|
|
583
|
-
ca?: string | Buffer | Array<string | Buffer
|
|
583
|
+
ca?: string | Buffer | Array<string | Buffer> | undefined;
|
|
584
584
|
/**
|
|
585
585
|
* Cert chains in PEM format. One cert chain should be provided per
|
|
586
586
|
* private key. Each cert chain should consist of the PEM formatted
|
|
@@ -592,29 +592,29 @@ declare module 'tls' {
|
|
|
592
592
|
* intermediate certificates are not provided, the peer will not be
|
|
593
593
|
* able to validate the certificate, and the handshake will fail.
|
|
594
594
|
*/
|
|
595
|
-
cert?: string | Buffer | Array<string | Buffer
|
|
595
|
+
cert?: string | Buffer | Array<string | Buffer> | undefined;
|
|
596
596
|
/**
|
|
597
597
|
* Colon-separated list of supported signature algorithms. The list
|
|
598
598
|
* can contain digest algorithms (SHA256, MD5 etc.), public key
|
|
599
599
|
* algorithms (RSA-PSS, ECDSA etc.), combination of both (e.g
|
|
600
600
|
* 'RSA+SHA384') or TLS v1.3 scheme names (e.g. rsa_pss_pss_sha512).
|
|
601
601
|
*/
|
|
602
|
-
sigalgs?: string;
|
|
602
|
+
sigalgs?: string | undefined;
|
|
603
603
|
/**
|
|
604
604
|
* Cipher suite specification, replacing the default. For more
|
|
605
605
|
* information, see modifying the default cipher suite. Permitted
|
|
606
606
|
* ciphers can be obtained via tls.getCiphers(). Cipher names must be
|
|
607
607
|
* uppercased in order for OpenSSL to accept them.
|
|
608
608
|
*/
|
|
609
|
-
ciphers?: string;
|
|
609
|
+
ciphers?: string | undefined;
|
|
610
610
|
/**
|
|
611
611
|
* Name of an OpenSSL engine which can provide the client certificate.
|
|
612
612
|
*/
|
|
613
|
-
clientCertEngine?: string;
|
|
613
|
+
clientCertEngine?: string | undefined;
|
|
614
614
|
/**
|
|
615
615
|
* PEM formatted CRLs (Certificate Revocation Lists).
|
|
616
616
|
*/
|
|
617
|
-
crl?: string | Buffer | Array<string | Buffer
|
|
617
|
+
crl?: string | Buffer | Array<string | Buffer> | undefined;
|
|
618
618
|
/**
|
|
619
619
|
* Diffie Hellman parameters, required for Perfect Forward Secrecy. Use
|
|
620
620
|
* openssl dhparam to create the parameters. The key length must be
|
|
@@ -623,7 +623,7 @@ declare module 'tls' {
|
|
|
623
623
|
* stronger security. If omitted or invalid, the parameters are
|
|
624
624
|
* silently discarded and DHE ciphers will not be available.
|
|
625
625
|
*/
|
|
626
|
-
dhparam?: string | Buffer;
|
|
626
|
+
dhparam?: string | Buffer | undefined;
|
|
627
627
|
/**
|
|
628
628
|
* A string describing a named curve or a colon separated list of curve
|
|
629
629
|
* NIDs or names, for example P-521:P-384:P-256, to use for ECDH key
|
|
@@ -633,13 +633,13 @@ declare module 'tls' {
|
|
|
633
633
|
* name and description of each available elliptic curve. Default:
|
|
634
634
|
* tls.DEFAULT_ECDH_CURVE.
|
|
635
635
|
*/
|
|
636
|
-
ecdhCurve?: string;
|
|
636
|
+
ecdhCurve?: string | undefined;
|
|
637
637
|
/**
|
|
638
638
|
* Attempt to use the server's cipher suite preferences instead of the
|
|
639
639
|
* client's. When true, causes SSL_OP_CIPHER_SERVER_PREFERENCE to be
|
|
640
640
|
* set in secureOptions
|
|
641
641
|
*/
|
|
642
|
-
honorCipherOrder?: boolean;
|
|
642
|
+
honorCipherOrder?: boolean | undefined;
|
|
643
643
|
/**
|
|
644
644
|
* Private keys in PEM format. PEM allows the option of private keys
|
|
645
645
|
* being encrypted. Encrypted keys will be decrypted with
|
|
@@ -650,18 +650,18 @@ declare module 'tls' {
|
|
|
650
650
|
* object.passphrase is optional. Encrypted keys will be decrypted with
|
|
651
651
|
* object.passphrase if provided, or options.passphrase if it is not.
|
|
652
652
|
*/
|
|
653
|
-
key?: string | Buffer | Array<Buffer | KeyObject
|
|
653
|
+
key?: string | Buffer | Array<Buffer | KeyObject> | undefined;
|
|
654
654
|
/**
|
|
655
655
|
* Name of an OpenSSL engine to get private key from. Should be used
|
|
656
656
|
* together with privateKeyIdentifier.
|
|
657
657
|
*/
|
|
658
|
-
privateKeyEngine?: string;
|
|
658
|
+
privateKeyEngine?: string | undefined;
|
|
659
659
|
/**
|
|
660
660
|
* Identifier of a private key managed by an OpenSSL engine. Should be
|
|
661
661
|
* used together with privateKeyEngine. Should not be set together with
|
|
662
662
|
* key, because both options define a private key in different ways.
|
|
663
663
|
*/
|
|
664
|
-
privateKeyIdentifier?: string;
|
|
664
|
+
privateKeyIdentifier?: string | undefined;
|
|
665
665
|
/**
|
|
666
666
|
* Optionally set the maximum TLS version to allow. One
|
|
667
667
|
* of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
|
|
@@ -670,7 +670,7 @@ declare module 'tls' {
|
|
|
670
670
|
* `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
|
|
671
671
|
* `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
|
|
672
672
|
*/
|
|
673
|
-
maxVersion?: SecureVersion;
|
|
673
|
+
maxVersion?: SecureVersion | undefined;
|
|
674
674
|
/**
|
|
675
675
|
* Optionally set the minimum TLS version to allow. One
|
|
676
676
|
* of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
|
|
@@ -681,11 +681,11 @@ declare module 'tls' {
|
|
|
681
681
|
* `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
|
|
682
682
|
* 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
|
|
683
683
|
*/
|
|
684
|
-
minVersion?: SecureVersion;
|
|
684
|
+
minVersion?: SecureVersion | undefined;
|
|
685
685
|
/**
|
|
686
686
|
* Shared passphrase used for a single private key and/or a PFX.
|
|
687
687
|
*/
|
|
688
|
-
passphrase?: string;
|
|
688
|
+
passphrase?: string | undefined;
|
|
689
689
|
/**
|
|
690
690
|
* PFX or PKCS12 encoded private key and certificate chain. pfx is an
|
|
691
691
|
* alternative to providing key and cert individually. PFX is usually
|
|
@@ -696,13 +696,13 @@ declare module 'tls' {
|
|
|
696
696
|
* object.passphrase is optional. Encrypted PFX will be decrypted with
|
|
697
697
|
* object.passphrase if provided, or options.passphrase if it is not.
|
|
698
698
|
*/
|
|
699
|
-
pfx?: string | Buffer | Array<string | Buffer | PxfObject
|
|
699
|
+
pfx?: string | Buffer | Array<string | Buffer | PxfObject> | undefined;
|
|
700
700
|
/**
|
|
701
701
|
* Optionally affect the OpenSSL protocol behavior, which is not
|
|
702
702
|
* usually necessary. This should be used carefully if at all! Value is
|
|
703
703
|
* a numeric bitmask of the SSL_OP_* options from OpenSSL Options
|
|
704
704
|
*/
|
|
705
|
-
secureOptions?: number; // Value is a numeric bitmask of the `SSL_OP_*` options
|
|
705
|
+
secureOptions?: number | undefined; // Value is a numeric bitmask of the `SSL_OP_*` options
|
|
706
706
|
/**
|
|
707
707
|
* Legacy mechanism to select the TLS protocol version to use, it does
|
|
708
708
|
* not support independent control of the minimum and maximum version,
|
|
@@ -714,23 +714,23 @@ declare module 'tls' {
|
|
|
714
714
|
* TLS versions less than 1.2, but it may be required for
|
|
715
715
|
* interoperability. Default: none, see minVersion.
|
|
716
716
|
*/
|
|
717
|
-
secureProtocol?: string;
|
|
717
|
+
secureProtocol?: string | undefined;
|
|
718
718
|
/**
|
|
719
719
|
* Opaque identifier used by servers to ensure session state is not
|
|
720
720
|
* shared between applications. Unused by clients.
|
|
721
721
|
*/
|
|
722
|
-
sessionIdContext?: string;
|
|
722
|
+
sessionIdContext?: string | undefined;
|
|
723
723
|
/**
|
|
724
724
|
* 48-bytes of cryptographically strong pseudo-random data.
|
|
725
725
|
* See Session Resumption for more information.
|
|
726
726
|
*/
|
|
727
|
-
ticketKeys?: Buffer;
|
|
727
|
+
ticketKeys?: Buffer | undefined;
|
|
728
728
|
/**
|
|
729
729
|
* The number of seconds after which a TLS session created by the
|
|
730
730
|
* server will no longer be resumable. See Session Resumption for more
|
|
731
731
|
* information. Default: 300.
|
|
732
732
|
*/
|
|
733
|
-
sessionTimeout?: number;
|
|
733
|
+
sessionTimeout?: number | undefined;
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
interface SecureContext {
|
|
@@ -791,3 +791,7 @@ declare module 'tls' {
|
|
|
791
791
|
*/
|
|
792
792
|
const rootCertificates: ReadonlyArray<string>;
|
|
793
793
|
}
|
|
794
|
+
|
|
795
|
+
declare module 'node:tls' {
|
|
796
|
+
export * from 'tls';
|
|
797
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
declare module 'assert' {
|
|
2
2
|
/** An alias of `assert.ok()`. */
|
|
3
|
-
function assert(value:
|
|
3
|
+
function assert(value: unknown, message?: string | Error): void;
|
|
4
4
|
namespace assert {
|
|
5
5
|
class AssertionError extends Error {
|
|
6
|
-
actual:
|
|
7
|
-
expected:
|
|
6
|
+
actual: unknown;
|
|
7
|
+
expected: unknown;
|
|
8
8
|
operator: string;
|
|
9
9
|
generatedMessage: boolean;
|
|
10
10
|
code: 'ERR_ASSERTION';
|
|
@@ -13,9 +13,9 @@ declare module 'assert' {
|
|
|
13
13
|
/** If provided, the error message is set to this value. */
|
|
14
14
|
message?: string;
|
|
15
15
|
/** The `actual` property on the error instance. */
|
|
16
|
-
actual?:
|
|
16
|
+
actual?: unknown;
|
|
17
17
|
/** The `expected` property on the error instance. */
|
|
18
|
-
expected?:
|
|
18
|
+
expected?: unknown;
|
|
19
19
|
/** The `operator` property on the error instance. */
|
|
20
20
|
operator?: string;
|
|
21
21
|
/** If provided, the generated stack trace omits frames before this function. */
|
|
@@ -42,48 +42,48 @@ declare module 'assert' {
|
|
|
42
42
|
stack: object;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
type AssertPredicate = RegExp | (new () => object) | ((thrown:
|
|
45
|
+
type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
|
|
46
46
|
|
|
47
47
|
function fail(message?: string | Error): never;
|
|
48
48
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
49
49
|
function fail(
|
|
50
|
-
actual:
|
|
51
|
-
expected:
|
|
50
|
+
actual: unknown,
|
|
51
|
+
expected: unknown,
|
|
52
52
|
message?: string | Error,
|
|
53
53
|
operator?: string,
|
|
54
54
|
// tslint:disable-next-line:ban-types
|
|
55
55
|
stackStartFn?: Function,
|
|
56
56
|
): never;
|
|
57
|
-
function ok(value:
|
|
57
|
+
function ok(value: unknown, message?: string | Error): void;
|
|
58
58
|
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
59
|
-
function equal(actual:
|
|
59
|
+
function equal(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
60
60
|
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
61
|
-
function notEqual(actual:
|
|
61
|
+
function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
62
62
|
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
63
|
-
function deepEqual(actual:
|
|
63
|
+
function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
64
64
|
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
65
|
-
function notDeepEqual(actual:
|
|
66
|
-
function strictEqual(actual:
|
|
67
|
-
function notStrictEqual(actual:
|
|
68
|
-
function deepStrictEqual(actual:
|
|
69
|
-
function notDeepStrictEqual(actual:
|
|
65
|
+
function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
66
|
+
function strictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
67
|
+
function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
68
|
+
function deepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
69
|
+
function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
70
70
|
|
|
71
|
-
function throws(block: () =>
|
|
72
|
-
function throws(block: () =>
|
|
73
|
-
function doesNotThrow(block: () =>
|
|
74
|
-
function doesNotThrow(block: () =>
|
|
71
|
+
function throws(block: () => unknown, message?: string | Error): void;
|
|
72
|
+
function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
|
|
73
|
+
function doesNotThrow(block: () => unknown, message?: string | Error): void;
|
|
74
|
+
function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
|
|
75
75
|
|
|
76
|
-
function ifError(value:
|
|
76
|
+
function ifError(value: unknown): void;
|
|
77
77
|
|
|
78
|
-
function rejects(block: (() => Promise<
|
|
78
|
+
function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
|
|
79
79
|
function rejects(
|
|
80
|
-
block: (() => Promise<
|
|
80
|
+
block: (() => Promise<unknown>) | Promise<unknown>,
|
|
81
81
|
error: AssertPredicate,
|
|
82
82
|
message?: string | Error,
|
|
83
83
|
): Promise<void>;
|
|
84
|
-
function doesNotReject(block: (() => Promise<
|
|
84
|
+
function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
|
|
85
85
|
function doesNotReject(
|
|
86
|
-
block: (() => Promise<
|
|
86
|
+
block: (() => Promise<unknown>) | Promise<unknown>,
|
|
87
87
|
error: AssertPredicate,
|
|
88
88
|
message?: string | Error,
|
|
89
89
|
): Promise<void>;
|
|
File without changes
|
|
File without changes
|
|
@@ -3,17 +3,17 @@ 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
|
-
pathname?: string | null;
|
|
12
|
-
protocol?: string | null;
|
|
13
|
-
search?: string | null;
|
|
14
|
-
slashes?: boolean | null;
|
|
15
|
-
port?: string | number | null;
|
|
16
|
-
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
|
+
pathname?: string | null | undefined;
|
|
12
|
+
protocol?: string | null | undefined;
|
|
13
|
+
search?: string | null | undefined;
|
|
14
|
+
slashes?: boolean | null | undefined;
|
|
15
|
+
port?: string | number | null | undefined;
|
|
16
|
+
query?: string | null | ParsedUrlQueryInput | undefined;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// Output of `url.parse`
|
|
@@ -73,10 +73,10 @@ declare module 'url' {
|
|
|
73
73
|
function pathToFileURL(url: string): URL;
|
|
74
74
|
|
|
75
75
|
interface URLFormatOptions {
|
|
76
|
-
auth?: boolean;
|
|
77
|
-
fragment?: boolean;
|
|
78
|
-
search?: boolean;
|
|
79
|
-
unicode?: boolean;
|
|
76
|
+
auth?: boolean | undefined;
|
|
77
|
+
fragment?: boolean | undefined;
|
|
78
|
+
search?: boolean | undefined;
|
|
79
|
+
unicode?: boolean | undefined;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
class URL {
|
|
@@ -114,3 +114,7 @@ declare module 'url' {
|
|
|
114
114
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
declare module 'node:url' {
|
|
119
|
+
export * from 'url';
|
|
120
|
+
}
|
node/util/types.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare module 'util/types' {
|
|
2
|
+
function isAnyArrayBuffer(object: unknown): object is ArrayBufferLike;
|
|
3
|
+
function isArgumentsObject(object: unknown): object is IArguments;
|
|
4
|
+
function isArrayBuffer(object: unknown): object is ArrayBuffer;
|
|
5
|
+
function isArrayBufferView(object: unknown): object is NodeJS.ArrayBufferView;
|
|
6
|
+
function isAsyncFunction(object: unknown): boolean;
|
|
7
|
+
function isBigInt64Array(value: unknown): value is BigInt64Array;
|
|
8
|
+
function isBigUint64Array(value: unknown): value is BigUint64Array;
|
|
9
|
+
function isBooleanObject(object: unknown): object is Boolean;
|
|
10
|
+
function isBoxedPrimitive(object: unknown): object is String | Number | BigInt | Boolean | Symbol;
|
|
11
|
+
function isDataView(object: unknown): object is DataView;
|
|
12
|
+
function isDate(object: unknown): object is Date;
|
|
13
|
+
function isExternal(object: unknown): boolean;
|
|
14
|
+
function isFloat32Array(object: unknown): object is Float32Array;
|
|
15
|
+
function isFloat64Array(object: unknown): object is Float64Array;
|
|
16
|
+
function isGeneratorFunction(object: unknown): object is GeneratorFunction;
|
|
17
|
+
function isGeneratorObject(object: unknown): object is Generator;
|
|
18
|
+
function isInt8Array(object: unknown): object is Int8Array;
|
|
19
|
+
function isInt16Array(object: unknown): object is Int16Array;
|
|
20
|
+
function isInt32Array(object: unknown): object is Int32Array;
|
|
21
|
+
function isMap<T>(
|
|
22
|
+
object: T | {},
|
|
23
|
+
): object is T extends ReadonlyMap<any, any>
|
|
24
|
+
? unknown extends T
|
|
25
|
+
? never
|
|
26
|
+
: ReadonlyMap<any, any>
|
|
27
|
+
: Map<unknown, unknown>;
|
|
28
|
+
function isMapIterator(object: unknown): boolean;
|
|
29
|
+
function isModuleNamespaceObject(value: unknown): boolean;
|
|
30
|
+
function isNativeError(object: unknown): object is Error;
|
|
31
|
+
function isNumberObject(object: unknown): object is Number;
|
|
32
|
+
function isPromise(object: unknown): object is Promise<unknown>;
|
|
33
|
+
function isProxy(object: unknown): boolean;
|
|
34
|
+
function isRegExp(object: unknown): object is RegExp;
|
|
35
|
+
function isSet<T>(
|
|
36
|
+
object: T | {},
|
|
37
|
+
): object is T extends ReadonlySet<any>
|
|
38
|
+
? unknown extends T
|
|
39
|
+
? never
|
|
40
|
+
: ReadonlySet<any>
|
|
41
|
+
: Set<unknown>;
|
|
42
|
+
function isSetIterator(object: unknown): boolean;
|
|
43
|
+
function isSharedArrayBuffer(object: unknown): object is SharedArrayBuffer;
|
|
44
|
+
function isStringObject(object: unknown): object is String;
|
|
45
|
+
function isSymbolObject(object: unknown): object is Symbol;
|
|
46
|
+
function isTypedArray(object: unknown): object is NodeJS.TypedArray;
|
|
47
|
+
function isUint8Array(object: unknown): object is Uint8Array;
|
|
48
|
+
function isUint8ClampedArray(object: unknown): object is Uint8ClampedArray;
|
|
49
|
+
function isUint16Array(object: unknown): object is Uint16Array;
|
|
50
|
+
function isUint32Array(object: unknown): object is Uint32Array;
|
|
51
|
+
function isWeakMap(object: unknown): object is WeakMap<object, unknown>;
|
|
52
|
+
function isWeakSet(object: unknown): object is WeakSet<object>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare module 'node:util/types' {
|
|
56
|
+
export * from 'util/types';
|
|
57
|
+
}
|