@types/node 12.6.8 → 12.7.2

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, 17 Jul 2019 19:14:44 GMT
11
+ * Last updated: Thu, 15 Aug 2019 00:43: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
 
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>, and 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>, 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>.
node/dns.d.ts CHANGED
@@ -31,9 +31,9 @@ declare module "dns" {
31
31
 
32
32
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
33
33
  namespace lookup {
34
- function __promisify__(hostname: string, options: LookupAllOptions): Promise<{ address: LookupAddress[] }>;
35
- function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<{ address: string, family: number }>;
36
- function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
34
+ function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
35
+ function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
36
+ function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
37
37
  }
38
38
 
39
39
  function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
node/http.d.ts CHANGED
@@ -146,6 +146,7 @@ declare module "http" {
146
146
  class ServerResponse extends OutgoingMessage {
147
147
  statusCode: number;
148
148
  statusMessage: string;
149
+ writableFinished: boolean;
149
150
 
150
151
  constructor(req: IncomingMessage);
151
152
 
@@ -158,6 +159,16 @@ declare module "http" {
158
159
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
159
160
  }
160
161
 
162
+ interface InformationEvent {
163
+ statusCode: number;
164
+ statusMessage: string;
165
+ httpVersion: string;
166
+ httpVersionMajor: number;
167
+ httpVersionMinor: number;
168
+ headers: IncomingHttpHeaders;
169
+ rawHeaders: string[];
170
+ }
171
+
161
172
  // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
162
173
  class ClientRequest extends OutgoingMessage {
163
174
  connection: Socket;
@@ -172,6 +183,86 @@ declare module "http" {
172
183
  setTimeout(timeout: number, callback?: () => void): this;
173
184
  setNoDelay(noDelay?: boolean): void;
174
185
  setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
186
+
187
+ addListener(event: 'abort', listener: () => void): this;
188
+ addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
189
+ addListener(event: 'continue', listener: () => void): this;
190
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
191
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
192
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
193
+ addListener(event: 'timeout', listener: () => void): this;
194
+ addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
195
+ addListener(event: 'close', listener: () => void): this;
196
+ addListener(event: 'drain', listener: () => void): this;
197
+ addListener(event: 'error', listener: (err: Error) => void): this;
198
+ addListener(event: 'finish', listener: () => void): this;
199
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
200
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
201
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
202
+
203
+ on(event: 'abort', listener: () => void): this;
204
+ on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
205
+ on(event: 'continue', listener: () => void): this;
206
+ on(event: 'information', listener: (info: InformationEvent) => void): this;
207
+ on(event: 'response', listener: (response: IncomingMessage) => void): this;
208
+ on(event: 'socket', listener: (socket: Socket) => void): this;
209
+ on(event: 'timeout', listener: () => void): this;
210
+ on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
211
+ on(event: 'close', listener: () => void): this;
212
+ on(event: 'drain', listener: () => void): this;
213
+ on(event: 'error', listener: (err: Error) => void): this;
214
+ on(event: 'finish', listener: () => void): this;
215
+ on(event: 'pipe', listener: (src: stream.Readable) => void): this;
216
+ on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
217
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
218
+
219
+ once(event: 'abort', listener: () => void): this;
220
+ once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
221
+ once(event: 'continue', listener: () => void): this;
222
+ once(event: 'information', listener: (info: InformationEvent) => void): this;
223
+ once(event: 'response', listener: (response: IncomingMessage) => void): this;
224
+ once(event: 'socket', listener: (socket: Socket) => void): this;
225
+ once(event: 'timeout', listener: () => void): this;
226
+ once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
227
+ once(event: 'close', listener: () => void): this;
228
+ once(event: 'drain', listener: () => void): this;
229
+ once(event: 'error', listener: (err: Error) => void): this;
230
+ once(event: 'finish', listener: () => void): this;
231
+ once(event: 'pipe', listener: (src: stream.Readable) => void): this;
232
+ once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
233
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
234
+
235
+ prependListener(event: 'abort', listener: () => void): this;
236
+ prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
237
+ prependListener(event: 'continue', listener: () => void): this;
238
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
239
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
240
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
241
+ prependListener(event: 'timeout', listener: () => void): this;
242
+ prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
243
+ prependListener(event: 'close', listener: () => void): this;
244
+ prependListener(event: 'drain', listener: () => void): this;
245
+ prependListener(event: 'error', listener: (err: Error) => void): this;
246
+ prependListener(event: 'finish', listener: () => void): this;
247
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
248
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
249
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
250
+
251
+ prependOnceListener(event: 'abort', listener: () => void): this;
252
+ prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
253
+ prependOnceListener(event: 'continue', listener: () => void): this;
254
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
255
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
256
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
257
+ prependOnceListener(event: 'timeout', listener: () => void): this;
258
+ prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
259
+ prependOnceListener(event: 'close', listener: () => void): this;
260
+ prependOnceListener(event: 'drain', listener: () => void): this;
261
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
262
+ prependOnceListener(event: 'finish', listener: () => void): this;
263
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
264
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
265
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
175
266
  }
176
267
 
177
268
  class IncomingMessage extends stream.Readable {
node/http2.d.ts CHANGED
@@ -583,7 +583,7 @@ declare module "http2" {
583
583
  }
584
584
 
585
585
  export class Http2ServerRequest extends stream.Readable {
586
- private constructor();
586
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]);
587
587
 
588
588
  readonly aborted: boolean;
589
589
  readonly authority: string;
@@ -651,7 +651,7 @@ declare module "http2" {
651
651
  }
652
652
 
653
653
  export class Http2ServerResponse extends stream.Stream {
654
- private constructor();
654
+ constructor(stream: ServerHttp2Stream);
655
655
 
656
656
  addTrailers(trailers: OutgoingHttpHeaders): void;
657
657
  readonly connection: net.Socket | tls.TLSSocket;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 12.6
1
+ // Type definitions for non-npm package Node.js 12.7
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -36,6 +36,7 @@
36
36
  // Kyle Uehlein <https://github.com/kuehlein>
37
37
  // Jordi Oliveras Rovira <https://github.com/j-oliveras>
38
38
  // Thanik Bhongbhibhat <https://github.com/bhongy>
39
+ // Marcin Kopacz <https://github.com/chyzwar>
39
40
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
40
41
 
41
42
  // NOTE: These definitions support NodeJS and TypeScript 3.2.