@types/node 12.12.10 → 12.12.14

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: Tue, 19 Nov 2019 19:13:13 GMT
11
+ * Last updated: Mon, 25 Nov 2019 22:58:16 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), Mohsen Azimi (https://github.com/mohsen1), Nicolas Even (https://github.com/n-e), Nicolas Voigt (https://github.com/octo-sniffle), Nikita Galkin (https://github.com/galkin), 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), Trivikram Kamat (https://github.com/trivikr), and Minh Son Nguyen (https://github.com/nguymin4).
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), Mohsen Azimi (https://github.com/mohsen1), Nicolas Even (https://github.com/n-e), Nicolas Voigt (https://github.com/octo-sniffle), Nikita Galkin (https://github.com/galkin), 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), Trivikram Kamat (https://github.com/trivikr), Minh Son Nguyen (https://github.com/nguymin4), Junxiao Shi (https://github.com/yoursunny), and Ilia Baryshnikov (https://github.com/qwelias).
node/child_process.d.ts CHANGED
@@ -18,7 +18,7 @@ declare module "child_process" {
18
18
  readonly killed: boolean;
19
19
  readonly pid: number;
20
20
  readonly connected: boolean;
21
- kill(signal?: string): void;
21
+ kill(signal?: NodeJS.Signals | number): void;
22
22
  send(message: any, callback?: (error: Error | null) => void): boolean;
23
23
  send(message: any, sendHandle?: net.Socket | net.Server, callback?: (error: Error | null) => void): boolean;
24
24
  send(message: any, sendHandle?: net.Socket | net.Server, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
@@ -36,45 +36,45 @@ declare module "child_process" {
36
36
  */
37
37
 
38
38
  addListener(event: string, listener: (...args: any[]) => void): this;
39
- addListener(event: "close", listener: (code: number, signal: string) => void): this;
39
+ addListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
40
40
  addListener(event: "disconnect", listener: () => void): this;
41
41
  addListener(event: "error", listener: (err: Error) => void): this;
42
- addListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
42
+ addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
43
43
  addListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
44
44
 
45
45
  emit(event: string | symbol, ...args: any[]): boolean;
46
- emit(event: "close", code: number, signal: string): boolean;
46
+ emit(event: "close", code: number, signal: NodeJS.Signals): boolean;
47
47
  emit(event: "disconnect"): boolean;
48
48
  emit(event: "error", err: Error): boolean;
49
- emit(event: "exit", code: number | null, signal: string | null): boolean;
49
+ emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
50
50
  emit(event: "message", message: any, sendHandle: net.Socket | net.Server): boolean;
51
51
 
52
52
  on(event: string, listener: (...args: any[]) => void): this;
53
- on(event: "close", listener: (code: number, signal: string) => void): this;
53
+ on(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
54
54
  on(event: "disconnect", listener: () => void): this;
55
55
  on(event: "error", listener: (err: Error) => void): this;
56
- on(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
56
+ on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
57
57
  on(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
58
58
 
59
59
  once(event: string, listener: (...args: any[]) => void): this;
60
- once(event: "close", listener: (code: number, signal: string) => void): this;
60
+ once(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
61
61
  once(event: "disconnect", listener: () => void): this;
62
62
  once(event: "error", listener: (err: Error) => void): this;
63
- once(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
63
+ once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
64
64
  once(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
65
65
 
66
66
  prependListener(event: string, listener: (...args: any[]) => void): this;
67
- prependListener(event: "close", listener: (code: number, signal: string) => void): this;
67
+ prependListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
68
68
  prependListener(event: "disconnect", listener: () => void): this;
69
69
  prependListener(event: "error", listener: (err: Error) => void): this;
70
- prependListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
70
+ prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
71
71
  prependListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
72
72
 
73
73
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
74
- prependOnceListener(event: "close", listener: (code: number, signal: string) => void): this;
74
+ prependOnceListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
75
75
  prependOnceListener(event: "disconnect", listener: () => void): this;
76
76
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
77
- prependOnceListener(event: "exit", listener: (code: number | null, signal: string | null) => void): this;
77
+ prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
78
78
  prependOnceListener(event: "message", listener: (message: any, sendHandle: net.Socket | net.Server) => void): this;
79
79
  }
80
80
 
@@ -244,7 +244,7 @@ declare module "child_process" {
244
244
  interface ExecOptions extends CommonOptions {
245
245
  shell?: string;
246
246
  maxBuffer?: number;
247
- killSignal?: string;
247
+ killSignal?: NodeJS.Signals | number;
248
248
  }
249
249
 
250
250
  interface ExecOptionsWithStringEncoding extends ExecOptions {
@@ -259,7 +259,7 @@ declare module "child_process" {
259
259
  cmd?: string;
260
260
  killed?: boolean;
261
261
  code?: number;
262
- signal?: string;
262
+ signal?: NodeJS.Signals;
263
263
  }
264
264
 
265
265
  // no `options` definitely means stdout/stderr are `string`.
@@ -300,7 +300,7 @@ declare module "child_process" {
300
300
 
301
301
  interface ExecFileOptions extends CommonOptions {
302
302
  maxBuffer?: number;
303
- killSignal?: string;
303
+ killSignal?: NodeJS.Signals | number;
304
304
  windowsVerbatimArguments?: boolean;
305
305
  shell?: boolean | string;
306
306
  }
@@ -406,7 +406,7 @@ declare module "child_process" {
406
406
  argv0?: string; // Not specified in the docs
407
407
  input?: string | NodeJS.ArrayBufferView;
408
408
  stdio?: StdioOptions;
409
- killSignal?: string | number;
409
+ killSignal?: NodeJS.Signals | number;
410
410
  maxBuffer?: number;
411
411
  encoding?: string;
412
412
  shell?: boolean | string;
@@ -424,7 +424,7 @@ declare module "child_process" {
424
424
  stdout: T;
425
425
  stderr: T;
426
426
  status: number | null;
427
- signal: string | null;
427
+ signal: NodeJS.Signals | null;
428
428
  error?: Error;
429
429
  }
430
430
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
@@ -439,7 +439,7 @@ declare module "child_process" {
439
439
  input?: string | Uint8Array;
440
440
  stdio?: StdioOptions;
441
441
  shell?: string;
442
- killSignal?: string | number;
442
+ killSignal?: NodeJS.Signals | number;
443
443
  maxBuffer?: number;
444
444
  encoding?: string;
445
445
  }
@@ -457,7 +457,7 @@ declare module "child_process" {
457
457
  interface ExecFileSyncOptions extends CommonOptions {
458
458
  input?: string | NodeJS.ArrayBufferView;
459
459
  stdio?: StdioOptions;
460
- killSignal?: string | number;
460
+ killSignal?: NodeJS.Signals | number;
461
461
  maxBuffer?: number;
462
462
  encoding?: string;
463
463
  shell?: boolean | string;
node/crypto.d.ts CHANGED
@@ -220,11 +220,11 @@ declare module "crypto" {
220
220
  setAAD(buffer: Buffer, options?: { plaintextLength: number }): this;
221
221
  getAuthTag(): Buffer;
222
222
  }
223
- /** @deprecated since v10.0.0 use createCipheriv() */
223
+ /** @deprecated since v10.0.0 use createDecipheriv() */
224
224
  function createDecipher(algorithm: CipherCCMTypes, password: BinaryLike, options: CipherCCMOptions): DecipherCCM;
225
- /** @deprecated since v10.0.0 use createCipheriv() */
225
+ /** @deprecated since v10.0.0 use createDecipheriv() */
226
226
  function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
227
- /** @deprecated since v10.0.0 use createCipheriv() */
227
+ /** @deprecated since v10.0.0 use createDecipheriv() */
228
228
  function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
229
229
 
230
230
  function createDecipheriv(
node/dgram.d.ts CHANGED
@@ -11,9 +11,10 @@ declare module "dgram" {
11
11
  }
12
12
 
13
13
  interface BindOptions {
14
- port: number;
14
+ port?: number;
15
15
  address?: string;
16
16
  exclusive?: boolean;
17
+ fd?: number;
17
18
  }
18
19
 
19
20
  type SocketType = "udp4" | "udp6";
@@ -34,67 +35,82 @@ declare module "dgram" {
34
35
  function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
35
36
 
36
37
  class Socket extends events.EventEmitter {
37
- send(msg: string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
38
- send(msg: string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
38
+ addMembership(multicastAddress: string, multicastInterface?: string): void;
39
+ address(): AddressInfo;
39
40
  bind(port?: number, address?: string, callback?: () => void): void;
40
41
  bind(port?: number, callback?: () => void): void;
41
42
  bind(callback?: () => void): void;
42
43
  bind(options: BindOptions, callback?: () => void): void;
43
44
  close(callback?: () => void): void;
44
- address(): AddressInfo | string;
45
+ connect(port: number, address?: string, callback?: () => void): void;
46
+ connect(port: number, callback: () => void): void;
47
+ disconnect(): void;
48
+ dropMembership(multicastAddress: string, multicastInterface?: string): void;
49
+ getRecvBufferSize(): number;
50
+ getSendBufferSize(): number;
51
+ ref(): this;
52
+ remoteAddress(): AddressInfo;
53
+ send(msg: string | Uint8Array | any[], port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54
+ send(msg: string | Uint8Array | any[], port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55
+ send(msg: string | Uint8Array | any[], callback?: (error: Error | null, bytes: number) => void): void;
56
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
57
+ send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
58
+ send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
45
59
  setBroadcast(flag: boolean): void;
46
- setTTL(ttl: number): void;
47
- setMulticastTTL(ttl: number): void;
48
60
  setMulticastInterface(multicastInterface: string): void;
49
61
  setMulticastLoopback(flag: boolean): void;
50
- addMembership(multicastAddress: string, multicastInterface?: string): void;
51
- dropMembership(multicastAddress: string, multicastInterface?: string): void;
52
- ref(): this;
53
- unref(): this;
62
+ setMulticastTTL(ttl: number): void;
54
63
  setRecvBufferSize(size: number): void;
55
64
  setSendBufferSize(size: number): void;
56
- getRecvBufferSize(): number;
57
- getSendBufferSize(): number;
65
+ setTTL(ttl: number): void;
66
+ unref(): this;
58
67
 
59
68
  /**
60
69
  * events.EventEmitter
61
70
  * 1. close
62
- * 2. error
63
- * 3. listening
64
- * 4. message
71
+ * 2. connect
72
+ * 3. error
73
+ * 4. listening
74
+ * 5. message
65
75
  */
66
76
  addListener(event: string, listener: (...args: any[]) => void): this;
67
77
  addListener(event: "close", listener: () => void): this;
78
+ addListener(event: "connect", listener: () => void): this;
68
79
  addListener(event: "error", listener: (err: Error) => void): this;
69
80
  addListener(event: "listening", listener: () => void): this;
70
81
  addListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
71
82
 
72
83
  emit(event: string | symbol, ...args: any[]): boolean;
73
84
  emit(event: "close"): boolean;
85
+ emit(event: "connect"): boolean;
74
86
  emit(event: "error", err: Error): boolean;
75
87
  emit(event: "listening"): boolean;
76
88
  emit(event: "message", msg: Buffer, rinfo: RemoteInfo): boolean;
77
89
 
78
90
  on(event: string, listener: (...args: any[]) => void): this;
79
91
  on(event: "close", listener: () => void): this;
92
+ on(event: "connect", listener: () => void): this;
80
93
  on(event: "error", listener: (err: Error) => void): this;
81
94
  on(event: "listening", listener: () => void): this;
82
95
  on(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
83
96
 
84
97
  once(event: string, listener: (...args: any[]) => void): this;
85
98
  once(event: "close", listener: () => void): this;
99
+ once(event: "connect", listener: () => void): this;
86
100
  once(event: "error", listener: (err: Error) => void): this;
87
101
  once(event: "listening", listener: () => void): this;
88
102
  once(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
89
103
 
90
104
  prependListener(event: string, listener: (...args: any[]) => void): this;
91
105
  prependListener(event: "close", listener: () => void): this;
106
+ prependListener(event: "connect", listener: () => void): this;
92
107
  prependListener(event: "error", listener: (err: Error) => void): this;
93
108
  prependListener(event: "listening", listener: () => void): this;
94
109
  prependListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
95
110
 
96
111
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
97
112
  prependOnceListener(event: "close", listener: () => void): this;
113
+ prependOnceListener(event: "connect", listener: () => void): this;
98
114
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
99
115
  prependOnceListener(event: "listening", listener: () => void): this;
100
116
  prependOnceListener(event: "message", listener: (msg: Buffer, rinfo: RemoteInfo) => void): this;
node/http.d.ts CHANGED
@@ -157,6 +157,7 @@ declare module "http" {
157
157
  writeContinue(callback?: () => void): void;
158
158
  writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this;
159
159
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
160
+ writeProcessing(): void;
160
161
  }
161
162
 
162
163
  interface InformationEvent {
node/index.d.ts CHANGED
@@ -39,6 +39,8 @@
39
39
  // Marcin Kopacz <https://github.com/chyzwar>
40
40
  // Trivikram Kamat <https://github.com/trivikr>
41
41
  // Minh Son Nguyen <https://github.com/nguymin4>
42
+ // Junxiao Shi <https://github.com/yoursunny>
43
+ // Ilia Baryshnikov <https://github.com/qwelias>
42
44
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
43
45
 
44
46
  // 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.12.10",
3
+ "version": "12.12.14",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -198,6 +198,16 @@
198
198
  "name": "Minh Son Nguyen",
199
199
  "url": "https://github.com/nguymin4",
200
200
  "githubUsername": "nguymin4"
201
+ },
202
+ {
203
+ "name": "Junxiao Shi",
204
+ "url": "https://github.com/yoursunny",
205
+ "githubUsername": "yoursunny"
206
+ },
207
+ {
208
+ "name": "Ilia Baryshnikov",
209
+ "url": "https://github.com/qwelias",
210
+ "githubUsername": "qwelias"
201
211
  }
202
212
  ],
203
213
  "main": "",
@@ -216,6 +226,6 @@
216
226
  },
217
227
  "scripts": {},
218
228
  "dependencies": {},
219
- "typesPublisherContentHash": "eb640e093764fffdc880df4e69e65ee3455876b9f18b017cf63d6fa1cfb3929f",
229
+ "typesPublisherContentHash": "305a8ff81632f0e70287898475e87d6aedbd683a5e37cb775f9ea845625cfa06",
220
230
  "typeScriptVersion": "2.8"
221
231
  }