@types/node 13.13.48 → 13.13.49

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 v13.13/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/v13.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 27 Mar 2021 00:01:18 GMT
11
+ * Last updated: Wed, 14 Apr 2021 20:31:24 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
 
@@ -783,6 +783,32 @@ declare namespace NodeJS {
783
783
  voluntaryContextSwitches: number;
784
784
  }
785
785
 
786
+ interface EmitWarningOptions {
787
+ /**
788
+ * When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted.
789
+ *
790
+ * @default 'Warning'
791
+ */
792
+ type?: string;
793
+
794
+ /**
795
+ * A unique identifier for the warning instance being emitted.
796
+ */
797
+ code?: string;
798
+
799
+ /**
800
+ * When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace.
801
+ *
802
+ * @default process.emitWarning
803
+ */
804
+ ctor?: Function;
805
+
806
+ /**
807
+ * Additional text to include with the error.
808
+ */
809
+ detail?: string;
810
+ }
811
+
786
812
  interface Process extends EventEmitter {
787
813
  /**
788
814
  * Can also be a tty.WriteStream, not typed due to limitation.s
@@ -802,7 +828,22 @@ declare namespace NodeJS {
802
828
  chdir(directory: string): void;
803
829
  cwd(): string;
804
830
  debugPort: number;
805
- emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
831
+
832
+ /**
833
+ * The `process.emitWarning()` method can be used to emit custom or application specific process warnings.
834
+ *
835
+ * These can be listened for by adding a handler to the `'warning'` event.
836
+ *
837
+ * @param warning The warning to emit.
838
+ * @param type When `warning` is a `string`, `type` is the name to use for the _type_ of warning being emitted. Default: `'Warning'`.
839
+ * @param code A unique identifier for the warning instance being emitted.
840
+ * @param ctor When `warning` is a `string`, `ctor` is an optional function used to limit the generated stack trace. Default: `process.emitWarning`.
841
+ */
842
+ emitWarning(warning: string | Error, ctor?: Function): void;
843
+ emitWarning(warning: string | Error, type?: string, ctor?: Function): void;
844
+ emitWarning(warning: string | Error, type?: string, code?: string, ctor?: Function): void;
845
+ emitWarning(warning: string | Error, options?: EmitWarningOptions): void;
846
+
806
847
  env: ProcessEnv;
807
848
  exit(code?: number): never;
808
849
  exitCode?: number;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "13.13.48",
3
+ "version": "13.13.49",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -221,6 +221,6 @@
221
221
  },
222
222
  "scripts": {},
223
223
  "dependencies": {},
224
- "typesPublisherContentHash": "7137191a8571b97d3d9ced96fdf201adb2a0361904ff74887497129c2b79b359",
224
+ "typesPublisherContentHash": "5921cabce06e12c87c087dc5b59209d243f89f6c09b00ade39bf68abf6d22ebb",
225
225
  "typeScriptVersion": "3.5"
226
226
  }