@types/node 11.11.8 → 11.12.0

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 (5) hide show
  1. node/README.md +1 -1
  2. node/globals.d.ts +70 -0
  3. node/index.d.ts +1 -1
  4. node/package.json +2 -2
  5. node/util.d.ts +4 -0
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: Tue, 26 Mar 2019 16:09:25 GMT
11
+ * Last updated: Tue, 26 Mar 2019 20:23:36 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
 
node/globals.d.ts CHANGED
@@ -734,6 +734,71 @@ declare namespace NodeJS {
734
734
  (time?: [number, number]): [number, number];
735
735
  }
736
736
 
737
+ interface ProcessReport {
738
+ /**
739
+ * Directory where the report is written.
740
+ * working directory of the Node.js process.
741
+ * @default '' indicating that reports are written to the current
742
+ */
743
+ directory: string;
744
+
745
+ /**
746
+ * Filename where the report is written.
747
+ * The default value is the empty string.
748
+ * @default '' the output filename will be comprised of a timestamp,
749
+ * PID, and sequence number.
750
+ */
751
+ filename: string;
752
+
753
+ /**
754
+ * Returns a JSON-formatted diagnostic report for the running process.
755
+ * The report's JavaScript stack trace is taken from err, if present.
756
+ */
757
+ getReport(err?: Error): string;
758
+
759
+ /**
760
+ * If true, a diagnostic report is generated on fatal errors,
761
+ * such as out of memory errors or failed C++ assertions.
762
+ * @default false
763
+ */
764
+ reportOnFatalError: boolean;
765
+
766
+ /**
767
+ * If true, a diagnostic report is generated when the process
768
+ * receives the signal specified by process.report.signal.
769
+ * @defaul false
770
+ */
771
+ reportOnSignal: boolean;
772
+
773
+ /**
774
+ * If true, a diagnostic report is generated on uncaught exception.
775
+ * @default false
776
+ */
777
+ reportOnUncaughtException: boolean;
778
+
779
+ /**
780
+ * The signal used to trigger the creation of a diagnostic report.
781
+ * @default 'SIGUSR2'
782
+ */
783
+ signal: Signals;
784
+
785
+ /**
786
+ * Writes a diagnostic report to a file. If filename is not provided, the default filename
787
+ * includes the date, time, PID, and a sequence number.
788
+ * The report's JavaScript stack trace is taken from err, if present.
789
+ *
790
+ * @param fileName Name of the file where the report is written.
791
+ * This should be a relative path, that will be appended to the directory specified in
792
+ * `process.report.directory`, or the current working directory of the Node.js process,
793
+ * if unspecified.
794
+ * @param error A custom error used for reporting the JavaScript stack.
795
+ * @return Filename of the generated report.
796
+ */
797
+ writeReport(fileName?: string): string;
798
+ writeReport(error?: Error): string;
799
+ writeReport(fileName?: string, err?: Error): string;
800
+ }
801
+
737
802
  interface Process extends EventEmitter {
738
803
  /**
739
804
  * Can also be a tty.WriteStream, not typed due to limitation.s
@@ -838,6 +903,11 @@ declare namespace NodeJS {
838
903
  */
839
904
  allowedNodeEnvironmentFlags: ReadonlySet<string>;
840
905
 
906
+ /**
907
+ * Only available with `--experimental-report`
908
+ */
909
+ report?: ProcessReport;
910
+
841
911
  /**
842
912
  * EventEmitter
843
913
  * 1. beforeExit
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 11.11
1
+ // Type definitions for non-npm package Node.js 11.12
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "11.11.8",
3
+ "version": "11.12.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -206,6 +206,6 @@
206
206
  },
207
207
  "scripts": {},
208
208
  "dependencies": {},
209
- "typesPublisherContentHash": "8023382f44f0b3465f2d9182e61febc5c6e525800eaad1777475b56269a7dceb",
209
+ "typesPublisherContentHash": "8e6e38ea6d4123e645bb9bae11238d4c35590b3433292b649e2cb9fba834fe0b",
210
210
  "typeScriptVersion": "2.0"
211
211
  }
node/util.d.ts CHANGED
@@ -22,6 +22,10 @@ declare module "util" {
22
22
  [style: string]: string | undefined
23
23
  };
24
24
  let defaultOptions: InspectOptions;
25
+ /**
26
+ * Allows changing inspect settings from the repl.
27
+ */
28
+ let replDefaults: InspectOptions;
25
29
  }
26
30
  /** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
27
31
  function isArray(object: any): object is any[];