@types/node 14.14.19 → 14.14.20

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: Fri, 01 Jan 2021 17:54:22 GMT
11
+ * Last updated: Mon, 04 Jan 2021 20:50:23 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `__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), [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), [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), [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), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), and [Victor Perin](https://github.com/victorperin).
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), [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), [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), [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), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
node/child_process.d.ts CHANGED
@@ -44,42 +44,42 @@ declare module "child_process" {
44
44
  */
45
45
 
46
46
  addListener(event: string, listener: (...args: any[]) => void): this;
47
- addListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
47
+ addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
48
48
  addListener(event: "disconnect", listener: () => void): this;
49
49
  addListener(event: "error", listener: (err: Error) => void): this;
50
50
  addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
51
51
  addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
52
52
 
53
53
  emit(event: string | symbol, ...args: any[]): boolean;
54
- emit(event: "close", code: number, signal: NodeJS.Signals): boolean;
54
+ emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
55
55
  emit(event: "disconnect"): boolean;
56
56
  emit(event: "error", err: Error): boolean;
57
57
  emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
58
58
  emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
59
59
 
60
60
  on(event: string, listener: (...args: any[]) => void): this;
61
- on(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
61
+ on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
62
62
  on(event: "disconnect", listener: () => void): this;
63
63
  on(event: "error", listener: (err: Error) => void): this;
64
64
  on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
65
65
  on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
66
66
 
67
67
  once(event: string, listener: (...args: any[]) => void): this;
68
- once(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
68
+ once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
69
69
  once(event: "disconnect", listener: () => void): this;
70
70
  once(event: "error", listener: (err: Error) => void): this;
71
71
  once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
72
72
  once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
73
73
 
74
74
  prependListener(event: string, listener: (...args: any[]) => void): this;
75
- prependListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
75
+ prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
76
76
  prependListener(event: "disconnect", listener: () => void): this;
77
77
  prependListener(event: "error", listener: (err: Error) => void): this;
78
78
  prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
79
79
  prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
80
80
 
81
81
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
82
- prependOnceListener(event: "close", listener: (code: number, signal: NodeJS.Signals) => void): this;
82
+ prependOnceListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
83
83
  prependOnceListener(event: "disconnect", listener: () => void): this;
84
84
  prependOnceListener(event: "error", listener: (err: Error) => void): this;
85
85
  prependOnceListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
node/crypto.d.ts CHANGED
@@ -2,12 +2,30 @@ declare module 'crypto' {
2
2
  import * as stream from 'stream';
3
3
 
4
4
  interface Certificate {
5
+ /**
6
+ * @param spkac
7
+ * @returns The challenge component of the `spkac` data structure,
8
+ * which includes a public key and a challenge.
9
+ */
5
10
  exportChallenge(spkac: BinaryLike): Buffer;
6
- exportPublicKey(spkac: BinaryLike): Buffer;
11
+ /**
12
+ * @param spkac
13
+ * @param encoding The encoding of the spkac string.
14
+ * @returns The public key component of the `spkac` data structure,
15
+ * which includes a public key and a challenge.
16
+ */
17
+ exportPublicKey(spkac: BinaryLike, encoding?: string): Buffer;
18
+ /**
19
+ * @param spkac
20
+ * @returns `true` if the given `spkac` data structure is valid,
21
+ * `false` otherwise.
22
+ */
7
23
  verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
8
24
  }
9
- const Certificate: {
25
+ const Certificate: Certificate & {
26
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
10
27
  new (): Certificate;
28
+ /** @deprecated since v14.9.0 - Use static methods of `crypto.Certificate` instead. */
11
29
  (): Certificate;
12
30
  };
13
31
 
node/dns.d.ts CHANGED
@@ -277,8 +277,8 @@ declare module "dns" {
277
277
  const CANCELLED: string;
278
278
 
279
279
  class Resolver {
280
+ cancel(): void;
280
281
  getServers: typeof getServers;
281
- setServers: typeof setServers;
282
282
  resolve: typeof resolve;
283
283
  resolve4: typeof resolve4;
284
284
  resolve6: typeof resolve6;
@@ -292,7 +292,8 @@ declare module "dns" {
292
292
  resolveSrv: typeof resolveSrv;
293
293
  resolveTxt: typeof resolveTxt;
294
294
  reverse: typeof reverse;
295
- cancel(): void;
295
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
296
+ setServers: typeof setServers;
296
297
  }
297
298
 
298
299
  namespace promises {
@@ -351,6 +352,7 @@ declare module "dns" {
351
352
  function setServers(servers: ReadonlyArray<string>): void;
352
353
 
353
354
  class Resolver {
355
+ cancel(): void;
354
356
  getServers: typeof getServers;
355
357
  resolve: typeof resolve;
356
358
  resolve4: typeof resolve4;
@@ -365,6 +367,7 @@ declare module "dns" {
365
367
  resolveSrv: typeof resolveSrv;
366
368
  resolveTxt: typeof resolveTxt;
367
369
  reverse: typeof reverse;
370
+ setLocalAddress(ipv4?: string, ipv6?: string): void;
368
371
  setServers: typeof setServers;
369
372
  }
370
373
  }
node/http.d.ts CHANGED
@@ -220,6 +220,7 @@ declare module "http" {
220
220
 
221
221
  method: string;
222
222
  path: string;
223
+ /** @deprecated since v14.1.0 Use `request.destroy()` instead. */
223
224
  abort(): void;
224
225
  onSocket(socket: Socket): void;
225
226
  setTimeout(timeout: number, callback?: () => void): this;
@@ -316,7 +317,7 @@ declare module "http" {
316
317
  httpVersionMinor: number;
317
318
  complete: boolean;
318
319
  /**
319
- * @deprecate Use `socket` instead.
320
+ * @deprecated since v13.0.0 - Use `socket` instead.
320
321
  */
321
322
  connection: Socket;
322
323
  socket: Socket;
node/index.d.ts CHANGED
@@ -44,6 +44,7 @@
44
44
  // Anna Henningsen <https://github.com/addaleax>
45
45
  // Jason Kwok <https://github.com/JasonHK>
46
46
  // Victor Perin <https://github.com/victorperin>
47
+ // Yongsheng Zhang <https://github.com/ZYSzys>
47
48
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
48
49
 
49
50
  // NOTE: These definitions support NodeJS and TypeScript 3.7.
node/net.d.ts CHANGED
@@ -75,6 +75,7 @@ declare module "net" {
75
75
  unref(): this;
76
76
  ref(): this;
77
77
 
78
+ /** @deprecated since v14.6.0 - Use `writableLength` instead. */
78
79
  readonly bufferSize: number;
79
80
  readonly bytesRead: number;
80
81
  readonly bytesWritten: number;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.14.19",
3
+ "version": "14.14.20",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -223,6 +223,11 @@
223
223
  "name": "Victor Perin",
224
224
  "url": "https://github.com/victorperin",
225
225
  "githubUsername": "victorperin"
226
+ },
227
+ {
228
+ "name": "Yongsheng Zhang",
229
+ "url": "https://github.com/ZYSzys",
230
+ "githubUsername": "ZYSzys"
226
231
  }
227
232
  ],
228
233
  "main": "",
@@ -246,6 +251,6 @@
246
251
  },
247
252
  "scripts": {},
248
253
  "dependencies": {},
249
- "typesPublisherContentHash": "0b1cc7b347b292112956e6157d8d82db542ddc4acda85a8acca403cb1837cc6e",
254
+ "typesPublisherContentHash": "3ec100758f9a98f40ade23fd5781e233afe6427322127911c2b9a87c70fe396b",
250
255
  "typeScriptVersion": "3.3"
251
256
  }
node/url.d.ts CHANGED
@@ -40,13 +40,19 @@ declare module "url" {
40
40
  query: string | null;
41
41
  }
42
42
 
43
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
43
44
  function parse(urlStr: string): UrlWithStringQuery;
45
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
44
46
  function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
47
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
45
48
  function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
49
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
46
50
  function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
47
51
 
48
52
  function format(URL: URL, options?: URLFormatOptions): string;
53
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
49
54
  function format(urlObject: UrlObject | string): string;
55
+ /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50
56
  function resolve(from: string, to: string): string;
51
57
 
52
58
  function domainToASCII(domain: string): string;