@types/node 12.7.1 → 12.7.5

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,9 +8,9 @@ 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, 07 Aug 2019 21:19:24 GMT
11
+ * Last updated: Wed, 11 Sep 2019 05:46:27 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>, 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>, and Marcin Kopacz <https://github.com/chyzwar>.
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>, 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>, Marcin Kopacz <https://github.com/chyzwar>, and Trivikram Kamat <https://github.com/trivikr>.
node/child_process.d.ts CHANGED
@@ -92,6 +92,24 @@ declare module "child_process" {
92
92
  ];
93
93
  }
94
94
 
95
+ // return this object when stdio option is a tuple of 3
96
+ interface ChildProcessByStdio<
97
+ I extends null | Writable,
98
+ O extends null | Readable,
99
+ E extends null | Readable,
100
+ > extends ChildProcess {
101
+ stdin: I;
102
+ stdout: O;
103
+ stderr: E;
104
+ readonly stdio: [
105
+ I,
106
+ O,
107
+ E,
108
+ Readable | Writable | null | undefined, // extra, no modification
109
+ Readable | Writable | null | undefined // extra, no modification
110
+ ];
111
+ }
112
+
95
113
  interface MessageOptions {
96
114
  keepOpen?: boolean;
97
115
  }
@@ -128,9 +146,99 @@ declare module "child_process" {
128
146
  stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
129
147
  }
130
148
 
149
+ type StdioNull = 'inherit' | 'ignore' | Stream;
150
+ type StdioPipe = undefined | null | 'pipe';
151
+
152
+ interface SpawnOptionsWithStdioTuple<
153
+ Stdin extends StdioNull | StdioPipe,
154
+ Stdout extends StdioNull | StdioPipe,
155
+ Stderr extends StdioNull | StdioPipe,
156
+ > extends SpawnOptions {
157
+ stdio: [Stdin, Stdout, Stderr];
158
+ }
159
+
160
+ // overloads of spawn without 'args'
131
161
  function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
162
+
163
+ function spawn(
164
+ command: string,
165
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
166
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
167
+ function spawn(
168
+ command: string,
169
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
170
+ ): ChildProcessByStdio<Writable, Readable, null>;
171
+ function spawn(
172
+ command: string,
173
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
174
+ ): ChildProcessByStdio<Writable, null, Readable>;
175
+ function spawn(
176
+ command: string,
177
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
178
+ ): ChildProcessByStdio<null, Readable, Readable>;
179
+ function spawn(
180
+ command: string,
181
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
182
+ ): ChildProcessByStdio<Writable, null, null>;
183
+ function spawn(
184
+ command: string,
185
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
186
+ ): ChildProcessByStdio<null, Readable, null>;
187
+ function spawn(
188
+ command: string,
189
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
190
+ ): ChildProcessByStdio<null, null, Readable>;
191
+ function spawn(
192
+ command: string,
193
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
194
+ ): ChildProcessByStdio<null, null, null>;
195
+
132
196
  function spawn(command: string, options: SpawnOptions): ChildProcess;
197
+
198
+ // overloads of spawn with 'args'
133
199
  function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
200
+
201
+ function spawn(
202
+ command: string,
203
+ args: ReadonlyArray<string>,
204
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
205
+ ): ChildProcessByStdio<Writable, Readable, Readable>;
206
+ function spawn(
207
+ command: string,
208
+ args: ReadonlyArray<string>,
209
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
210
+ ): ChildProcessByStdio<Writable, Readable, null>;
211
+ function spawn(
212
+ command: string,
213
+ args: ReadonlyArray<string>,
214
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
215
+ ): ChildProcessByStdio<Writable, null, Readable>;
216
+ function spawn(
217
+ command: string,
218
+ args: ReadonlyArray<string>,
219
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
220
+ ): ChildProcessByStdio<null, Readable, Readable>;
221
+ function spawn(
222
+ command: string,
223
+ args: ReadonlyArray<string>,
224
+ options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
225
+ ): ChildProcessByStdio<Writable, null, null>;
226
+ function spawn(
227
+ command: string,
228
+ args: ReadonlyArray<string>,
229
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
230
+ ): ChildProcessByStdio<null, Readable, null>;
231
+ function spawn(
232
+ command: string,
233
+ args: ReadonlyArray<string>,
234
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
235
+ ): ChildProcessByStdio<null, null, Readable>;
236
+ function spawn(
237
+ command: string,
238
+ args: ReadonlyArray<string>,
239
+ options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
240
+ ): ChildProcessByStdio<null, null, null>;
241
+
134
242
  function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
135
243
 
136
244
  interface ExecOptions extends CommonOptions {
node/crypto.d.ts CHANGED
@@ -118,14 +118,14 @@ declare module "crypto" {
118
118
  type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
119
119
  type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
120
120
 
121
- class Hash extends stream.Duplex {
121
+ class Hash extends stream.Transform {
122
122
  private constructor();
123
123
  update(data: BinaryLike): Hash;
124
124
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
125
125
  digest(): Buffer;
126
126
  digest(encoding: HexBase64Latin1Encoding): string;
127
127
  }
128
- class Hmac extends stream.Duplex {
128
+ class Hmac extends stream.Transform {
129
129
  private constructor();
130
130
  update(data: BinaryLike): Hmac;
131
131
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
@@ -193,7 +193,7 @@ declare module "crypto" {
193
193
  algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
194
194
  ): Cipher;
195
195
 
196
- class Cipher extends stream.Duplex {
196
+ class Cipher extends stream.Transform {
197
197
  private constructor();
198
198
  update(data: BinaryLike): Buffer;
199
199
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
@@ -234,7 +234,7 @@ declare module "crypto" {
234
234
  ): DecipherGCM;
235
235
  function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
236
236
 
237
- class Decipher extends stream.Duplex {
237
+ class Decipher extends stream.Transform {
238
238
  private constructor();
239
239
  update(data: Binary): Buffer;
240
240
  update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
node/index.d.ts CHANGED
@@ -37,6 +37,7 @@
37
37
  // Jordi Oliveras Rovira <https://github.com/j-oliveras>
38
38
  // Thanik Bhongbhibhat <https://github.com/bhongy>
39
39
  // Marcin Kopacz <https://github.com/chyzwar>
40
+ // Trivikram Kamat <https://github.com/trivikr>
40
41
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
41
42
 
42
43
  // NOTE: These definitions support NodeJS and TypeScript 3.2.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.7.1",
3
+ "version": "12.7.5",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -188,6 +188,11 @@
188
188
  "name": "Marcin Kopacz",
189
189
  "url": "https://github.com/chyzwar",
190
190
  "githubUsername": "chyzwar"
191
+ },
192
+ {
193
+ "name": "Trivikram Kamat",
194
+ "url": "https://github.com/trivikr",
195
+ "githubUsername": "trivikr"
191
196
  }
192
197
  ],
193
198
  "main": "",
@@ -206,6 +211,6 @@
206
211
  },
207
212
  "scripts": {},
208
213
  "dependencies": {},
209
- "typesPublisherContentHash": "53a0cec8c0721eaaa04fde9376c826d08538cd9882d4104aeeeb774e0c17f552",
214
+ "typesPublisherContentHash": "f0d8295c97f3f4bafe268435e951340e846630f23bf920def70d6d0d454de5f3",
210
215
  "typeScriptVersion": "2.0"
211
216
  }
node/readline.d.ts CHANGED
@@ -142,7 +142,7 @@ declare module "readline" {
142
142
  /**
143
143
  * Moves this WriteStream's cursor to the specified position.
144
144
  */
145
- function cursorTo(stream: NodeJS.WritableStream, x: number, y: number, callback?: () => void): boolean;
145
+ function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
146
146
  /**
147
147
  * Moves this WriteStream's cursor relative to its current position.
148
148
  */