@types/node 11.9.0 → 11.9.4

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
@@ -2,15 +2,15 @@
2
2
  > `npm install --save @types/node`
3
3
 
4
4
  # Summary
5
- This package contains type definitions for Node.js ( http://nodejs.org/ ).
5
+ This package contains type definitions for non-npm package Node.js ( http://nodejs.org/ ).
6
6
 
7
7
  # Details
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
9
9
 
10
10
  Additional Details
11
- * Last updated: Tue, 12 Feb 2019 00:49:51 GMT
11
+ * Last updated: Thu, 14 Feb 2019 16:52:07 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, SharedArrayBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
15
15
  # Credits
16
- These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Jeremie Rodriguez <https://github.com/jeremiergz>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>.
16
+ These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Alberto Schiabel <https://github.com/jkomyno>, Alexander T. <https://github.com/a-tarasyuk>, Alvis HT Tang <https://github.com/alvis>, Andrew Makarov <https://github.com/r3nya>, Benjamin Toueg <https://github.com/btoueg>, Bruno Scheufler <https://github.com/brunoscheufler>, Chigozirim C. <https://github.com/smac89>, Christian Vaagland Tellnes <https://github.com/tellnes>, David Junger <https://github.com/touffy>, Deividas Bakanas <https://github.com/DeividasBakanas>, Eugene Y. Q. Shen <https://github.com/eyqs>, Flarna <https://github.com/Flarna>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Huw <https://github.com/hoo29>, Kelvin Jin <https://github.com/kjin>, Klaus Meinhardt <https://github.com/ajafff>, Lishude <https://github.com/islishude>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, Matthieu Sieben <https://github.com/matthieusieben>, Mohsen Azimi <https://github.com/mohsen1>, Nicolas Even <https://github.com/n-e>, Nicolas Voigt <https://github.com/octo-sniffle>, Parambir Singh <https://github.com/parambirs>, Sebastian Silbermann <https://github.com/eps1lon>, Simon Schick <https://github.com/SimonSchick>, Thomas den Hollander <https://github.com/ThomasdenH>, Wilco Bakker <https://github.com/WilcoBakker>, wwwy3y3 <https://github.com/wwwy3y3>, Zane Hannan AU <https://github.com/ZaneHannanAU>, Jeremie Rodriguez <https://github.com/jeremiergz>, Samuel Ainsworth <https://github.com/samuela>, Kyle Uehlein <https://github.com/kuehlein>.
node/crypto.d.ts CHANGED
@@ -11,6 +11,101 @@ declare module "crypto" {
11
11
  (): Certificate;
12
12
  };
13
13
 
14
+ namespace constants { // https://nodejs.org/dist/latest-v10.x/docs/api/crypto.html#crypto_crypto_constants
15
+ const OPENSSL_VERSION_NUMBER: number;
16
+
17
+ /** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
18
+ const SSL_OP_ALL: number;
19
+ /** Allows legacy insecure renegotiation between OpenSSL and unpatched clients or servers. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
20
+ const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION: number;
21
+ /** Attempts to use the server's preferences instead of the client's when selecting a cipher. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html. */
22
+ const SSL_OP_CIPHER_SERVER_PREFERENCE: number;
23
+ /** Instructs OpenSSL to use Cisco's "speshul" version of DTLS_BAD_VER. */
24
+ const SSL_OP_CISCO_ANYCONNECT: number;
25
+ /** Instructs OpenSSL to turn on cookie exchange. */
26
+ const SSL_OP_COOKIE_EXCHANGE: number;
27
+ /** Instructs OpenSSL to add server-hello extension from an early version of the cryptopro draft. */
28
+ const SSL_OP_CRYPTOPRO_TLSEXT_BUG: number;
29
+ /** Instructs OpenSSL to disable a SSL 3.0/TLS 1.0 vulnerability workaround added in OpenSSL 0.9.6d. */
30
+ const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: number;
31
+ /** Instructs OpenSSL to always use the tmp_rsa key when performing RSA operations. */
32
+ const SSL_OP_EPHEMERAL_RSA: number;
33
+ /** Allows initial connection to servers that do not support RI. */
34
+ const SSL_OP_LEGACY_SERVER_CONNECT: number;
35
+ const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: number;
36
+ const SSL_OP_MICROSOFT_SESS_ID_BUG: number;
37
+ /** Instructs OpenSSL to disable the workaround for a man-in-the-middle protocol-version vulnerability in the SSL 2.0 server implementation. */
38
+ const SSL_OP_MSIE_SSLV2_RSA_PADDING: number;
39
+ const SSL_OP_NETSCAPE_CA_DN_BUG: number;
40
+ const SSL_OP_NETSCAPE_CHALLENGE_BUG: number;
41
+ const SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG: number;
42
+ const SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG: number;
43
+ /** Instructs OpenSSL to disable support for SSL/TLS compression. */
44
+ const SSL_OP_NO_COMPRESSION: number;
45
+ const SSL_OP_NO_QUERY_MTU: number;
46
+ /** Instructs OpenSSL to always start a new session when performing renegotiation. */
47
+ const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION: number;
48
+ const SSL_OP_NO_SSLv2: number;
49
+ const SSL_OP_NO_SSLv3: number;
50
+ const SSL_OP_NO_TICKET: number;
51
+ const SSL_OP_NO_TLSv1: number;
52
+ const SSL_OP_NO_TLSv1_1: number;
53
+ const SSL_OP_NO_TLSv1_2: number;
54
+ const SSL_OP_PKCS1_CHECK_1: number;
55
+ const SSL_OP_PKCS1_CHECK_2: number;
56
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral DH parameters. */
57
+ const SSL_OP_SINGLE_DH_USE: number;
58
+ /** Instructs OpenSSL to always create a new key when using temporary/ephemeral ECDH parameters. */
59
+ const SSL_OP_SINGLE_ECDH_USE: number;
60
+ const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: number;
61
+ const SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG: number;
62
+ const SSL_OP_TLS_BLOCK_PADDING_BUG: number;
63
+ const SSL_OP_TLS_D5_BUG: number;
64
+ /** Instructs OpenSSL to disable version rollback attack detection. */
65
+ const SSL_OP_TLS_ROLLBACK_BUG: number;
66
+
67
+ const ENGINE_METHOD_RSA: number;
68
+ const ENGINE_METHOD_DSA: number;
69
+ const ENGINE_METHOD_DH: number;
70
+ const ENGINE_METHOD_RAND: number;
71
+ const ENGINE_METHOD_EC: number;
72
+ const ENGINE_METHOD_CIPHERS: number;
73
+ const ENGINE_METHOD_DIGESTS: number;
74
+ const ENGINE_METHOD_PKEY_METHS: number;
75
+ const ENGINE_METHOD_PKEY_ASN1_METHS: number;
76
+ const ENGINE_METHOD_ALL: number;
77
+ const ENGINE_METHOD_NONE: number;
78
+
79
+ const DH_CHECK_P_NOT_SAFE_PRIME: number;
80
+ const DH_CHECK_P_NOT_PRIME: number;
81
+ const DH_UNABLE_TO_CHECK_GENERATOR: number;
82
+ const DH_NOT_SUITABLE_GENERATOR: number;
83
+
84
+ const ALPN_ENABLED: number;
85
+
86
+ const RSA_PKCS1_PADDING: number;
87
+ const RSA_SSLV23_PADDING: number;
88
+ const RSA_NO_PADDING: number;
89
+ const RSA_PKCS1_OAEP_PADDING: number;
90
+ const RSA_X931_PADDING: number;
91
+ const RSA_PKCS1_PSS_PADDING: number;
92
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the digest size when signing or verifying. */
93
+ const RSA_PSS_SALTLEN_DIGEST: number;
94
+ /** Sets the salt length for RSA_PKCS1_PSS_PADDING to the maximum permissible value when signing data. */
95
+ const RSA_PSS_SALTLEN_MAX_SIGN: number;
96
+ /** Causes the salt length for RSA_PKCS1_PSS_PADDING to be determined automatically when verifying a signature. */
97
+ const RSA_PSS_SALTLEN_AUTO: number;
98
+
99
+ const POINT_CONVERSION_COMPRESSED: number;
100
+ const POINT_CONVERSION_UNCOMPRESSED: number;
101
+ const POINT_CONVERSION_HYBRID: number;
102
+
103
+ /** Specifies the built-in default cipher list used by Node.js (colon-separated values). */
104
+ const defaultCoreCipherList: string;
105
+ /** Specifies the active default cipher list used by the current Node.js process (colon-separated values). */
106
+ const defaultCipherList: string;
107
+ }
108
+
14
109
  /** @deprecated since v10.0.0 */
15
110
  const fips: boolean;
16
111
 
node/http.d.ts CHANGED
@@ -88,8 +88,16 @@ declare module "http" {
88
88
  createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: net.Socket) => void) => net.Socket;
89
89
  }
90
90
 
91
+ interface ServerOptions {
92
+ IncomingMessage?: typeof IncomingMessage;
93
+ ServerResponse?: typeof ServerResponse;
94
+ }
95
+
96
+ type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
97
+
91
98
  class Server extends net.Server {
92
- constructor(requestListener?: (req: IncomingMessage, res: ServerResponse) => void);
99
+ constructor(requestListener?: RequestListener);
100
+ constructor(options: ServerOptions, requestListener?: RequestListener);
93
101
 
94
102
  setTimeout(msecs?: number, callback?: () => void): this;
95
103
  setTimeout(callback: () => void): this;
@@ -238,7 +246,8 @@ declare module "http" {
238
246
  [errorCode: string]: string | undefined;
239
247
  };
240
248
 
241
- function createServer(requestListener?: (request: IncomingMessage, response: ServerResponse) => void): Server;
249
+ function createServer(requestListener?: RequestListener): Server;
250
+ function createServer(options: ServerOptions, requestListener?: RequestListener): Server;
242
251
  function createClient(port?: number, host?: string): any;
243
252
 
244
253
  // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
node/https.d.ts CHANGED
@@ -4,7 +4,7 @@ declare module "https" {
4
4
  import * as http from "http";
5
5
  import { URL } from "url";
6
6
 
7
- type ServerOptions = tls.SecureContextOptions & tls.TlsOptions;
7
+ type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
8
8
 
9
9
  type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
10
10
  rejectUnauthorized?: boolean; // Defaults to true
@@ -22,13 +22,15 @@ declare module "https" {
22
22
  }
23
23
 
24
24
  class Server extends tls.Server {
25
+ constructor(options: ServerOptions, requestListener?: http.RequestListener);
26
+
25
27
  setTimeout(callback: () => void): this;
26
28
  setTimeout(msecs?: number, callback?: () => void): this;
27
29
  timeout: number;
28
30
  keepAliveTimeout: number;
29
31
  }
30
32
 
31
- function createServer(options: ServerOptions, requestListener?: (req: http.IncomingMessage, res: http.ServerResponse) => void): Server;
33
+ function createServer(options: ServerOptions, requestListener?: http.RequestListener): Server;
32
34
  function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
33
35
  function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
34
36
  function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for Node.js 11.9
1
+ // Type definitions for non-npm package Node.js 11.9
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -10,6 +10,7 @@
10
10
  // Bruno Scheufler <https://github.com/brunoscheufler>
11
11
  // Chigozirim C. <https://github.com/smac89>
12
12
  // Christian Vaagland Tellnes <https://github.com/tellnes>
13
+ // David Junger <https://github.com/touffy>
13
14
  // Deividas Bakanas <https://github.com/DeividasBakanas>
14
15
  // Eugene Y. Q. Shen <https://github.com/eyqs>
15
16
  // Flarna <https://github.com/Flarna>
node/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "11.9.0",
4
- "description": "TypeScript definitions for Node.js",
3
+ "version": "11.9.4",
4
+ "description": "TypeScript definitions for non-npm package Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
7
7
  {
@@ -54,6 +54,11 @@
54
54
  "url": "https://github.com/tellnes",
55
55
  "githubUsername": "tellnes"
56
56
  },
57
+ {
58
+ "name": "David Junger",
59
+ "url": "https://github.com/touffy",
60
+ "githubUsername": "touffy"
61
+ },
57
62
  {
58
63
  "name": "Deividas Bakanas",
59
64
  "url": "https://github.com/DeividasBakanas",
@@ -190,6 +195,6 @@
190
195
  },
191
196
  "scripts": {},
192
197
  "dependencies": {},
193
- "typesPublisherContentHash": "2473cacf72b19f64710e19f27ba823c5c8eb92162acce10be72c788725b8a1d6",
198
+ "typesPublisherContentHash": "04bbd0bd504157f2cd4bfb56dbb9060df88afaec4c62949aef29d8b9cf64640a",
194
199
  "typeScriptVersion": "2.0"
195
200
  }
node/stream.d.ts CHANGED
@@ -222,7 +222,7 @@ declare module "stream" {
222
222
  uncork(): void;
223
223
  }
224
224
 
225
- type TransformCallback = (error?: Error, data?: any) => void;
225
+ type TransformCallback = (error?: Error | null, data?: any) => void;
226
226
 
227
227
  interface TransformOptions extends DuplexOptions {
228
228
  read?(this: Transform, size: number): void;