@types/node 16.11.68 → 16.18.1

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.
Files changed (107) hide show
  1. {node v16.11 → node v16.18}/LICENSE +0 -0
  2. {node v16.11 → node v16.18}/README.md +1 -1
  3. {node v16.11 → node v16.18}/assert/strict.d.ts +0 -0
  4. {node v16.11/ts4.8 → node v16.18}/assert.d.ts +50 -0
  5. {node v16.11 → node v16.18}/async_hooks.d.ts +0 -0
  6. {node v16.11 → node v16.18}/buffer.d.ts +0 -0
  7. {node v16.11 → node v16.18}/child_process.d.ts +0 -0
  8. {node v16.11 → node v16.18}/cluster.d.ts +0 -0
  9. {node v16.11 → node v16.18}/console.d.ts +0 -0
  10. {node v16.11 → node v16.18}/constants.d.ts +0 -0
  11. {node v16.11 → node v16.18}/crypto.d.ts +0 -0
  12. {node v16.11 → node v16.18}/dgram.d.ts +0 -0
  13. {node v16.11 → node v16.18}/diagnostics_channel.d.ts +0 -0
  14. {node v16.11 → node v16.18}/dns/promises.d.ts +0 -0
  15. {node v16.11 → node v16.18}/dns.d.ts +0 -0
  16. {node v16.11 → node v16.18}/domain.d.ts +0 -0
  17. {node v16.11 → node v16.18}/events.d.ts +0 -0
  18. {node v16.11 → node v16.18}/fs/promises.d.ts +0 -0
  19. {node v16.11 → node v16.18}/fs.d.ts +0 -0
  20. {node v16.11 → node v16.18}/globals.d.ts +0 -0
  21. {node v16.11 → node v16.18}/globals.global.d.ts +0 -0
  22. {node v16.11 → node v16.18}/http.d.ts +7 -0
  23. {node v16.11 → node v16.18}/http2.d.ts +0 -0
  24. {node v16.11 → node v16.18}/https.d.ts +0 -0
  25. {node v16.11 → node v16.18}/index.d.ts +1 -1
  26. {node v16.11 → node v16.18}/inspector.d.ts +0 -0
  27. {node v16.11 → node v16.18}/module.d.ts +0 -0
  28. {node v16.11 → node v16.18}/net.d.ts +5 -0
  29. {node v16.11 → node v16.18}/os.d.ts +0 -0
  30. {node v16.11 → node v16.18}/package.json +2 -2
  31. {node v16.11 → node v16.18}/path.d.ts +0 -0
  32. {node v16.11 → node v16.18}/perf_hooks.d.ts +0 -0
  33. {node v16.11 → node v16.18}/process.d.ts +0 -0
  34. {node v16.11 → node v16.18}/punycode.d.ts +0 -0
  35. {node v16.11 → node v16.18}/querystring.d.ts +0 -0
  36. {node v16.11 → node v16.18}/readline.d.ts +0 -0
  37. {node v16.11 → node v16.18}/repl.d.ts +0 -0
  38. {node v16.11 → node v16.18}/stream/consumers.d.ts +0 -0
  39. {node v16.11 → node v16.18}/stream/promises.d.ts +0 -0
  40. {node v16.11 → node v16.18}/stream/web.d.ts +0 -0
  41. {node v16.11 → node v16.18}/stream.d.ts +0 -0
  42. {node v16.11 → node v16.18}/string_decoder.d.ts +0 -0
  43. {node v16.11 → node v16.18}/test.d.ts +0 -0
  44. {node v16.11 → node v16.18}/timers/promises.d.ts +0 -0
  45. {node v16.11 → node v16.18}/timers.d.ts +0 -0
  46. {node v16.11 → node v16.18}/tls.d.ts +0 -0
  47. {node v16.11 → node v16.18}/trace_events.d.ts +0 -0
  48. {node v16.11 → node v16.18}/ts4.8/assert/strict.d.ts +0 -0
  49. {node v16.11 → node v16.18/ts4.8}/assert.d.ts +50 -0
  50. {node v16.11 → node v16.18}/ts4.8/async_hooks.d.ts +0 -0
  51. {node v16.11 → node v16.18}/ts4.8/buffer.d.ts +0 -0
  52. {node v16.11 → node v16.18}/ts4.8/child_process.d.ts +0 -0
  53. {node v16.11 → node v16.18}/ts4.8/cluster.d.ts +0 -0
  54. {node v16.11 → node v16.18}/ts4.8/console.d.ts +0 -0
  55. {node v16.11 → node v16.18}/ts4.8/constants.d.ts +0 -0
  56. {node v16.11 → node v16.18}/ts4.8/crypto.d.ts +0 -0
  57. {node v16.11 → node v16.18}/ts4.8/dgram.d.ts +0 -0
  58. {node v16.11 → node v16.18}/ts4.8/diagnostics_channel.d.ts +0 -0
  59. {node v16.11 → node v16.18}/ts4.8/dns/promises.d.ts +0 -0
  60. {node v16.11 → node v16.18}/ts4.8/dns.d.ts +0 -0
  61. {node v16.11 → node v16.18}/ts4.8/domain.d.ts +0 -0
  62. {node v16.11 → node v16.18}/ts4.8/events.d.ts +0 -0
  63. {node v16.11 → node v16.18}/ts4.8/fs/promises.d.ts +0 -0
  64. {node v16.11 → node v16.18}/ts4.8/fs.d.ts +0 -0
  65. {node v16.11 → node v16.18}/ts4.8/globals.d.ts +0 -0
  66. {node v16.11 → node v16.18}/ts4.8/globals.global.d.ts +0 -0
  67. {node v16.11 → node v16.18}/ts4.8/http.d.ts +7 -0
  68. {node v16.11 → node v16.18}/ts4.8/http2.d.ts +0 -0
  69. {node v16.11 → node v16.18}/ts4.8/https.d.ts +0 -0
  70. {node v16.11 → node v16.18}/ts4.8/index.d.ts +0 -0
  71. {node v16.11 → node v16.18}/ts4.8/inspector.d.ts +0 -0
  72. {node v16.11 → node v16.18}/ts4.8/module.d.ts +0 -0
  73. {node v16.11 → node v16.18}/ts4.8/net.d.ts +5 -0
  74. {node v16.11 → node v16.18}/ts4.8/os.d.ts +0 -0
  75. {node v16.11 → node v16.18}/ts4.8/path.d.ts +0 -0
  76. {node v16.11 → node v16.18}/ts4.8/perf_hooks.d.ts +0 -0
  77. {node v16.11 → node v16.18}/ts4.8/process.d.ts +0 -0
  78. {node v16.11 → node v16.18}/ts4.8/punycode.d.ts +0 -0
  79. {node v16.11 → node v16.18}/ts4.8/querystring.d.ts +0 -0
  80. {node v16.11 → node v16.18}/ts4.8/readline.d.ts +0 -0
  81. {node v16.11 → node v16.18}/ts4.8/repl.d.ts +0 -0
  82. {node v16.11 → node v16.18}/ts4.8/stream/consumers.d.ts +0 -0
  83. {node v16.11 → node v16.18}/ts4.8/stream/promises.d.ts +0 -0
  84. {node v16.11 → node v16.18}/ts4.8/stream/web.d.ts +0 -0
  85. {node v16.11 → node v16.18}/ts4.8/stream.d.ts +0 -0
  86. {node v16.11 → node v16.18}/ts4.8/string_decoder.d.ts +0 -0
  87. {node v16.11 → node v16.18}/ts4.8/test.d.ts +0 -0
  88. {node v16.11 → node v16.18}/ts4.8/timers/promises.d.ts +0 -0
  89. {node v16.11 → node v16.18}/ts4.8/timers.d.ts +0 -0
  90. {node v16.11 → node v16.18}/ts4.8/tls.d.ts +0 -0
  91. {node v16.11 → node v16.18}/ts4.8/trace_events.d.ts +0 -0
  92. {node v16.11 → node v16.18}/ts4.8/tty.d.ts +0 -0
  93. {node v16.11 → node v16.18}/ts4.8/url.d.ts +0 -0
  94. {node v16.11 → node v16.18}/ts4.8/util.d.ts +0 -0
  95. {node v16.11 → node v16.18}/ts4.8/v8.d.ts +0 -0
  96. {node v16.11 → node v16.18}/ts4.8/vm.d.ts +0 -0
  97. {node v16.11 → node v16.18}/ts4.8/wasi.d.ts +0 -0
  98. {node v16.11 → node v16.18}/ts4.8/worker_threads.d.ts +0 -0
  99. {node v16.11 → node v16.18}/ts4.8/zlib.d.ts +0 -0
  100. {node v16.11 → node v16.18}/tty.d.ts +0 -0
  101. {node v16.11 → node v16.18}/url.d.ts +0 -0
  102. {node v16.11 → node v16.18}/util.d.ts +0 -0
  103. {node v16.11 → node v16.18}/v8.d.ts +0 -0
  104. {node v16.11 → node v16.18}/vm.d.ts +0 -0
  105. {node v16.11 → node v16.18}/wasi.d.ts +0 -0
  106. {node v16.11 → node v16.18}/worker_threads.d.ts +0 -0
  107. {node v16.11 → node v16.18}/zlib.d.ts +0 -0
File without changes
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v16.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 18 Oct 2022 22:03:08 GMT
11
+ * Last updated: Wed, 26 Oct 2022 12:32:49 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
File without changes
@@ -65,6 +65,27 @@ declare module 'assert' {
65
65
  */
66
66
  calls(exact?: number): () => void;
67
67
  calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
68
+ /**
69
+ * Example:
70
+ *
71
+ * ```js
72
+ * import assert from 'node:assert';
73
+ *
74
+ * const tracker = new assert.CallTracker();
75
+ *
76
+ * function func() {}
77
+ * const callsfunc = tracker.calls(func);
78
+ * callsfunc(1, 2, 3);
79
+ *
80
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
81
+ * [{ thisArg: this, arguments: [1, 2, 3 ] }]);
82
+ * ```
83
+ *
84
+ * @since v18.8.0, v16.18.0
85
+ * @params fn
86
+ * @returns An Array with the calls to a tracked function.
87
+ */
88
+ getCalls(fn: Function): CallTrackerCall[];
68
89
  /**
69
90
  * The arrays contains information about the expected and actual number of calls of
70
91
  * the functions that have not been called the expected number of times.
@@ -100,6 +121,31 @@ declare module 'assert' {
100
121
  * @return of objects containing information about the wrapper functions returned by `calls`.
101
122
  */
102
123
  report(): CallTrackerReportInformation[];
124
+ /**
125
+ * Reset calls of the call tracker.
126
+ * If a tracked function is passed as an argument, the calls will be reset for it.
127
+ * If no arguments are passed, all tracked functions will be reset.
128
+ *
129
+ * ```js
130
+ * import assert from 'node:assert';
131
+ *
132
+ * const tracker = new assert.CallTracker();
133
+ *
134
+ * function func() {}
135
+ * const callsfunc = tracker.calls(func);
136
+ *
137
+ * callsfunc();
138
+ * // Tracker was called once
139
+ * tracker.getCalls(callsfunc).length === 1;
140
+ *
141
+ * tracker.reset(callsfunc);
142
+ * tracker.getCalls(callsfunc).length === 0;
143
+ * ```
144
+ *
145
+ * @since v18.8.0, v16.18.0
146
+ * @param fn a tracked function to reset.
147
+ */
148
+ reset(fn?: Function): void;
103
149
  /**
104
150
  * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
105
151
  * have not been called the expected number of times.
@@ -125,6 +171,10 @@ declare module 'assert' {
125
171
  */
126
172
  verify(): void;
127
173
  }
174
+ interface CallTrackerCall {
175
+ thisArg: object;
176
+ arguments: unknown[];
177
+ }
128
178
  interface CallTrackerReportInformation {
129
179
  message: string;
130
180
  /** The actual number of times the function was called. */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1484,6 +1484,13 @@ declare module 'http' {
1484
1484
  */
1485
1485
  function validateHeaderValue(name: string, value: string): void;
1486
1486
 
1487
+ /**
1488
+ * Set the maximum number of idle HTTP parsers. Default: 1000.
1489
+ * @param count
1490
+ * @since v18.8.0, v16.18.0
1491
+ */
1492
+ function setMaxIdleHTTPParsers(count: number): void;
1493
+
1487
1494
  let globalAgent: Agent;
1488
1495
  /**
1489
1496
  * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 16.11
1
+ // Type definitions for non-npm package Node.js 16.18
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
File without changes
File without changes
@@ -266,6 +266,11 @@ declare module 'net' {
266
266
  * @since v0.9.6
267
267
  */
268
268
  readonly localPort?: number;
269
+ /**
270
+ * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
271
+ * @since v18.8.0, v16.18.0
272
+ */
273
+ readonly localFamily?: string;
269
274
  /**
270
275
  * This property represents the state of the connection as a string.
271
276
  * @see {https://nodejs.org/api/net.html#socketreadystate}
File without changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.11.68",
3
+ "version": "16.18.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "cb6e644c57187435318994f754be480cb7e522d2324c649a58434efdc3966aaf",
230
+ "typesPublisherContentHash": "9dafc7cefd3166e78d78bb0f5aa6b99a5d7fadf4a21525d5aded662172321d7a",
231
231
  "typeScriptVersion": "4.1"
232
232
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -65,6 +65,27 @@ declare module 'assert' {
65
65
  */
66
66
  calls(exact?: number): () => void;
67
67
  calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
68
+ /**
69
+ * Example:
70
+ *
71
+ * ```js
72
+ * import assert from 'node:assert';
73
+ *
74
+ * const tracker = new assert.CallTracker();
75
+ *
76
+ * function func() {}
77
+ * const callsfunc = tracker.calls(func);
78
+ * callsfunc(1, 2, 3);
79
+ *
80
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
81
+ * [{ thisArg: this, arguments: [1, 2, 3 ] }]);
82
+ * ```
83
+ *
84
+ * @since v18.8.0, v16.18.0
85
+ * @params fn
86
+ * @returns An Array with the calls to a tracked function.
87
+ */
88
+ getCalls(fn: Function): CallTrackerCall[];
68
89
  /**
69
90
  * The arrays contains information about the expected and actual number of calls of
70
91
  * the functions that have not been called the expected number of times.
@@ -100,6 +121,31 @@ declare module 'assert' {
100
121
  * @return of objects containing information about the wrapper functions returned by `calls`.
101
122
  */
102
123
  report(): CallTrackerReportInformation[];
124
+ /**
125
+ * Reset calls of the call tracker.
126
+ * If a tracked function is passed as an argument, the calls will be reset for it.
127
+ * If no arguments are passed, all tracked functions will be reset.
128
+ *
129
+ * ```js
130
+ * import assert from 'node:assert';
131
+ *
132
+ * const tracker = new assert.CallTracker();
133
+ *
134
+ * function func() {}
135
+ * const callsfunc = tracker.calls(func);
136
+ *
137
+ * callsfunc();
138
+ * // Tracker was called once
139
+ * tracker.getCalls(callsfunc).length === 1;
140
+ *
141
+ * tracker.reset(callsfunc);
142
+ * tracker.getCalls(callsfunc).length === 0;
143
+ * ```
144
+ *
145
+ * @since v18.8.0, v16.18.0
146
+ * @param fn a tracked function to reset.
147
+ */
148
+ reset(fn?: Function): void;
103
149
  /**
104
150
  * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
105
151
  * have not been called the expected number of times.
@@ -125,6 +171,10 @@ declare module 'assert' {
125
171
  */
126
172
  verify(): void;
127
173
  }
174
+ interface CallTrackerCall {
175
+ thisArg: object;
176
+ arguments: unknown[];
177
+ }
128
178
  interface CallTrackerReportInformation {
129
179
  message: string;
130
180
  /** The actual number of times the function was called. */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1484,6 +1484,13 @@ declare module 'http' {
1484
1484
  */
1485
1485
  function validateHeaderValue(name: string, value: string): void;
1486
1486
 
1487
+ /**
1488
+ * Set the maximum number of idle HTTP parsers. Default: 1000.
1489
+ * @param count
1490
+ * @since v18.8.0, v16.18.0
1491
+ */
1492
+ function setMaxIdleHTTPParsers(count: number): void;
1493
+
1487
1494
  let globalAgent: Agent;
1488
1495
  /**
1489
1496
  * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -266,6 +266,11 @@ declare module 'net' {
266
266
  * @since v0.9.6
267
267
  */
268
268
  readonly localPort?: number;
269
+ /**
270
+ * The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
271
+ * @since v18.8.0, v16.18.0
272
+ */
273
+ readonly localFamily?: string;
269
274
  /**
270
275
  * This property represents the state of the connection as a string.
271
276
  * @see {https://nodejs.org/api/net.html#socketreadystate}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes