@types/node 16.4.6 → 16.4.7

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: Wed, 28 Jul 2021 19:31:18 GMT
11
+ * Last updated: Thu, 29 Jul 2021 13:01:18 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
@@ -12,8 +12,6 @@ declare module 'assert' {
12
12
  function assert(value: unknown, message?: string | Error): asserts value;
13
13
  namespace assert {
14
14
  /**
15
- * * Extends: `<errors.Error>`
16
- *
17
15
  * Indicates the failure of an assertion. All errors thrown by the `assert` module
18
16
  * will be instances of the `AssertionError` class.
19
17
  */
node/crypto.d.ts CHANGED
@@ -320,8 +320,6 @@ declare module 'crypto' {
320
320
  type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
321
321
  type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
322
322
  /**
323
- * * Extends: `<stream.Transform>`
324
- *
325
323
  * The `Hash` class is a utility for creating hash digests of data. It can be
326
324
  * used in one of two ways:
327
325
  *
@@ -518,8 +516,6 @@ declare module 'crypto' {
518
516
  digest(encoding: BinaryToTextEncoding): string;
519
517
  }
520
518
  /**
521
- * * Extends: `<stream.Transform>`
522
- *
523
519
  * The `Hmac` class is a utility for creating cryptographic HMAC digests. It can
524
520
  * be used in one of two ways:
525
521
  *
@@ -878,8 +874,6 @@ declare module 'crypto' {
878
874
  function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
879
875
  function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
880
876
  /**
881
- * * Extends: `<stream.Transform>`
882
- *
883
877
  * Instances of the `Cipher` class are used to encrypt data. The class can be
884
878
  * used in one of two ways:
885
879
  *
@@ -1219,8 +1213,6 @@ declare module 'crypto' {
1219
1213
  function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
1220
1214
  function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
1221
1215
  /**
1222
- * * Extends: `<stream.Transform>`
1223
- *
1224
1216
  * Instances of the `Decipher` class are used to decrypt data. The class can be
1225
1217
  * used in one of two ways:
1226
1218
  *
@@ -1584,8 +1576,6 @@ declare module 'crypto' {
1584
1576
  }
1585
1577
  type KeyLike = string | Buffer | KeyObject;
1586
1578
  /**
1587
- * * Extends: `<stream.Writable>`
1588
- *
1589
1579
  * The `Sign` class is a utility for generating signatures. It can be used in one
1590
1580
  * of two ways:
1591
1581
  *
@@ -1738,8 +1728,6 @@ declare module 'crypto' {
1738
1728
  */
1739
1729
  function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
1740
1730
  /**
1741
- * * Extends: `<stream.Writable>`
1742
- *
1743
1731
  * The `Verify` class is a utility for verifying signatures. It can be used in one
1744
1732
  * of two ways:
1745
1733
  *
node/fs.d.ts CHANGED
@@ -305,8 +305,6 @@ declare module 'fs' {
305
305
  prependOnceListener(event: 'close', listener: () => void): this;
306
306
  }
307
307
  /**
308
- * * Extends: `<stream.Readable>`
309
- *
310
308
  * Instances of `<fs.ReadStream>` are created and returned using the {@link createReadStream} function.
311
309
  * @since v0.1.93
312
310
  */
node/http.d.ts CHANGED
@@ -182,7 +182,6 @@ declare module 'http' {
182
182
  }
183
183
  interface Server extends HttpBase {}
184
184
  /**
185
- * * Extends: `<net.Server>`
186
185
  * @since v0.1.17
187
186
  */
188
187
  class Server extends NetServer {
@@ -620,8 +619,6 @@ declare module 'http' {
620
619
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
621
620
  }
622
621
  /**
623
- * * Extends: `<stream.Readable>`
624
- *
625
622
  * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
626
623
  * access response
627
624
  * status, headers and data.
@@ -677,7 +674,7 @@ declare module 'http' {
677
674
  /**
678
675
  * Alias for `message.socket`.
679
676
  * @since v0.1.90
680
- * @deprecated Since v16.0.0 - Deprecated. Use `socket`.
677
+ * @deprecated Since v16.0.0 - Use `socket`.
681
678
  */
682
679
  connection: Socket;
683
680
  /**
node/http2.d.ts CHANGED
@@ -1170,8 +1170,6 @@ declare module 'http2' {
1170
1170
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1171
1171
  }
1172
1172
  /**
1173
- * * Extends: `<stream.Readable>`
1174
- *
1175
1173
  * A `Http2ServerRequest` object is created by {@link Server} or {@link SecureServer} and passed as the first argument to the `'request'` event. It may be used to access a request status,
1176
1174
  * headers, and
1177
1175
  * data.
@@ -1194,7 +1192,7 @@ declare module 'http2' {
1194
1192
  /**
1195
1193
  * See `request.socket`.
1196
1194
  * @since v8.4.0
1197
- * @deprecated Since v13.0.0 - Deprecated. Use `socket`.
1195
+ * @deprecated Since v13.0.0 - Use `socket`.
1198
1196
  */
1199
1197
  readonly connection: net.Socket | tls.TLSSocket;
1200
1198
  /**
@@ -1417,14 +1415,14 @@ declare module 'http2' {
1417
1415
  /**
1418
1416
  * See `response.socket`.
1419
1417
  * @since v8.4.0
1420
- * @deprecated Since v13.0.0 - Deprecated. Use `socket`.
1418
+ * @deprecated Since v13.0.0 - Use `socket`.
1421
1419
  */
1422
1420
  readonly connection: net.Socket | tls.TLSSocket;
1423
1421
  /**
1424
1422
  * Boolean value that indicates whether the response has completed. Starts
1425
1423
  * as `false`. After `response.end()` executes, the value will be `true`.
1426
1424
  * @since v8.4.0
1427
- * @deprecated Since v13.4.0,v12.16.0 - Deprecated. Use `writableEnded`.
1425
+ * @deprecated Since v13.4.0,v12.16.0 - Use `writableEnded`.
1428
1426
  */
1429
1427
  readonly finished: boolean;
1430
1428
  /**
@@ -1437,10 +1435,66 @@ declare module 'http2' {
1437
1435
  * @since v15.7.0
1438
1436
  */
1439
1437
  readonly req: Http2ServerRequest;
1438
+ /**
1439
+ * Returns a `Proxy` object that acts as a `net.Socket` (or `tls.TLSSocket`) but
1440
+ * applies getters, setters, and methods based on HTTP/2 logic.
1441
+ *
1442
+ * `destroyed`, `readable`, and `writable` properties will be retrieved from and
1443
+ * set on `response.stream`.
1444
+ *
1445
+ * `destroy`, `emit`, `end`, `on` and `once` methods will be called on`response.stream`.
1446
+ *
1447
+ * `setTimeout` method will be called on `response.stream.session`.
1448
+ *
1449
+ * `pause`, `read`, `resume`, and `write` will throw an error with code`ERR_HTTP2_NO_SOCKET_MANIPULATION`. See `Http2Session and Sockets` for
1450
+ * more information.
1451
+ *
1452
+ * All other interactions will be routed directly to the socket.
1453
+ *
1454
+ * ```js
1455
+ * const http2 = require('http2');
1456
+ * const server = http2.createServer((req, res) => {
1457
+ * const ip = req.socket.remoteAddress;
1458
+ * const port = req.socket.remotePort;
1459
+ * res.end(`Your IP address is ${ip} and your source port is ${port}.`);
1460
+ * }).listen(3000);
1461
+ * ```
1462
+ * @since v8.4.0
1463
+ */
1440
1464
  readonly socket: net.Socket | tls.TLSSocket;
1465
+ /**
1466
+ * The `Http2Stream` object backing the response.
1467
+ * @since v8.4.0
1468
+ */
1441
1469
  readonly stream: ServerHttp2Stream;
1470
+ /**
1471
+ * When true, the Date header will be automatically generated and sent in
1472
+ * the response if it is not already present in the headers. Defaults to true.
1473
+ *
1474
+ * This should only be disabled for testing; HTTP requires the Date header
1475
+ * in responses.
1476
+ * @since v8.4.0
1477
+ */
1442
1478
  sendDate: boolean;
1479
+ /**
1480
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
1481
+ * this property controls the status code that will be sent to the client when
1482
+ * the headers get flushed.
1483
+ *
1484
+ * ```js
1485
+ * response.statusCode = 404;
1486
+ * ```
1487
+ *
1488
+ * After response header was sent to the client, this property indicates the
1489
+ * status code which was sent out.
1490
+ * @since v8.4.0
1491
+ */
1443
1492
  statusCode: number;
1493
+ /**
1494
+ * Status message is not supported by HTTP/2 (RFC 7540 8.1.2.4). It returns
1495
+ * an empty string.
1496
+ * @since v8.4.0
1497
+ */
1444
1498
  statusMessage: '';
1445
1499
  /**
1446
1500
  * This method adds HTTP trailing headers (a header but at the end of the
node/https.d.ts CHANGED
@@ -27,8 +27,6 @@ declare module 'https' {
27
27
  }
28
28
  interface Server extends http.HttpBase {}
29
29
  /**
30
- * * Extends: `<tls.Server>`
31
- *
32
30
  * See `http.Server` for more information.
33
31
  * @since v0.3.4
34
32
  */
node/module.d.ts CHANGED
@@ -66,6 +66,9 @@ declare module 'module' {
66
66
  * @since v13.7.0, v12.17.0
67
67
  */
68
68
  class SourceMap {
69
+ /**
70
+ * Getter for the payload used to construct the `SourceMap` instance.
71
+ */
69
72
  readonly payload: SourceMapPayload;
70
73
  constructor(payload: SourceMapPayload);
71
74
  /**
node/net.d.ts CHANGED
@@ -59,8 +59,6 @@ declare module 'net' {
59
59
  }
60
60
  type SocketConnectOpts = TcpSocketConnectOpts | IpcSocketConnectOpts;
61
61
  /**
62
- * * Extends: `<stream.Duplex>`
63
- *
64
62
  * This class is an abstraction of a TCP socket or a streaming `IPC` endpoint
65
63
  * (uses named pipes on Windows, and Unix domain sockets otherwise). It is also
66
64
  * an `EventEmitter`.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.4.6",
3
+ "version": "16.4.7",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -232,6 +232,6 @@
232
232
  },
233
233
  "scripts": {},
234
234
  "dependencies": {},
235
- "typesPublisherContentHash": "409fea0ec0757dc100114c6d35fe3b616cdf1e1095e08f5e2f83bd9336035435",
235
+ "typesPublisherContentHash": "15db94446f7f1e160948be1b1ecb14684eef4f4a29dc0fd41a570f2f071209d1",
236
236
  "typeScriptVersion": "3.6"
237
237
  }
node/process.d.ts CHANGED
@@ -1165,8 +1165,8 @@ declare module 'process' {
1165
1165
  * `process.umask()` returns the Node.js process's file mode creation mask. Child
1166
1166
  * processes inherit the mask from the parent process.
1167
1167
  * @since v0.1.19
1168
- * @deprecated Deprecated. Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a *
1169
- * potential security vulnerability. There is no safe, cross-platform alternative API.
1168
+ * @deprecated Calling `process.umask()` with no argument causes the process-wide umask to be written twice. This introduces a race condition between threads, and is a potential *
1169
+ * security vulnerability. There is no safe, cross-platform alternative API.
1170
1170
  */
1171
1171
  umask(): number;
1172
1172
  /**
node/tls.d.ts CHANGED
@@ -127,8 +127,6 @@ declare module 'tls' {
127
127
  requestOCSP?: boolean | undefined;
128
128
  }
129
129
  /**
130
- * * Extends: `<net.Socket>`
131
- *
132
130
  * Performs transparent encryption of written data and all required TLS
133
131
  * negotiation.
134
132
  *
@@ -144,7 +142,9 @@ declare module 'tls' {
144
142
  */
145
143
  constructor(socket: net.Socket, options?: TLSSocketOptions);
146
144
  /**
147
- * A boolean that is true if the peer certificate was signed by one of the specified CAs, otherwise false.
145
+ * Returns `true` if the peer certificate was signed by one of the CAs specified
146
+ * when creating the `tls.TLSSocket` instance, otherwise `false`.
147
+ * @since v0.11.4
148
148
  */
149
149
  authorized: boolean;
150
150
  /**
@@ -542,8 +542,6 @@ declare module 'tls' {
542
542
  pskCallback?(hint: string | null): PSKCallbackNegotation | null;
543
543
  }
544
544
  /**
545
- * * Extends: `<net.Server>`
546
- *
547
545
  * Accepts encrypted connections using TLS or SSL.
548
546
  * @since v0.3.2
549
547
  */
node/tty.d.ts CHANGED
@@ -35,8 +35,6 @@ declare module 'tty' {
35
35
  */
36
36
  function isatty(fd: number): boolean;
37
37
  /**
38
- * * Extends: `<net.Socket>`
39
- *
40
38
  * Represents the readable side of a TTY. In normal circumstances `process.stdin` will be the only `tty.ReadStream` instance in a Node.js
41
39
  * process and there should be no reason to create additional instances.
42
40
  * @since v0.5.8
@@ -74,8 +72,6 @@ declare module 'tty' {
74
72
  */
75
73
  type Direction = -1 | 0 | 1;
76
74
  /**
77
- * * Extends: `<net.Socket>`
78
- *
79
75
  * Represents the writable side of a TTY. In normal circumstances,`process.stdout` and `process.stderr` will be the only`tty.WriteStream` instances created for a Node.js process and there
80
76
  * should be no reason to create additional instances.
81
77
  * @since v0.5.8