@node-red/editor-client 3.0.2 → 3.1.0-beta.2

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 (127) hide show
  1. package/locales/de/editor.json +2 -0
  2. package/locales/de/infotips.json +0 -0
  3. package/locales/de/jsonata.json +0 -0
  4. package/locales/en-US/editor.json +37 -6
  5. package/locales/en-US/infotips.json +0 -0
  6. package/locales/en-US/jsonata.json +0 -0
  7. package/locales/fr/editor.json +1238 -0
  8. package/locales/fr/infotips.json +23 -0
  9. package/locales/fr/jsonata.json +274 -0
  10. package/locales/ja/editor.json +48 -9
  11. package/locales/ko/editor.json +233 -31
  12. package/locales/ko/infotips.json +0 -0
  13. package/locales/ko/jsonata.json +0 -0
  14. package/locales/pt-BR/editor.json +1208 -0
  15. package/locales/pt-BR/infotips.json +23 -0
  16. package/locales/pt-BR/jsonata.json +274 -0
  17. package/locales/ru/editor.json +2 -0
  18. package/locales/ru/infotips.json +0 -0
  19. package/locales/ru/jsonata.json +0 -0
  20. package/locales/zh-CN/editor.json +1175 -1049
  21. package/locales/zh-TW/editor.json +3 -0
  22. package/package.json +1 -1
  23. package/public/red/about +140 -0
  24. package/public/red/red.js +2699 -1397
  25. package/public/red/red.min.js +4 -3
  26. package/public/red/style.min.css +1 -1
  27. package/public/red/tours/3.0/images/context-menu.png +0 -0
  28. package/public/red/tours/3.0/welcome.js +155 -0
  29. package/public/red/tours/images/context-menu.png +0 -0
  30. package/public/red/tours/images/global-env-vars.png +0 -0
  31. package/public/red/tours/images/hiding-flows.png +0 -0
  32. package/public/red/tours/images/locking-flows.png +0 -0
  33. package/public/red/tours/images/mermaid.png +0 -0
  34. package/public/red/tours/images/node-help.png +0 -0
  35. package/public/red/tours/images/tab-changes.png +0 -0
  36. package/public/red/tours/welcome.js +111 -94
  37. package/public/types/node/assert/strict.d.ts +11 -0
  38. package/public/types/node/assert.d.ts +898 -64
  39. package/public/types/node/async_hooks.d.ts +362 -94
  40. package/public/types/node/buffer.d.ts +2158 -14
  41. package/public/types/node/child_process.d.ts +1109 -257
  42. package/public/types/node/cluster.d.ts +349 -200
  43. package/public/types/node/console.d.ts +313 -43
  44. package/public/types/node/crypto.d.ts +3329 -656
  45. package/public/types/node/dgram.d.ts +459 -58
  46. package/public/types/node/diagnostics_channel.d.ts +155 -0
  47. package/public/types/node/dns/promises.d.ts +371 -0
  48. package/public/types/node/dns.d.ts +532 -265
  49. package/public/types/node/domain.d.ts +159 -16
  50. package/public/types/node/events.d.ts +589 -30
  51. package/public/types/node/fs/promises.d.ts +1097 -0
  52. package/public/types/node/fs.d.ts +2484 -958
  53. package/public/types/node/globals.d.ts +43 -503
  54. package/public/types/node/http.d.ts +1156 -145
  55. package/public/types/node/http2.d.ts +1610 -470
  56. package/public/types/node/https.d.ts +462 -72
  57. package/public/types/node/module.d.ts +72 -13
  58. package/public/types/node/net.d.ts +663 -131
  59. package/public/types/node/os.d.ts +238 -25
  60. package/public/types/node/path.d.ts +57 -23
  61. package/public/types/node/perf_hooks.d.ts +424 -112
  62. package/public/types/node/process.d.ts +1261 -193
  63. package/public/types/node/querystring.d.ts +107 -7
  64. package/public/types/node/readline.d.ts +443 -74
  65. package/public/types/node/stream/consumers.d.ts +15 -0
  66. package/public/types/node/stream/promises.d.ts +45 -0
  67. package/public/types/node/stream/web.d.ts +395 -0
  68. package/public/types/node/stream.d.ts +1081 -177
  69. package/public/types/node/string_decoder.d.ts +57 -0
  70. package/public/types/node/test.d.ts +193 -0
  71. package/public/types/node/timers/promises.d.ts +96 -0
  72. package/public/types/node/timers.d.ts +87 -12
  73. package/public/types/node/tls.d.ts +457 -222
  74. package/public/types/node/trace_events.d.ts +107 -10
  75. package/public/types/node/tty.d.ts +158 -23
  76. package/public/types/node/url.d.ts +734 -28
  77. package/public/types/node/util.d.ts +1542 -164
  78. package/public/types/node/v8.d.ts +261 -73
  79. package/public/types/node/vm.d.ts +384 -32
  80. package/public/types/node/wasi.d.ts +92 -23
  81. package/public/types/node/worker_threads.d.ts +531 -123
  82. package/public/types/node/zlib.d.ts +216 -63
  83. package/public/types/node-red/func.d.ts +3 -0
  84. package/public/vendor/jquery/css/base/images/ui-icons_444444_256x240.png +0 -0
  85. package/public/vendor/jquery/css/base/images/ui-icons_555555_256x240.png +0 -0
  86. package/public/vendor/jquery/css/base/images/ui-icons_777620_256x240.png +0 -0
  87. package/public/vendor/jquery/css/base/images/ui-icons_777777_256x240.png +0 -0
  88. package/public/vendor/jquery/css/base/images/ui-icons_cc0000_256x240.png +0 -0
  89. package/public/vendor/jquery/css/base/images/ui-icons_ffffff_256x240.png +0 -0
  90. package/public/vendor/jquery/css/base/jquery-ui.min.css +4 -4
  91. package/public/vendor/mermaid/mermaid.min.js +1284 -0
  92. package/public/vendor/monaco/dist/{ade705761eb7e702770d.ttf → 7064e66c3890a12c47b4.ttf} +0 -0
  93. package/public/vendor/monaco/dist/css.worker.js +1 -1
  94. package/public/vendor/monaco/dist/css.worker.js.LICENSE.txt +1 -1
  95. package/public/vendor/monaco/dist/editor.js +1 -1
  96. package/public/vendor/monaco/dist/editor.js.LICENSE.txt +5 -1
  97. package/public/vendor/monaco/dist/editor.worker.js +1 -1
  98. package/public/vendor/monaco/dist/html.worker.js +1 -1
  99. package/public/vendor/monaco/dist/html.worker.js.LICENSE.txt +1 -1
  100. package/public/vendor/monaco/dist/json.worker.js +1 -1
  101. package/public/vendor/monaco/dist/json.worker.js.LICENSE.txt +1 -1
  102. package/public/vendor/monaco/dist/locale/cs.js +319 -71
  103. package/public/vendor/monaco/dist/locale/de.js +323 -75
  104. package/public/vendor/monaco/dist/locale/es.js +318 -70
  105. package/public/vendor/monaco/dist/locale/fr.js +327 -79
  106. package/public/vendor/monaco/dist/locale/it.js +325 -77
  107. package/public/vendor/monaco/dist/locale/ja.js +337 -89
  108. package/public/vendor/monaco/dist/locale/ko.js +324 -76
  109. package/public/vendor/monaco/dist/locale/pl.js +322 -74
  110. package/public/vendor/monaco/dist/locale/pt-br.js +321 -73
  111. package/public/vendor/monaco/dist/locale/qps-ploc.js +1580 -1332
  112. package/public/vendor/monaco/dist/locale/ru.js +324 -76
  113. package/public/vendor/monaco/dist/locale/tr.js +326 -78
  114. package/public/vendor/monaco/dist/locale/zh-hans.js +328 -80
  115. package/public/vendor/monaco/dist/locale/zh-hant.js +321 -73
  116. package/public/vendor/monaco/dist/theme/forge.json +236 -0
  117. package/public/vendor/monaco/dist/theme/github-dark.json +348 -0
  118. package/public/vendor/monaco/dist/theme/github-light.json +348 -0
  119. package/public/vendor/monaco/dist/theme/nord.json +93 -0
  120. package/public/vendor/monaco/dist/ts.worker.js +1 -1
  121. package/public/vendor/monaco/dist/ts.worker.js.LICENSE.txt +14 -6
  122. package/public/vendor/vendor.js +9 -15
  123. /package/public/red/tours/{images → 3.0/images}/continuous-search.png +0 -0
  124. /package/public/red/tours/{images → 3.0/images}/debug-path-tooltip.png +0 -0
  125. /package/public/red/tours/{images → 3.0/images}/junction-quick-add.png +0 -0
  126. /package/public/red/tours/{images → 3.0/images}/junction-slice.gif +0 -0
  127. /package/public/red/tours/{images → 3.0/images}/split-wire-with-links.gif +0 -0
@@ -1,24 +1,36 @@
1
1
 
2
2
  /* NOTE: Do not edit directly! This file is generated using `npm run update-types` in https://github.com/Steve-Mcl/monaco-editor-esm-i18n */
3
3
 
4
+ /**
5
+ * The `assert` module provides a set of assertion functions for verifying
6
+ * invariants.
7
+ * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/assert.js)
8
+ */
4
9
  declare module 'assert' {
5
- /** An alias of `assert.ok()`. */
6
- function assert(value: any, message?: string | Error): asserts value;
10
+ /**
11
+ * An alias of {@link ok}.
12
+ * @since v0.5.9
13
+ * @param value The input that is checked for being truthy.
14
+ */
15
+ function assert(value: unknown, message?: string | Error): asserts value;
7
16
  namespace assert {
17
+ /**
18
+ * Indicates the failure of an assertion. All errors thrown by the `assert` module
19
+ * will be instances of the `AssertionError` class.
20
+ */
8
21
  class AssertionError extends Error {
9
- actual: any;
10
- expected: any;
22
+ actual: unknown;
23
+ expected: unknown;
11
24
  operator: string;
12
25
  generatedMessage: boolean;
13
26
  code: 'ERR_ASSERTION';
14
-
15
27
  constructor(options?: {
16
28
  /** If provided, the error message is set to this value. */
17
29
  message?: string | undefined;
18
30
  /** The `actual` property on the error instance. */
19
- actual?: any;
31
+ actual?: unknown | undefined;
20
32
  /** The `expected` property on the error instance. */
21
- expected?: any;
33
+ expected?: unknown | undefined;
22
34
  /** The `operator` property on the error instance. */
23
35
  operator?: string | undefined;
24
36
  /** If provided, the generated stack trace omits frames before this function. */
@@ -26,13 +38,146 @@ declare module 'assert' {
26
38
  stackStartFn?: Function | undefined;
27
39
  });
28
40
  }
29
-
41
+ /**
42
+ * This feature is currently experimental and behavior might still change.
43
+ * @since v14.2.0, v12.19.0
44
+ * @experimental
45
+ */
30
46
  class CallTracker {
47
+ /**
48
+ * The wrapper function is expected to be called exactly `exact` times. If the
49
+ * function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
50
+ * error.
51
+ *
52
+ * ```js
53
+ * import assert from 'assert';
54
+ *
55
+ * // Creates call tracker.
56
+ * const tracker = new assert.CallTracker();
57
+ *
58
+ * function func() {}
59
+ *
60
+ * // Returns a function that wraps func() that must be called exact times
61
+ * // before tracker.verify().
62
+ * const callsfunc = tracker.calls(func);
63
+ * ```
64
+ * @since v14.2.0, v12.19.0
65
+ * @param [fn='A no-op function']
66
+ * @param [exact=1]
67
+ * @return that wraps `fn`.
68
+ */
31
69
  calls(exact?: number): () => void;
32
70
  calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
71
+ /**
72
+ * Example:
73
+ *
74
+ * ```js
75
+ * import assert from 'node:assert';
76
+ *
77
+ * const tracker = new assert.CallTracker();
78
+ *
79
+ * function func() {}
80
+ * const callsfunc = tracker.calls(func);
81
+ * callsfunc(1, 2, 3);
82
+ *
83
+ * assert.deepStrictEqual(tracker.getCalls(callsfunc),
84
+ * [{ thisArg: this, arguments: [1, 2, 3 ] }]);
85
+ * ```
86
+ *
87
+ * @since v18.8.0, v16.18.0
88
+ * @params fn
89
+ * @returns An Array with the calls to a tracked function.
90
+ */
91
+ getCalls(fn: Function): CallTrackerCall[];
92
+ /**
93
+ * The arrays contains information about the expected and actual number of calls of
94
+ * the functions that have not been called the expected number of times.
95
+ *
96
+ * ```js
97
+ * import assert from 'assert';
98
+ *
99
+ * // Creates call tracker.
100
+ * const tracker = new assert.CallTracker();
101
+ *
102
+ * function func() {}
103
+ *
104
+ * function foo() {}
105
+ *
106
+ * // Returns a function that wraps func() that must be called exact times
107
+ * // before tracker.verify().
108
+ * const callsfunc = tracker.calls(func, 2);
109
+ *
110
+ * // Returns an array containing information on callsfunc()
111
+ * tracker.report();
112
+ * // [
113
+ * // {
114
+ * // message: 'Expected the func function to be executed 2 time(s) but was
115
+ * // executed 0 time(s).',
116
+ * // actual: 0,
117
+ * // expected: 2,
118
+ * // operator: 'func',
119
+ * // stack: stack trace
120
+ * // }
121
+ * // ]
122
+ * ```
123
+ * @since v14.2.0, v12.19.0
124
+ * @return of objects containing information about the wrapper functions returned by `calls`.
125
+ */
33
126
  report(): CallTrackerReportInformation[];
127
+ /**
128
+ * Reset calls of the call tracker.
129
+ * If a tracked function is passed as an argument, the calls will be reset for it.
130
+ * If no arguments are passed, all tracked functions will be reset.
131
+ *
132
+ * ```js
133
+ * import assert from 'node:assert';
134
+ *
135
+ * const tracker = new assert.CallTracker();
136
+ *
137
+ * function func() {}
138
+ * const callsfunc = tracker.calls(func);
139
+ *
140
+ * callsfunc();
141
+ * // Tracker was called once
142
+ * tracker.getCalls(callsfunc).length === 1;
143
+ *
144
+ * tracker.reset(callsfunc);
145
+ * tracker.getCalls(callsfunc).length === 0;
146
+ * ```
147
+ *
148
+ * @since v18.8.0, v16.18.0
149
+ * @param fn a tracked function to reset.
150
+ */
151
+ reset(fn?: Function): void;
152
+ /**
153
+ * Iterates through the list of functions passed to `tracker.calls()` and will throw an error for functions that
154
+ * have not been called the expected number of times.
155
+ *
156
+ * ```js
157
+ * import assert from 'assert';
158
+ *
159
+ * // Creates call tracker.
160
+ * const tracker = new assert.CallTracker();
161
+ *
162
+ * function func() {}
163
+ *
164
+ * // Returns a function that wraps func() that must be called exact times
165
+ * // before tracker.verify().
166
+ * const callsfunc = tracker.calls(func, 2);
167
+ *
168
+ * callsfunc();
169
+ *
170
+ * // Will throw an error since callsfunc() was only called once.
171
+ * tracker.verify();
172
+ * ```
173
+ * @since v14.2.0, v12.19.0
174
+ */
34
175
  verify(): void;
35
176
  }
177
+ interface CallTrackerCall {
178
+ thisArg: object;
179
+ arguments: unknown[];
180
+ }
36
181
  interface CallTrackerReportInformation {
37
182
  message: string;
38
183
  /** The actual number of times the function was called. */
@@ -44,74 +189,764 @@ declare module 'assert' {
44
189
  /** A stack trace of the function. */
45
190
  stack: object;
46
191
  }
47
-
48
- type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
49
-
192
+ type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
193
+ /**
194
+ * Throws an `AssertionError` with the provided error message or a default
195
+ * error message. If the `message` parameter is an instance of an `Error` then
196
+ * it will be thrown instead of the `AssertionError`.
197
+ *
198
+ * ```js
199
+ * import assert from 'assert/strict';
200
+ *
201
+ * assert.fail();
202
+ * // AssertionError [ERR_ASSERTION]: Failed
203
+ *
204
+ * assert.fail('boom');
205
+ * // AssertionError [ERR_ASSERTION]: boom
206
+ *
207
+ * assert.fail(new TypeError('need array'));
208
+ * // TypeError: need array
209
+ * ```
210
+ *
211
+ * Using `assert.fail()` with more than two arguments is possible but deprecated.
212
+ * See below for further details.
213
+ * @since v0.1.21
214
+ * @param [message='Failed']
215
+ */
50
216
  function fail(message?: string | Error): never;
51
217
  /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
52
218
  function fail(
53
- actual: any,
54
- expected: any,
219
+ actual: unknown,
220
+ expected: unknown,
55
221
  message?: string | Error,
56
222
  operator?: string,
57
223
  // tslint:disable-next-line:ban-types
58
- stackStartFn?: Function,
224
+ stackStartFn?: Function
59
225
  ): never;
60
- function ok(value: any, message?: string | Error): asserts value;
61
- /** @deprecated since v9.9.0 - use strictEqual() instead. */
62
- function equal(actual: any, expected: any, message?: string | Error): void;
63
- /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
64
- function notEqual(actual: any, expected: any, message?: string | Error): void;
65
- /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
66
- function deepEqual(actual: any, expected: any, message?: string | Error): void;
67
- /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
68
- function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
69
- function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
70
- function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
71
- function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
72
- function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
73
-
74
- function throws(block: () => any, message?: string | Error): void;
75
- function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
76
- function doesNotThrow(block: () => any, message?: string | Error): void;
77
- function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
78
-
79
- function ifError(value: any): asserts value is null | undefined;
80
-
81
- function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
82
- function rejects(
83
- block: (() => Promise<any>) | Promise<any>,
84
- error: AssertPredicate,
85
- message?: string | Error,
86
- ): Promise<void>;
87
- function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
88
- function doesNotReject(
89
- block: (() => Promise<any>) | Promise<any>,
90
- error: AssertPredicate,
91
- message?: string | Error,
92
- ): Promise<void>;
93
-
226
+ /**
227
+ * Tests if `value` is truthy. It is equivalent to`assert.equal(!!value, true, message)`.
228
+ *
229
+ * If `value` is not truthy, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is `undefined`, a default
230
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
231
+ * If no arguments are passed in at all `message` will be set to the string:`` 'No value argument passed to `assert.ok()`' ``.
232
+ *
233
+ * Be aware that in the `repl` the error message will be different to the one
234
+ * thrown in a file! See below for further details.
235
+ *
236
+ * ```js
237
+ * import assert from 'assert/strict';
238
+ *
239
+ * assert.ok(true);
240
+ * // OK
241
+ * assert.ok(1);
242
+ * // OK
243
+ *
244
+ * assert.ok();
245
+ * // AssertionError: No value argument passed to `assert.ok()`
246
+ *
247
+ * assert.ok(false, 'it\'s false');
248
+ * // AssertionError: it's false
249
+ *
250
+ * // In the repl:
251
+ * assert.ok(typeof 123 === 'string');
252
+ * // AssertionError: false == true
253
+ *
254
+ * // In a file (e.g. test.js):
255
+ * assert.ok(typeof 123 === 'string');
256
+ * // AssertionError: The expression evaluated to a falsy value:
257
+ * //
258
+ * // assert.ok(typeof 123 === 'string')
259
+ *
260
+ * assert.ok(false);
261
+ * // AssertionError: The expression evaluated to a falsy value:
262
+ * //
263
+ * // assert.ok(false)
264
+ *
265
+ * assert.ok(0);
266
+ * // AssertionError: The expression evaluated to a falsy value:
267
+ * //
268
+ * // assert.ok(0)
269
+ * ```
270
+ *
271
+ * ```js
272
+ * import assert from 'assert/strict';
273
+ *
274
+ * // Using `assert()` works the same:
275
+ * assert(0);
276
+ * // AssertionError: The expression evaluated to a falsy value:
277
+ * //
278
+ * // assert(0)
279
+ * ```
280
+ * @since v0.1.21
281
+ */
282
+ function ok(value: unknown, message?: string | Error): asserts value;
283
+ /**
284
+ * **Strict assertion mode**
285
+ *
286
+ * An alias of {@link strictEqual}.
287
+ *
288
+ * **Legacy assertion mode**
289
+ *
290
+ * > Stability: 3 - Legacy: Use {@link strictEqual} instead.
291
+ *
292
+ * Tests shallow, coercive equality between the `actual` and `expected` parameters
293
+ * using the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison) ( `==` ). `NaN` is special handled
294
+ * and treated as being identical in case both sides are `NaN`.
295
+ *
296
+ * ```js
297
+ * import assert from 'assert';
298
+ *
299
+ * assert.equal(1, 1);
300
+ * // OK, 1 == 1
301
+ * assert.equal(1, '1');
302
+ * // OK, 1 == '1'
303
+ * assert.equal(NaN, NaN);
304
+ * // OK
305
+ *
306
+ * assert.equal(1, 2);
307
+ * // AssertionError: 1 == 2
308
+ * assert.equal({ a: { b: 1 } }, { a: { b: 1 } });
309
+ * // AssertionError: { a: { b: 1 } } == { a: { b: 1 } }
310
+ * ```
311
+ *
312
+ * If the values are not equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default
313
+ * error message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
314
+ * @since v0.1.21
315
+ */
316
+ function equal(actual: unknown, expected: unknown, message?: string | Error): void;
317
+ /**
318
+ * **Strict assertion mode**
319
+ *
320
+ * An alias of {@link notStrictEqual}.
321
+ *
322
+ * **Legacy assertion mode**
323
+ *
324
+ * > Stability: 3 - Legacy: Use {@link notStrictEqual} instead.
325
+ *
326
+ * Tests shallow, coercive inequality with the [Abstract Equality Comparison](https://tc39.github.io/ecma262/#sec-abstract-equality-comparison)(`!=` ). `NaN` is special handled and treated as
327
+ * being identical in case both
328
+ * sides are `NaN`.
329
+ *
330
+ * ```js
331
+ * import assert from 'assert';
332
+ *
333
+ * assert.notEqual(1, 2);
334
+ * // OK
335
+ *
336
+ * assert.notEqual(1, 1);
337
+ * // AssertionError: 1 != 1
338
+ *
339
+ * assert.notEqual(1, '1');
340
+ * // AssertionError: 1 != '1'
341
+ * ```
342
+ *
343
+ * If the values are equal, an `AssertionError` is thrown with a `message`property set equal to the value of the `message` parameter. If the `message`parameter is undefined, a default error
344
+ * message is assigned. If the `message`parameter is an instance of an `Error` then it will be thrown instead of the`AssertionError`.
345
+ * @since v0.1.21
346
+ */
347
+ function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
348
+ /**
349
+ * **Strict assertion mode**
350
+ *
351
+ * An alias of {@link deepStrictEqual}.
352
+ *
353
+ * **Legacy assertion mode**
354
+ *
355
+ * > Stability: 3 - Legacy: Use {@link deepStrictEqual} instead.
356
+ *
357
+ * Tests for deep equality between the `actual` and `expected` parameters. Consider
358
+ * using {@link deepStrictEqual} instead. {@link deepEqual} can have
359
+ * surprising results.
360
+ *
361
+ * _Deep equality_ means that the enumerable "own" properties of child objects
362
+ * are also recursively evaluated by the following rules.
363
+ * @since v0.1.21
364
+ */
365
+ function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
366
+ /**
367
+ * **Strict assertion mode**
368
+ *
369
+ * An alias of {@link notDeepStrictEqual}.
370
+ *
371
+ * **Legacy assertion mode**
372
+ *
373
+ * > Stability: 3 - Legacy: Use {@link notDeepStrictEqual} instead.
374
+ *
375
+ * Tests for any deep inequality. Opposite of {@link deepEqual}.
376
+ *
377
+ * ```js
378
+ * import assert from 'assert';
379
+ *
380
+ * const obj1 = {
381
+ * a: {
382
+ * b: 1
383
+ * }
384
+ * };
385
+ * const obj2 = {
386
+ * a: {
387
+ * b: 2
388
+ * }
389
+ * };
390
+ * const obj3 = {
391
+ * a: {
392
+ * b: 1
393
+ * }
394
+ * };
395
+ * const obj4 = Object.create(obj1);
396
+ *
397
+ * assert.notDeepEqual(obj1, obj1);
398
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
399
+ *
400
+ * assert.notDeepEqual(obj1, obj2);
401
+ * // OK
402
+ *
403
+ * assert.notDeepEqual(obj1, obj3);
404
+ * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
405
+ *
406
+ * assert.notDeepEqual(obj1, obj4);
407
+ * // OK
408
+ * ```
409
+ *
410
+ * If the values are deeply equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a default
411
+ * error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
412
+ * instead of the `AssertionError`.
413
+ * @since v0.1.21
414
+ */
415
+ function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
416
+ /**
417
+ * Tests strict equality between the `actual` and `expected` parameters as
418
+ * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
419
+ *
420
+ * ```js
421
+ * import assert from 'assert/strict';
422
+ *
423
+ * assert.strictEqual(1, 2);
424
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
425
+ * //
426
+ * // 1 !== 2
427
+ *
428
+ * assert.strictEqual(1, 1);
429
+ * // OK
430
+ *
431
+ * assert.strictEqual('Hello foobar', 'Hello World!');
432
+ * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
433
+ * // + actual - expected
434
+ * //
435
+ * // + 'Hello foobar'
436
+ * // - 'Hello World!'
437
+ * // ^
438
+ *
439
+ * const apples = 1;
440
+ * const oranges = 2;
441
+ * assert.strictEqual(apples, oranges, `apples ${apples} !== oranges ${oranges}`);
442
+ * // AssertionError [ERR_ASSERTION]: apples 1 !== oranges 2
443
+ *
444
+ * assert.strictEqual(1, '1', new TypeError('Inputs are not identical'));
445
+ * // TypeError: Inputs are not identical
446
+ * ```
447
+ *
448
+ * If the values are not strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
449
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
450
+ * instead of the `AssertionError`.
451
+ * @since v0.1.21
452
+ */
453
+ function strictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
454
+ /**
455
+ * Tests strict inequality between the `actual` and `expected` parameters as
456
+ * determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).
457
+ *
458
+ * ```js
459
+ * import assert from 'assert/strict';
460
+ *
461
+ * assert.notStrictEqual(1, 2);
462
+ * // OK
463
+ *
464
+ * assert.notStrictEqual(1, 1);
465
+ * // AssertionError [ERR_ASSERTION]: Expected "actual" to be strictly unequal to:
466
+ * //
467
+ * // 1
468
+ *
469
+ * assert.notStrictEqual(1, '1');
470
+ * // OK
471
+ * ```
472
+ *
473
+ * If the values are strictly equal, an `AssertionError` is thrown with a`message` property set equal to the value of the `message` parameter. If the`message` parameter is undefined, a
474
+ * default error message is assigned. If the`message` parameter is an instance of an `Error` then it will be thrown
475
+ * instead of the `AssertionError`.
476
+ * @since v0.1.21
477
+ */
478
+ function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
479
+ /**
480
+ * Tests for deep equality between the `actual` and `expected` parameters.
481
+ * "Deep" equality means that the enumerable "own" properties of child objects
482
+ * are recursively evaluated also by the following rules.
483
+ * @since v1.2.0
484
+ */
485
+ function deepStrictEqual<T>(actual: unknown, expected: T, message?: string | Error): asserts actual is T;
486
+ /**
487
+ * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
488
+ *
489
+ * ```js
490
+ * import assert from 'assert/strict';
491
+ *
492
+ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
493
+ * // OK
494
+ * ```
495
+ *
496
+ * If the values are deeply and strictly equal, an `AssertionError` is thrown
497
+ * with a `message` property set equal to the value of the `message` parameter. If
498
+ * the `message` parameter is undefined, a default error message is assigned. If
499
+ * the `message` parameter is an instance of an `Error` then it will be thrown
500
+ * instead of the `AssertionError`.
501
+ * @since v1.2.0
502
+ */
503
+ function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
504
+ /**
505
+ * Expects the function `fn` to throw an error.
506
+ *
507
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
508
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
509
+ * a validation object where each property will be tested for strict deep equality,
510
+ * or an instance of error where each property will be tested for strict deep
511
+ * equality including the non-enumerable `message` and `name` properties. When
512
+ * using an object, it is also possible to use a regular expression, when
513
+ * validating against a string property. See below for examples.
514
+ *
515
+ * If specified, `message` will be appended to the message provided by the`AssertionError` if the `fn` call fails to throw or in case the error validation
516
+ * fails.
517
+ *
518
+ * Custom validation object/error instance:
519
+ *
520
+ * ```js
521
+ * import assert from 'assert/strict';
522
+ *
523
+ * const err = new TypeError('Wrong value');
524
+ * err.code = 404;
525
+ * err.foo = 'bar';
526
+ * err.info = {
527
+ * nested: true,
528
+ * baz: 'text'
529
+ * };
530
+ * err.reg = /abc/i;
531
+ *
532
+ * assert.throws(
533
+ * () => {
534
+ * throw err;
535
+ * },
536
+ * {
537
+ * name: 'TypeError',
538
+ * message: 'Wrong value',
539
+ * info: {
540
+ * nested: true,
541
+ * baz: 'text'
542
+ * }
543
+ * // Only properties on the validation object will be tested for.
544
+ * // Using nested objects requires all properties to be present. Otherwise
545
+ * // the validation is going to fail.
546
+ * }
547
+ * );
548
+ *
549
+ * // Using regular expressions to validate error properties:
550
+ * throws(
551
+ * () => {
552
+ * throw err;
553
+ * },
554
+ * {
555
+ * // The `name` and `message` properties are strings and using regular
556
+ * // expressions on those will match against the string. If they fail, an
557
+ * // error is thrown.
558
+ * name: /^TypeError$/,
559
+ * message: /Wrong/,
560
+ * foo: 'bar',
561
+ * info: {
562
+ * nested: true,
563
+ * // It is not possible to use regular expressions for nested properties!
564
+ * baz: 'text'
565
+ * },
566
+ * // The `reg` property contains a regular expression and only if the
567
+ * // validation object contains an identical regular expression, it is going
568
+ * // to pass.
569
+ * reg: /abc/i
570
+ * }
571
+ * );
572
+ *
573
+ * // Fails due to the different `message` and `name` properties:
574
+ * throws(
575
+ * () => {
576
+ * const otherErr = new Error('Not found');
577
+ * // Copy all enumerable properties from `err` to `otherErr`.
578
+ * for (const [key, value] of Object.entries(err)) {
579
+ * otherErr[key] = value;
580
+ * }
581
+ * throw otherErr;
582
+ * },
583
+ * // The error's `message` and `name` properties will also be checked when using
584
+ * // an error as validation object.
585
+ * err
586
+ * );
587
+ * ```
588
+ *
589
+ * Validate instanceof using constructor:
590
+ *
591
+ * ```js
592
+ * import assert from 'assert/strict';
593
+ *
594
+ * assert.throws(
595
+ * () => {
596
+ * throw new Error('Wrong value');
597
+ * },
598
+ * Error
599
+ * );
600
+ * ```
601
+ *
602
+ * Validate error message using [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions):
603
+ *
604
+ * Using a regular expression runs `.toString` on the error object, and will
605
+ * therefore also include the error name.
606
+ *
607
+ * ```js
608
+ * import assert from 'assert/strict';
609
+ *
610
+ * assert.throws(
611
+ * () => {
612
+ * throw new Error('Wrong value');
613
+ * },
614
+ * /^Error: Wrong value$/
615
+ * );
616
+ * ```
617
+ *
618
+ * Custom error validation:
619
+ *
620
+ * The function must return `true` to indicate all internal validations passed.
621
+ * It will otherwise fail with an `AssertionError`.
622
+ *
623
+ * ```js
624
+ * import assert from 'assert/strict';
625
+ *
626
+ * assert.throws(
627
+ * () => {
628
+ * throw new Error('Wrong value');
629
+ * },
630
+ * (err) => {
631
+ * assert(err instanceof Error);
632
+ * assert(/value/.test(err));
633
+ * // Avoid returning anything from validation functions besides `true`.
634
+ * // Otherwise, it's not clear what part of the validation failed. Instead,
635
+ * // throw an error about the specific validation that failed (as done in this
636
+ * // example) and add as much helpful debugging information to that error as
637
+ * // possible.
638
+ * return true;
639
+ * },
640
+ * 'unexpected error'
641
+ * );
642
+ * ```
643
+ *
644
+ * `error` cannot be a string. If a string is provided as the second
645
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Using the same
646
+ * message as the thrown error message is going to result in an`ERR_AMBIGUOUS_ARGUMENT` error. Please read the example below carefully if using
647
+ * a string as the second argument gets considered:
648
+ *
649
+ * ```js
650
+ * import assert from 'assert/strict';
651
+ *
652
+ * function throwingFirst() {
653
+ * throw new Error('First');
654
+ * }
655
+ *
656
+ * function throwingSecond() {
657
+ * throw new Error('Second');
658
+ * }
659
+ *
660
+ * function notThrowing() {}
661
+ *
662
+ * // The second argument is a string and the input function threw an Error.
663
+ * // The first case will not throw as it does not match for the error message
664
+ * // thrown by the input function!
665
+ * assert.throws(throwingFirst, 'Second');
666
+ * // In the next example the message has no benefit over the message from the
667
+ * // error and since it is not clear if the user intended to actually match
668
+ * // against the error message, Node.js throws an `ERR_AMBIGUOUS_ARGUMENT` error.
669
+ * assert.throws(throwingSecond, 'Second');
670
+ * // TypeError [ERR_AMBIGUOUS_ARGUMENT]
671
+ *
672
+ * // The string is only used (as message) in case the function does not throw:
673
+ * assert.throws(notThrowing, 'Second');
674
+ * // AssertionError [ERR_ASSERTION]: Missing expected exception: Second
675
+ *
676
+ * // If it was intended to match for the error message do this instead:
677
+ * // It does not throw because the error messages match.
678
+ * assert.throws(throwingSecond, /Second$/);
679
+ *
680
+ * // If the error message does not match, an AssertionError is thrown.
681
+ * assert.throws(throwingFirst, /Second$/);
682
+ * // AssertionError [ERR_ASSERTION]
683
+ * ```
684
+ *
685
+ * Due to the confusing error-prone notation, avoid a string as the second
686
+ * argument.
687
+ * @since v0.1.21
688
+ */
689
+ function throws(block: () => unknown, message?: string | Error): void;
690
+ function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
691
+ /**
692
+ * Asserts that the function `fn` does not throw an error.
693
+ *
694
+ * Using `assert.doesNotThrow()` is actually not useful because there
695
+ * is no benefit in catching an error and then rethrowing it. Instead, consider
696
+ * adding a comment next to the specific code path that should not throw and keep
697
+ * error messages as expressive as possible.
698
+ *
699
+ * When `assert.doesNotThrow()` is called, it will immediately call the `fn`function.
700
+ *
701
+ * If an error is thrown and it is the same type as that specified by the `error`parameter, then an `AssertionError` is thrown. If the error is of a
702
+ * different type, or if the `error` parameter is undefined, the error is
703
+ * propagated back to the caller.
704
+ *
705
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
706
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
707
+ * function. See {@link throws} for more details.
708
+ *
709
+ * The following, for instance, will throw the `TypeError` because there is no
710
+ * matching error type in the assertion:
711
+ *
712
+ * ```js
713
+ * import assert from 'assert/strict';
714
+ *
715
+ * assert.doesNotThrow(
716
+ * () => {
717
+ * throw new TypeError('Wrong value');
718
+ * },
719
+ * SyntaxError
720
+ * );
721
+ * ```
722
+ *
723
+ * However, the following will result in an `AssertionError` with the message
724
+ * 'Got unwanted exception...':
725
+ *
726
+ * ```js
727
+ * import assert from 'assert/strict';
728
+ *
729
+ * assert.doesNotThrow(
730
+ * () => {
731
+ * throw new TypeError('Wrong value');
732
+ * },
733
+ * TypeError
734
+ * );
735
+ * ```
736
+ *
737
+ * If an `AssertionError` is thrown and a value is provided for the `message`parameter, the value of `message` will be appended to the `AssertionError` message:
738
+ *
739
+ * ```js
740
+ * import assert from 'assert/strict';
741
+ *
742
+ * assert.doesNotThrow(
743
+ * () => {
744
+ * throw new TypeError('Wrong value');
745
+ * },
746
+ * /Wrong value/,
747
+ * 'Whoops'
748
+ * );
749
+ * // Throws: AssertionError: Got unwanted exception: Whoops
750
+ * ```
751
+ * @since v0.1.21
752
+ */
753
+ function doesNotThrow(block: () => unknown, message?: string | Error): void;
754
+ function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
755
+ /**
756
+ * Throws `value` if `value` is not `undefined` or `null`. This is useful when
757
+ * testing the `error` argument in callbacks. The stack trace contains all frames
758
+ * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
759
+ *
760
+ * ```js
761
+ * import assert from 'assert/strict';
762
+ *
763
+ * assert.ifError(null);
764
+ * // OK
765
+ * assert.ifError(0);
766
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 0
767
+ * assert.ifError('error');
768
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: 'error'
769
+ * assert.ifError(new Error());
770
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Error
771
+ *
772
+ * // Create some random error frames.
773
+ * let err;
774
+ * (function errorFrame() {
775
+ * err = new Error('test error');
776
+ * })();
777
+ *
778
+ * (function ifErrorFrame() {
779
+ * assert.ifError(err);
780
+ * })();
781
+ * // AssertionError [ERR_ASSERTION]: ifError got unwanted exception: test error
782
+ * // at ifErrorFrame
783
+ * // at errorFrame
784
+ * ```
785
+ * @since v0.1.97
786
+ */
787
+ function ifError(value: unknown): asserts value is null | undefined;
788
+ /**
789
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
790
+ * calls the function and awaits the returned promise to complete. It will then
791
+ * check that the promise is rejected.
792
+ *
793
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.rejects()` will return a rejected `Promise` with that error. If the
794
+ * function does not return a promise, `assert.rejects()` will return a rejected`Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error
795
+ * handler is skipped.
796
+ *
797
+ * Besides the async nature to await the completion behaves identically to {@link throws}.
798
+ *
799
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
800
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), a validation function,
801
+ * an object where each property will be tested for, or an instance of error where
802
+ * each property will be tested for including the non-enumerable `message` and`name` properties.
803
+ *
804
+ * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
805
+ *
806
+ * ```js
807
+ * import assert from 'assert/strict';
808
+ *
809
+ * await assert.rejects(
810
+ * async () => {
811
+ * throw new TypeError('Wrong value');
812
+ * },
813
+ * {
814
+ * name: 'TypeError',
815
+ * message: 'Wrong value'
816
+ * }
817
+ * );
818
+ * ```
819
+ *
820
+ * ```js
821
+ * import assert from 'assert/strict';
822
+ *
823
+ * await assert.rejects(
824
+ * async () => {
825
+ * throw new TypeError('Wrong value');
826
+ * },
827
+ * (err) => {
828
+ * assert.strictEqual(err.name, 'TypeError');
829
+ * assert.strictEqual(err.message, 'Wrong value');
830
+ * return true;
831
+ * }
832
+ * );
833
+ * ```
834
+ *
835
+ * ```js
836
+ * import assert from 'assert/strict';
837
+ *
838
+ * assert.rejects(
839
+ * Promise.reject(new Error('Wrong value')),
840
+ * Error
841
+ * ).then(() => {
842
+ * // ...
843
+ * });
844
+ * ```
845
+ *
846
+ * `error` cannot be a string. If a string is provided as the second
847
+ * argument, then `error` is assumed to be omitted and the string will be used for`message` instead. This can lead to easy-to-miss mistakes. Please read the
848
+ * example in {@link throws} carefully if using a string as the second
849
+ * argument gets considered.
850
+ * @since v10.0.0
851
+ */
852
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
853
+ function rejects(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
854
+ /**
855
+ * Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately
856
+ * calls the function and awaits the returned promise to complete. It will then
857
+ * check that the promise is not rejected.
858
+ *
859
+ * If `asyncFn` is a function and it throws an error synchronously,`assert.doesNotReject()` will return a rejected `Promise` with that error. If
860
+ * the function does not return a promise, `assert.doesNotReject()` will return a
861
+ * rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases
862
+ * the error handler is skipped.
863
+ *
864
+ * Using `assert.doesNotReject()` is actually not useful because there is little
865
+ * benefit in catching a rejection and then rejecting it again. Instead, consider
866
+ * adding a comment next to the specific code path that should not reject and keep
867
+ * error messages as expressive as possible.
868
+ *
869
+ * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
870
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
871
+ * function. See {@link throws} for more details.
872
+ *
873
+ * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
874
+ *
875
+ * ```js
876
+ * import assert from 'assert/strict';
877
+ *
878
+ * await assert.doesNotReject(
879
+ * async () => {
880
+ * throw new TypeError('Wrong value');
881
+ * },
882
+ * SyntaxError
883
+ * );
884
+ * ```
885
+ *
886
+ * ```js
887
+ * import assert from 'assert/strict';
888
+ *
889
+ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
890
+ * .then(() => {
891
+ * // ...
892
+ * });
893
+ * ```
894
+ * @since v10.0.0
895
+ */
896
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
897
+ function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, error: AssertPredicate, message?: string | Error): Promise<void>;
898
+ /**
899
+ * Expects the `string` input to match the regular expression.
900
+ *
901
+ * ```js
902
+ * import assert from 'assert/strict';
903
+ *
904
+ * assert.match('I will fail', /pass/);
905
+ * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
906
+ *
907
+ * assert.match(123, /pass/);
908
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
909
+ *
910
+ * assert.match('I will pass', /pass/);
911
+ * // OK
912
+ * ```
913
+ *
914
+ * If the values do not match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
915
+ * to the value of the `message` parameter. If the `message` parameter is
916
+ * undefined, a default error message is assigned. If the `message` parameter is an
917
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
918
+ * @since v13.6.0, v12.16.0
919
+ */
94
920
  function match(value: string, regExp: RegExp, message?: string | Error): void;
921
+ /**
922
+ * Expects the `string` input not to match the regular expression.
923
+ *
924
+ * ```js
925
+ * import assert from 'assert/strict';
926
+ *
927
+ * assert.doesNotMatch('I will fail', /fail/);
928
+ * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...
929
+ *
930
+ * assert.doesNotMatch(123, /pass/);
931
+ * // AssertionError [ERR_ASSERTION]: The "string" argument must be of type string.
932
+ *
933
+ * assert.doesNotMatch('I will pass', /different/);
934
+ * // OK
935
+ * ```
936
+ *
937
+ * If the values do match, or if the `string` argument is of another type than`string`, an `AssertionError` is thrown with a `message` property set equal
938
+ * to the value of the `message` parameter. If the `message` parameter is
939
+ * undefined, a default error message is assigned. If the `message` parameter is an
940
+ * instance of an `Error` then it will be thrown instead of the `AssertionError`.
941
+ * @since v13.6.0, v12.16.0
942
+ */
95
943
  function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
96
-
97
- const strict: Omit<
98
- typeof assert,
99
- | 'equal'
100
- | 'notEqual'
101
- | 'deepEqual'
102
- | 'notDeepEqual'
103
- | 'ok'
104
- | 'strictEqual'
105
- | 'deepStrictEqual'
106
- | 'ifError'
107
- | 'strict'
108
- > & {
109
- (value: any, message?: string | Error): asserts value;
944
+ const strict: Omit<typeof assert, 'equal' | 'notEqual' | 'deepEqual' | 'notDeepEqual' | 'ok' | 'strictEqual' | 'deepStrictEqual' | 'ifError' | 'strict'> & {
945
+ (value: unknown, message?: string | Error): asserts value;
110
946
  equal: typeof strictEqual;
111
947
  notEqual: typeof notStrictEqual;
112
948
  deepEqual: typeof deepStrictEqual;
113
949
  notDeepEqual: typeof notDeepStrictEqual;
114
-
115
950
  // Mapped types and assertion functions are incompatible?
116
951
  // TS2775: Assertions require every name in the call target
117
952
  // to be declared with an explicit type annotation.
@@ -122,7 +957,6 @@ declare module 'assert' {
122
957
  strict: typeof strict;
123
958
  };
124
959
  }
125
-
126
960
  export = assert;
127
961
  }
128
962
  declare module 'node:assert' {