@types/node 14.11.1 → 14.11.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,7 +8,7 @@ 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: Thu, 17 Sep 2020 18:22:23 GMT
11
+ * Last updated: Tue, 06 Oct 2020 05:46:06 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
 
node/assert.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "assert" {
1
+ declare module 'assert' {
2
2
  /** An alias of `assert.ok()`. */
3
3
  function assert(value: any, message?: string | Error): asserts value;
4
4
  namespace assert {
@@ -21,7 +21,7 @@ declare module "assert" {
21
21
  /** The `operator` property on the error instance. */
22
22
  operator?: string;
23
23
  /** If provided, the generated stack trace omits frames before this function. */
24
- stackStartFn?: Function
24
+ stackStartFn?: Function;
25
25
  });
26
26
  }
27
27
 
@@ -43,11 +43,17 @@ declare module "assert" {
43
43
  stack: object;
44
44
  }
45
45
 
46
- type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
46
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
47
47
 
48
48
  function fail(message?: string | Error): never;
49
49
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
50
- function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
50
+ function fail(
51
+ actual: any,
52
+ expected: any,
53
+ message?: string | Error,
54
+ operator?: string,
55
+ stackStartFn?: Function,
56
+ ): never;
51
57
  function ok(value: any, message?: string | Error): asserts value;
52
58
  /** @deprecated since v9.9.0 - use strictEqual() instead. */
53
59
  function equal(actual: any, expected: any, message?: string | Error): void;
@@ -70,9 +76,17 @@ declare module "assert" {
70
76
  function ifError(value: any): asserts value is null | undefined;
71
77
 
72
78
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
73
- function rejects(block: (() => Promise<any>) | Promise<any>, error: AssertPredicate, message?: string | Error): Promise<void>;
79
+ function rejects(
80
+ block: (() => Promise<any>) | Promise<any>,
81
+ error: AssertPredicate,
82
+ message?: string | Error,
83
+ ): Promise<void>;
74
84
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
75
- function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
85
+ function doesNotReject(
86
+ block: (() => Promise<any>) | Promise<any>,
87
+ error: RegExp | Function,
88
+ message?: string | Error,
89
+ ): Promise<void>;
76
90
 
77
91
  function match(value: string, regExp: RegExp, message?: string | Error): void;
78
92
  function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
node/http.d.ts CHANGED
@@ -160,8 +160,8 @@ declare module "http" {
160
160
  /**
161
161
  * @deprecate Use `socket` instead.
162
162
  */
163
- connection: Socket;
164
- socket: Socket;
163
+ connection: Socket | null;
164
+ socket: Socket | null;
165
165
 
166
166
  constructor();
167
167
 
@@ -205,8 +205,6 @@ declare module "http" {
205
205
 
206
206
  // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
207
207
  class ClientRequest extends OutgoingMessage {
208
- connection: Socket;
209
- socket: Socket;
210
208
  aborted: number;
211
209
 
212
210
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
@@ -351,6 +349,10 @@ declare module "http" {
351
349
  * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
352
350
  */
353
351
  maxSockets?: number;
352
+ /**
353
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
354
+ */
355
+ maxTotalSockets?: number;
354
356
  /**
355
357
  * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
356
358
  */
@@ -359,6 +361,10 @@ declare module "http" {
359
361
  * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
360
362
  */
361
363
  timeout?: number;
364
+ /**
365
+ * Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
366
+ */
367
+ scheduling?: 'fifo' | 'lifo';
362
368
  }
363
369
 
364
370
  class Agent {
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.11.1",
3
+ "version": "14.11.5",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -246,6 +246,6 @@
246
246
  },
247
247
  "scripts": {},
248
248
  "dependencies": {},
249
- "typesPublisherContentHash": "9c70727f96ff4b42df35727bea7b55df2239ce097878ea3e75322ca3d8403616",
249
+ "typesPublisherContentHash": "5e34ee10bcfbd6459166c194b3c6ba92abd61512eb102d4c4365c95af0c67dbc",
250
250
  "typeScriptVersion": "3.2"
251
251
  }
node/ts3.4/assert.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module "assert" {
1
+ declare module 'assert' {
2
2
  function assert(value: any, message?: string | Error): void;
3
3
  namespace assert {
4
4
  class AssertionError implements Error {
@@ -11,16 +11,25 @@ declare module "assert" {
11
11
  code: 'ERR_ASSERTION';
12
12
 
13
13
  constructor(options?: {
14
- message?: string; actual?: any; expected?: any;
15
- operator?: string; stackStartFn?: Function
14
+ message?: string;
15
+ actual?: any;
16
+ expected?: any;
17
+ operator?: string;
18
+ stackStartFn?: Function;
16
19
  });
17
20
  }
18
21
 
19
- type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
22
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
20
23
 
21
24
  function fail(message?: string | Error): never;
22
25
  /** @deprecated since v10.0.0 - use `fail([message])` or other assert functions instead. */
23
- function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
26
+ function fail(
27
+ actual: any,
28
+ expected: any,
29
+ message?: string | Error,
30
+ operator?: string,
31
+ stackStartFn?: Function,
32
+ ): never;
24
33
  function ok(value: any, message?: string | Error): void;
25
34
  /** @deprecated since v9.9.0 - use `strictEqual()` instead. */
26
35
  function equal(actual: any, expected: any, message?: string | Error): void;
@@ -43,9 +52,17 @@ declare module "assert" {
43
52
  function ifError(value: any): void;
44
53
 
45
54
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
46
- function rejects(block: (() => Promise<any>) | Promise<any>, error: AssertPredicate, message?: string | Error): Promise<void>;
55
+ function rejects(
56
+ block: (() => Promise<any>) | Promise<any>,
57
+ error: AssertPredicate,
58
+ message?: string | Error,
59
+ ): Promise<void>;
47
60
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
48
- function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
61
+ function doesNotReject(
62
+ block: (() => Promise<any>) | Promise<any>,
63
+ error: RegExp | Function,
64
+ message?: string | Error,
65
+ ): Promise<void>;
49
66
 
50
67
  function match(value: string, regExp: RegExp, message?: string | Error): void;
51
68
  function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
node/wasi.d.ts CHANGED
@@ -6,11 +6,13 @@ declare module 'wasi' {
6
6
  * WASI command itself.
7
7
  */
8
8
  args?: string[];
9
+
9
10
  /**
10
11
  * An object similar to `process.env` that the WebAssembly
11
12
  * application will see as its environment.
12
13
  */
13
14
  env?: object;
15
+
14
16
  /**
15
17
  * This object represents the WebAssembly application's
16
18
  * sandbox directory structure. The string keys of `preopens` are treated as
@@ -27,6 +29,24 @@ declare module 'wasi' {
27
29
  * @default false
28
30
  */
29
31
  returnOnExit?: boolean;
32
+
33
+ /**
34
+ * The file descriptor used as standard input in the WebAssembly application.
35
+ * @default 0
36
+ */
37
+ stdin?: number;
38
+
39
+ /**
40
+ * The file descriptor used as standard output in the WebAssembly application.
41
+ * @default 1
42
+ */
43
+ stdout?: number;
44
+
45
+ /**
46
+ * The file descriptor used as standard error in the WebAssembly application.
47
+ * @default 2
48
+ */
49
+ stderr?: number;
30
50
  }
31
51
 
32
52
  class WASI {
@@ -40,11 +60,25 @@ declare module 'wasi' {
40
60
  *
41
61
  * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
42
62
  * `memory`. If `instance` does not have a `memory` export an exception is thrown.
63
+ *
64
+ * If `start()` is called more than once, an exception is thrown.
43
65
  */
44
66
  start(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
67
+
68
+ /**
69
+ * Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present.
70
+ * If `instance` contains a `_start()` export, then an exception is thrown.
71
+ *
72
+ * `start()` requires that `instance` exports a [`WebAssembly.Memory`][] named
73
+ * `memory`. If `instance` does not have a `memory` export an exception is thrown.
74
+ *
75
+ * If `initialize()` is called more than once, an exception is thrown.
76
+ */
77
+ initialize(instance: object): void; // TODO: avoid DOM dependency until WASM moved to own lib.
78
+
45
79
  /**
46
80
  * Is an object that implements the WASI system call API. This object
47
- * should be passed as the `wasi_unstable` import during the instantiation of a
81
+ * should be passed as the `wasi_snapshot_preview1` import during the instantiation of a
48
82
  * [`WebAssembly.Instance`][].
49
83
  */
50
84
  readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
node/zlib.d.ts CHANGED
@@ -19,6 +19,8 @@ declare module "zlib" {
19
19
  memLevel?: number; // compression only
20
20
  strategy?: number; // compression only
21
21
  dictionary?: NodeJS.ArrayBufferView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
22
+ info?: boolean;
23
+ maxOutputLength?: number;
22
24
  }
23
25
 
24
26
  interface BrotliOptions {
@@ -40,6 +42,7 @@ declare module "zlib" {
40
42
  */
41
43
  [key: number]: boolean | number;
42
44
  };
45
+ maxOutputLength?: number;
43
46
  }
44
47
 
45
48
  interface Zlib {