@types/node 18.19.44 → 18.19.46

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 v18.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 09 Aug 2024 18:08:59 GMT
11
+ * Last updated: Mon, 26 Aug 2024 10:08:35 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v18.19/buffer.d.ts CHANGED
@@ -410,9 +410,9 @@ declare module "buffer" {
410
410
  encoding?: BufferEncoding,
411
411
  ): number;
412
412
  /**
413
- * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together.
413
+ * Returns a new `Buffer` which is the result of concatenating all the `Buffer` instances in the `list` together.
414
414
  *
415
- * If the list has no items, or if the `totalLength` is 0, then a new zero-length`Buffer` is returned.
415
+ * If the list has no items, or if the `totalLength` is 0, then a new zero-length `Buffer` is returned.
416
416
  *
417
417
  * If `totalLength` is not provided, it is calculated from the `Buffer` instances
418
418
  * in `list` by adding their lengths.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.44",
3
+ "version": "18.19.46",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -217,6 +217,6 @@
217
217
  "dependencies": {
218
218
  "undici-types": "~5.26.4"
219
219
  },
220
- "typesPublisherContentHash": "d4e04897ec9bde3e0b6c729e0ab0e4da065a312fc2bf6b83619bd70cfd75353c",
220
+ "typesPublisherContentHash": "3d3f79277d841281ffe50e80f26f8033d3dee017471f8e29382437055f4e870b",
221
221
  "typeScriptVersion": "4.8"
222
222
  }
@@ -145,24 +145,28 @@ declare module "process" {
145
145
  bigint(): bigint;
146
146
  }
147
147
  interface ProcessReport {
148
+ /**
149
+ * Write reports in a compact format, single-line JSON, more easily consumable by log processing systems
150
+ * than the default multi-line format designed for human consumption.
151
+ * @since v13.12.0, v12.17.0
152
+ */
153
+ compact: boolean;
148
154
  /**
149
155
  * Directory where the report is written.
156
+ * The default value is the empty string, indicating that reports are written to the current
150
157
  * working directory of the Node.js process.
151
- * @default '' indicating that reports are written to the current
152
158
  */
153
159
  directory: string;
154
160
  /**
155
- * Filename where the report is written.
156
- * The default value is the empty string.
157
- * @default '' the output filename will be comprised of a timestamp,
158
- * PID, and sequence number.
161
+ * Filename where the report is written. If set to the empty string, the output filename will be comprised
162
+ * of a timestamp, PID, and sequence number. The default value is the empty string.
159
163
  */
160
164
  filename: string;
161
165
  /**
162
- * Returns a JSON-formatted diagnostic report for the running process.
163
- * The report's JavaScript stack trace is taken from err, if present.
166
+ * Returns a JavaScript Object representation of a diagnostic report for the running process.
167
+ * The report's JavaScript stack trace is taken from `err`, if present.
164
168
  */
165
- getReport(err?: Error): string;
169
+ getReport(err?: Error): object;
166
170
  /**
167
171
  * If true, a diagnostic report is generated on fatal errors,
168
172
  * such as out of memory errors or failed C++ assertions.
@@ -188,18 +192,19 @@ declare module "process" {
188
192
  /**
189
193
  * Writes a diagnostic report to a file. If filename is not provided, the default filename
190
194
  * includes the date, time, PID, and a sequence number.
191
- * The report's JavaScript stack trace is taken from err, if present.
195
+ * The report's JavaScript stack trace is taken from `err`, if present.
192
196
  *
197
+ * If the value of filename is set to `'stdout'` or `'stderr'`, the report is written
198
+ * to the stdout or stderr of the process respectively.
193
199
  * @param fileName Name of the file where the report is written.
194
200
  * This should be a relative path, that will be appended to the directory specified in
195
201
  * `process.report.directory`, or the current working directory of the Node.js process,
196
202
  * if unspecified.
197
- * @param error A custom error used for reporting the JavaScript stack.
203
+ * @param err A custom error used for reporting the JavaScript stack.
198
204
  * @return Filename of the generated report.
199
205
  */
200
- writeReport(fileName?: string): string;
201
- writeReport(error?: Error): string;
202
206
  writeReport(fileName?: string, err?: Error): string;
207
+ writeReport(err?: Error): string;
203
208
  }
204
209
  interface ResourceUsage {
205
210
  fsRead: number;
@@ -1402,11 +1407,11 @@ declare module "process" {
1402
1407
  */
1403
1408
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
1404
1409
  /**
1405
- * `process.report` is an object whose methods are used to generate diagnostic
1406
- * reports for the current process. Additional documentation is available in the `report documentation`.
1410
+ * `process.report` is an object whose methods are used to generate diagnostic reports for the current process.
1411
+ * Additional documentation is available in the [report documentation](https://nodejs.org/docs/latest-v18.x/api/report.html).
1407
1412
  * @since v11.8.0
1408
1413
  */
1409
- report?: ProcessReport | undefined;
1414
+ report: ProcessReport;
1410
1415
  /**
1411
1416
  * ```js
1412
1417
  * import { resourceUsage } from 'process';