@types/node 12.19.8 → 12.19.9

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 v12.19/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/v12.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 30 Nov 2020 19:02:20 GMT
11
+ * Last updated: Sat, 12 Dec 2020 17:18:23 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v12.19/assert.d.ts CHANGED
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): asserts value;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): asserts value is null | undefined;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "12.19.8",
3
+ "version": "12.19.9",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -231,6 +231,6 @@
231
231
  },
232
232
  "scripts": {},
233
233
  "dependencies": {},
234
- "typesPublisherContentHash": "fbb8d0256722db1e7d6892cfbf2ebb540436e14769bf24b8e54853751ec8d869",
234
+ "typesPublisherContentHash": "db8bba5ca7d640f7451891779e5e692a6cf1b3b86cbcb4f34737a0e8817cb049",
235
235
  "typeScriptVersion": "3.3"
236
236
  }
@@ -15,6 +15,7 @@ declare module 'assert' {
15
15
  actual?: any;
16
16
  expected?: any;
17
17
  operator?: string;
18
+ // tslint:disable-next-line:ban-types
18
19
  stackStartFn?: Function;
19
20
  });
20
21
  }
@@ -37,6 +38,8 @@ declare module 'assert' {
37
38
  stack: object;
38
39
  }
39
40
 
41
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
42
+
40
43
  function fail(message?: string | Error): never;
41
44
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
42
45
  function fail(
@@ -44,6 +47,7 @@ declare module 'assert' {
44
47
  expected: any,
45
48
  message?: string | Error,
46
49
  operator?: string,
50
+ // tslint:disable-next-line:ban-types
47
51
  stackStartFn?: Function,
48
52
  ): never;
49
53
  function ok(value: any, message?: string | Error): void;
@@ -61,22 +65,22 @@ declare module 'assert' {
61
65
  function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
62
66
 
63
67
  function throws(block: () => any, message?: string | Error): void;
64
- function throws(block: () => any, error: RegExp | Function | Object | Error, message?: string | Error): void;
68
+ function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
65
69
  function doesNotThrow(block: () => any, message?: string | Error): void;
66
- function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
70
+ function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
67
71
 
68
72
  function ifError(value: any): void;
69
73
 
70
74
  function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
71
75
  function rejects(
72
76
  block: (() => Promise<any>) | Promise<any>,
73
- error: RegExp | Function | Object | Error,
77
+ error: AssertPredicate,
74
78
  message?: string | Error,
75
79
  ): Promise<void>;
76
80
  function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
77
81
  function doesNotReject(
78
82
  block: (() => Promise<any>) | Promise<any>,
79
- error: RegExp | Function,
83
+ error: AssertPredicate,
80
84
  message?: string | Error,
81
85
  ): Promise<void>;
82
86