@types/node 12.0.3 → 12.0.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: Tue, 28 May 2019 19:24:35 GMT
11
+ * Last updated: Thu, 06 Jun 2019 23:14:22 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
node/globals.d.ts CHANGED
@@ -244,8 +244,24 @@ interface Buffer extends Uint8Array {
244
244
  equals(otherBuffer: Uint8Array): boolean;
245
245
  compare(otherBuffer: Uint8Array, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
246
246
  copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
247
- slice(start?: number, end?: number): Buffer;
248
- subarray(begin: number, end?: number): Buffer;
247
+ /**
248
+ * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
249
+ *
250
+ * This method is incompatible with `Uint8Array#slice()`, which returns a copy of the original memory.
251
+ *
252
+ * @param begin Where the new `Buffer` will start. Default: `0`.
253
+ * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
254
+ */
255
+ slice(begin?: number, end?: number): Buffer;
256
+ /**
257
+ * Returns a new `Buffer` that references **the same memory as the original**, but offset and cropped by the start and end indices.
258
+ *
259
+ * This method is compatible with `Uint8Array#subarray()`.
260
+ *
261
+ * @param begin Where the new `Buffer` will start. Default: `0`.
262
+ * @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
263
+ */
264
+ subarray(begin?: number, end?: number): Buffer;
249
265
  writeUIntLE(value: number, offset: number, byteLength: number): number;
250
266
  writeUIntBE(value: number, offset: number, byteLength: number): number;
251
267
  writeIntLE(value: number, offset: number, byteLength: number): number;
node/http2.d.ts CHANGED
@@ -71,6 +71,7 @@ declare module "http2" {
71
71
  * indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
72
72
  */
73
73
  readonly endAfterHeaders: boolean;
74
+ readonly id?: number;
74
75
  readonly pending: boolean;
75
76
  readonly rstCode: number;
76
77
  readonly sentHeaders: OutgoingHttpHeaders;
node/inspector.d.ts CHANGED
@@ -3251,7 +3251,7 @@ declare module "inspector" {
3251
3251
  function close(): void;
3252
3252
 
3253
3253
  /**
3254
- * Return the URL of the active inspector, or undefined if there is none.
3254
+ * Return the URL of the active inspector, or `undefined` if there is none.
3255
3255
  */
3256
- function url(): string;
3256
+ function url(): string | undefined;
3257
3257
  }
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.0.3",
3
+ "version": "12.0.7",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -206,6 +206,6 @@
206
206
  },
207
207
  "scripts": {},
208
208
  "dependencies": {},
209
- "typesPublisherContentHash": "d708f60a2c54c84e2360f26a4a57253ab14f0ec0cd3390d5b0eeb2c4b6e4d5b0",
209
+ "typesPublisherContentHash": "2043030d9cf3e68db17480b60847159e473c295abfed316add246578fb0ddb0c",
210
210
  "typeScriptVersion": "2.0"
211
211
  }
node/tls.d.ts CHANGED
@@ -334,7 +334,7 @@ declare module "tls" {
334
334
  cleartext: TLSSocket;
335
335
  }
336
336
 
337
- type SecureVersion = 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
337
+ type SecureVersion = 'TLSv1.3' | 'TLSv1.2' | 'TLSv1.1' | 'TLSv1';
338
338
 
339
339
  interface SecureContextOptions {
340
340
  pfx?: string | Buffer | Array<string | Buffer | Object>;
@@ -353,18 +353,22 @@ declare module "tls" {
353
353
  sessionIdContext?: string;
354
354
  /**
355
355
  * Optionally set the maximum TLS version to allow. One
356
- * of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
357
- * `secureProtocol` option, use one or the other. **Default:** `'TLSv1.2'`.
356
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
357
+ * `secureProtocol` option, use one or the other.
358
+ * **Default:** `'TLSv1.3'`, unless changed using CLI options. Using
359
+ * `--tls-max-v1.2` sets the default to `'TLSv1.2'`. Using `--tls-max-v1.3` sets the default to
360
+ * `'TLSv1.3'`. If multiple of the options are provided, the highest maximum is used.
358
361
  */
359
362
  maxVersion?: SecureVersion;
360
363
  /**
361
364
  * Optionally set the minimum TLS version to allow. One
362
- * of `TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
365
+ * of `'TLSv1.3'`, `'TLSv1.2'`, `'TLSv1.1'`, or `'TLSv1'`. Cannot be specified along with the
363
366
  * `secureProtocol` option, use one or the other. It is not recommended to use
364
367
  * less than TLSv1.2, but it may be required for interoperability.
365
368
  * **Default:** `'TLSv1.2'`, unless changed using CLI options. Using
366
- * `--tls-v1.0` changes the default to `'TLSv1'`. Using `--tls-v1.1` changes
367
- * the default to `'TLSv1.1'`.
369
+ * `--tls-v1.0` sets the default to `'TLSv1'`. Using `--tls-v1.1` sets the default to
370
+ * `'TLSv1.1'`. Using `--tls-min-v1.3` sets the default to
371
+ * 'TLSv1.3'. If multiple of the options are provided, the lowest minimum is used.
368
372
  */
369
373
  minVersion?: SecureVersion;
370
374
  }