@types/node 12.0.6 → 12.0.10

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 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: Thu, 06 Jun 2019 18:27:08 GMT
11
+ * Last updated: Fri, 21 Jun 2019 21:21:59 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
 
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>, 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>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>.
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>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, and Thanik Bhongbhibhat <https://github.com/bhongy>.
node/child_process.d.ts CHANGED
@@ -310,8 +310,8 @@ declare module "child_process" {
310
310
  output: string[];
311
311
  stdout: T;
312
312
  stderr: T;
313
- status: number;
314
- signal: string;
313
+ status: number | null;
314
+ signal: string | null;
315
315
  error?: Error;
316
316
  }
317
317
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
node/fs.d.ts CHANGED
@@ -858,7 +858,7 @@ declare module "fs" {
858
858
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
859
859
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
860
860
  */
861
- function readdir(path: PathLike, options: { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
861
+ function readdir(path: PathLike, options: { encoding?: string | null; withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
862
862
 
863
863
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
864
864
  namespace readdir {
@@ -888,7 +888,7 @@ declare module "fs" {
888
888
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
889
889
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent
890
890
  */
891
- function __promisify__(path: PathLike, options: { withFileTypes: true }): Promise<Dirent[]>;
891
+ function __promisify__(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Promise<Dirent[]>;
892
892
  }
893
893
 
894
894
  /**
@@ -913,11 +913,11 @@ declare module "fs" {
913
913
  function readdirSync(path: PathLike, options?: { encoding?: string | null; withFileTypes?: false } | string | null): string[] | Buffer[];
914
914
 
915
915
  /**
916
- * Asynchronous readdir(3) - read a directory.
916
+ * Synchronous readdir(3) - read a directory.
917
917
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
918
918
  * @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
919
919
  */
920
- function readdirSync(path: PathLike, options: { withFileTypes: true }): Dirent[];
920
+ function readdirSync(path: PathLike, options: { encoding?: string | null; withFileTypes: true }): Dirent[];
921
921
 
922
922
  /**
923
923
  * Asynchronous close(2) - close a file descriptor.
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;
@@ -1080,22 +1096,26 @@ declare namespace NodeJS {
1080
1096
  v8debug?: any;
1081
1097
  }
1082
1098
 
1099
+ // compatibility with older typings
1083
1100
  interface Timer {
1084
- ref(): void;
1085
- refresh(): void;
1086
- unref(): void;
1101
+ hasRef(): boolean;
1102
+ ref(): this;
1103
+ refresh(): this;
1104
+ unref(): this;
1087
1105
  }
1088
1106
 
1089
1107
  class Immediate {
1090
- ref(): void;
1091
- unref(): void;
1108
+ hasRef(): boolean;
1109
+ ref(): this;
1110
+ unref(): this;
1092
1111
  _onImmediate: Function; // to distinguish it from the Timeout class
1093
1112
  }
1094
1113
 
1095
1114
  class Timeout implements Timer {
1096
- ref(): void;
1097
- refresh(): void;
1098
- unref(): void;
1115
+ hasRef(): boolean;
1116
+ ref(): this;
1117
+ refresh(): this;
1118
+ unref(): this;
1099
1119
  }
1100
1120
 
1101
1121
  class Module {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.0.6",
3
+ "version": "12.0.10",
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": "3ff34a1eb668b8be080d707826d01d1aa6f5e3b4af754da986a78368dd1de1ec",
210
210
  "typeScriptVersion": "2.0"
211
211
  }