@types/node 12.0.6 → 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.
Files changed (3) hide show
  1. node/README.md +1 -1
  2. node/globals.d.ts +18 -2
  3. node/package.json +2 -2
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: Thu, 06 Jun 2019 18:27:08 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.0.6",
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": "6cb1fb42688e1e3de1cfd746bc64aade6a194ed72da3868d695b811a1a36aeb4",
209
+ "typesPublisherContentHash": "2043030d9cf3e68db17480b60847159e473c295abfed316add246578fb0ddb0c",
210
210
  "typeScriptVersion": "2.0"
211
211
  }