@types/node 14.14.23 → 14.14.24

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.
Files changed (4) hide show
  1. node/README.md +1 -1
  2. node/net.d.ts +14 -2
  3. node/package.json +2 -2
  4. node/tls.d.ts +4 -1
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, 03 Feb 2021 22:47:27 GMT
11
+ * Last updated: Wed, 03 Feb 2021 23:39:29 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/net.d.ts CHANGED
@@ -178,10 +178,22 @@ declare module "net" {
178
178
  ipv6Only?: boolean;
179
179
  }
180
180
 
181
+ interface ServerOpts {
182
+ /**
183
+ * Indicates whether half-opened TCP connections are allowed. __Default:__ `false`.
184
+ */
185
+ allowHalfOpen?: boolean;
186
+
187
+ /**
188
+ * Indicates whether the socket should be paused on incoming connections. __Default:__ `false`.
189
+ */
190
+ pauseOnConnect?: boolean;
191
+ }
192
+
181
193
  // https://github.com/nodejs/node/blob/master/lib/net.js
182
194
  class Server extends events.EventEmitter {
183
195
  constructor(connectionListener?: (socket: Socket) => void);
184
- constructor(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void);
196
+ constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
185
197
 
186
198
  listen(port?: number, hostname?: string, backlog?: number, listeningListener?: () => void): this;
187
199
  listen(port?: number, hostname?: string, listeningListener?: () => void): this;
@@ -256,7 +268,7 @@ declare module "net" {
256
268
  type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
257
269
 
258
270
  function createServer(connectionListener?: (socket: Socket) => void): Server;
259
- function createServer(options?: { allowHalfOpen?: boolean, pauseOnConnect?: boolean }, connectionListener?: (socket: Socket) => void): Server;
271
+ function createServer(options?: ServerOpts, connectionListener?: (socket: Socket) => void): Server;
260
272
  function connect(options: NetConnectOpts, connectionListener?: () => void): Socket;
261
273
  function connect(port: number, host?: string, connectionListener?: () => void): Socket;
262
274
  function connect(path: string, connectionListener?: () => void): Socket;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.14.23",
3
+ "version": "14.14.24",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -251,6 +251,6 @@
251
251
  },
252
252
  "scripts": {},
253
253
  "dependencies": {},
254
- "typesPublisherContentHash": "ad6423c75a22bafa9d1dc83b45f82d4a86c89eb2f22aa5101d5f1adcaf1165e1",
254
+ "typesPublisherContentHash": "e2509bd7872a33bb4ab8408aa52ebe466b47f1f3d47e251ce72437f2cace8d02",
255
255
  "typeScriptVersion": "3.4"
256
256
  }
node/tls.d.ts CHANGED
@@ -385,7 +385,7 @@ declare module "tls" {
385
385
  rejectUnauthorized?: boolean;
386
386
  }
387
387
 
388
- interface TlsOptions extends SecureContextOptions, CommonConnectionOptions {
388
+ interface TlsOptions extends SecureContextOptions, CommonConnectionOptions, net.ServerOpts {
389
389
  /**
390
390
  * Abort the connection if the SSL/TLS handshake does not finish in the
391
391
  * specified number of milliseconds. A 'tlsClientError' is emitted on
@@ -471,6 +471,9 @@ declare module "tls" {
471
471
  }
472
472
 
473
473
  class Server extends net.Server {
474
+ constructor(secureConnectionListener?: (socket: TLSSocket) => void);
475
+ constructor(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void);
476
+
474
477
  /**
475
478
  * The server.addContext() method adds a secure context that will be
476
479
  * used if the client request's SNI name matches the supplied hostname