@types/node 18.11.5 → 20.2.5

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 (97) hide show
  1. node/README.md +2 -2
  2. node/assert.d.ts +86 -75
  3. node/async_hooks.d.ts +66 -37
  4. node/buffer.d.ts +193 -100
  5. node/child_process.d.ts +82 -56
  6. node/cluster.d.ts +12 -12
  7. node/console.d.ts +5 -5
  8. node/crypto.d.ts +233 -235
  9. node/dgram.d.ts +15 -15
  10. node/diagnostics_channel.d.ts +59 -21
  11. node/dns/promises.d.ts +50 -6
  12. node/dns.d.ts +26 -17
  13. node/domain.d.ts +4 -4
  14. node/events.d.ts +111 -65
  15. node/fs/promises.d.ts +99 -47
  16. node/fs.d.ts +244 -73
  17. node/globals.d.ts +6 -3
  18. node/http.d.ts +265 -148
  19. node/http2.d.ts +42 -47
  20. node/https.d.ts +53 -153
  21. node/index.d.ts +2 -1
  22. node/inspector.d.ts +10 -3
  23. node/module.d.ts +6 -4
  24. node/net.d.ts +32 -15
  25. node/os.d.ts +27 -16
  26. node/package.json +9 -4
  27. node/path.d.ts +4 -4
  28. node/perf_hooks.d.ts +28 -15
  29. node/process.d.ts +49 -46
  30. node/punycode.d.ts +1 -1
  31. node/querystring.d.ts +5 -5
  32. node/readline/promises.d.ts +65 -63
  33. node/readline.d.ts +32 -159
  34. node/repl.d.ts +20 -20
  35. node/stream/consumers.d.ts +1 -1
  36. node/stream.d.ts +950 -869
  37. node/string_decoder.d.ts +6 -6
  38. node/test.d.ts +877 -139
  39. node/timers/promises.d.ts +26 -1
  40. node/timers.d.ts +125 -4
  41. node/tls.d.ts +120 -29
  42. node/trace_events.d.ts +20 -9
  43. node/ts4.8/assert.d.ts +86 -75
  44. node/ts4.8/async_hooks.d.ts +66 -37
  45. node/ts4.8/buffer.d.ts +193 -101
  46. node/ts4.8/child_process.d.ts +82 -56
  47. node/ts4.8/cluster.d.ts +12 -12
  48. node/ts4.8/console.d.ts +5 -5
  49. node/ts4.8/crypto.d.ts +230 -233
  50. node/ts4.8/dgram.d.ts +15 -15
  51. node/ts4.8/diagnostics_channel.d.ts +59 -21
  52. node/ts4.8/dns/promises.d.ts +50 -6
  53. node/ts4.8/dns.d.ts +26 -17
  54. node/ts4.8/domain.d.ts +4 -4
  55. node/ts4.8/events.d.ts +111 -65
  56. node/ts4.8/fs/promises.d.ts +97 -46
  57. node/ts4.8/fs.d.ts +244 -73
  58. node/ts4.8/globals.d.ts +21 -12
  59. node/ts4.8/http.d.ts +265 -148
  60. node/ts4.8/http2.d.ts +42 -47
  61. node/ts4.8/https.d.ts +53 -153
  62. node/ts4.8/inspector.d.ts +10 -3
  63. node/ts4.8/module.d.ts +6 -4
  64. node/ts4.8/net.d.ts +33 -16
  65. node/ts4.8/os.d.ts +27 -16
  66. node/ts4.8/path.d.ts +4 -4
  67. node/ts4.8/perf_hooks.d.ts +28 -15
  68. node/ts4.8/process.d.ts +49 -46
  69. node/ts4.8/punycode.d.ts +1 -1
  70. node/ts4.8/querystring.d.ts +5 -5
  71. node/ts4.8/readline/promises.d.ts +65 -63
  72. node/ts4.8/readline.d.ts +32 -159
  73. node/ts4.8/repl.d.ts +20 -20
  74. node/ts4.8/stream/consumers.d.ts +1 -1
  75. node/ts4.8/stream.d.ts +192 -140
  76. node/ts4.8/string_decoder.d.ts +6 -6
  77. node/ts4.8/test.d.ts +877 -139
  78. node/ts4.8/timers/promises.d.ts +26 -1
  79. node/ts4.8/timers.d.ts +125 -4
  80. node/ts4.8/tls.d.ts +120 -29
  81. node/ts4.8/trace_events.d.ts +20 -9
  82. node/ts4.8/tty.d.ts +4 -5
  83. node/ts4.8/url.d.ts +46 -42
  84. node/ts4.8/util.d.ts +325 -123
  85. node/ts4.8/v8.d.ts +253 -14
  86. node/ts4.8/vm.d.ts +417 -32
  87. node/ts4.8/wasi.d.ts +13 -19
  88. node/ts4.8/worker_threads.d.ts +38 -34
  89. node/ts4.8/zlib.d.ts +11 -11
  90. node/tty.d.ts +4 -5
  91. node/url.d.ts +46 -42
  92. node/util.d.ts +325 -123
  93. node/v8.d.ts +253 -14
  94. node/vm.d.ts +417 -32
  95. node/wasi.d.ts +13 -19
  96. node/worker_threads.d.ts +38 -34
  97. node/zlib.d.ts +11 -11
node/ts4.8/assert.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
- * The `assert` module provides a set of assertion functions for verifying
2
+ * The `node:assert` module provides a set of assertion functions for verifying
3
3
  * invariants.
4
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v20.2.0/lib/assert.js)
5
5
  */
6
6
  declare module 'assert' {
7
7
  /**
@@ -12,14 +12,28 @@ declare module 'assert' {
12
12
  function assert(value: unknown, message?: string | Error): asserts value;
13
13
  namespace assert {
14
14
  /**
15
- * Indicates the failure of an assertion. All errors thrown by the `assert` module
16
- * will be instances of the `AssertionError` class.
15
+ * Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
17
16
  */
18
17
  class AssertionError extends Error {
18
+ /**
19
+ * Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
20
+ */
19
21
  actual: unknown;
22
+ /**
23
+ * Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
24
+ */
20
25
  expected: unknown;
26
+ /**
27
+ * Set to the passed in operator value.
28
+ */
21
29
  operator: string;
30
+ /**
31
+ * Indicates if the message was auto-generated (`true`) or not.
32
+ */
22
33
  generatedMessage: boolean;
34
+ /**
35
+ * Value is always `ERR_ASSERTION` to show that the error is an assertion error.
36
+ */
23
37
  code: 'ERR_ASSERTION';
24
38
  constructor(options?: {
25
39
  /** If provided, the error message is set to this value. */
@@ -36,9 +50,10 @@ declare module 'assert' {
36
50
  });
37
51
  }
38
52
  /**
39
- * This feature is currently experimental and behavior might still change.
53
+ * This feature is deprecated and will be removed in a future version.
54
+ * Please consider using alternatives such as the `mock` helper function.
40
55
  * @since v14.2.0, v12.19.0
41
- * @experimental
56
+ * @deprecated Deprecated
42
57
  */
43
58
  class CallTracker {
44
59
  /**
@@ -47,7 +62,7 @@ declare module 'assert' {
47
62
  * error.
48
63
  *
49
64
  * ```js
50
- * import assert from 'assert';
65
+ * import assert from 'node:assert';
51
66
  *
52
67
  * // Creates call tracker.
53
68
  * const tracker = new assert.CallTracker();
@@ -78,12 +93,11 @@ declare module 'assert' {
78
93
  * callsfunc(1, 2, 3);
79
94
  *
80
95
  * assert.deepStrictEqual(tracker.getCalls(callsfunc),
81
- * [{ thisArg: this, arguments: [1, 2, 3 ] }]);
96
+ * [{ thisArg: undefined, arguments: [1, 2, 3] }]);
82
97
  * ```
83
- *
84
98
  * @since v18.8.0, v16.18.0
85
- * @params fn
86
- * @returns An Array with the calls to a tracked function.
99
+ * @param fn
100
+ * @return An Array with all the calls to a tracked function.
87
101
  */
88
102
  getCalls(fn: Function): CallTrackerCall[];
89
103
  /**
@@ -91,21 +105,19 @@ declare module 'assert' {
91
105
  * the functions that have not been called the expected number of times.
92
106
  *
93
107
  * ```js
94
- * import assert from 'assert';
108
+ * import assert from 'node:assert';
95
109
  *
96
110
  * // Creates call tracker.
97
111
  * const tracker = new assert.CallTracker();
98
112
  *
99
113
  * function func() {}
100
114
  *
101
- * function foo() {}
102
- *
103
115
  * // Returns a function that wraps func() that must be called exact times
104
116
  * // before tracker.verify().
105
117
  * const callsfunc = tracker.calls(func, 2);
106
118
  *
107
119
  * // Returns an array containing information on callsfunc()
108
- * tracker.report();
120
+ * console.log(tracker.report());
109
121
  * // [
110
122
  * // {
111
123
  * // message: 'Expected the func function to be executed 2 time(s) but was
@@ -118,7 +130,7 @@ declare module 'assert' {
118
130
  * // ]
119
131
  * ```
120
132
  * @since v14.2.0, v12.19.0
121
- * @return of objects containing information about the wrapper functions returned by `calls`.
133
+ * @return An Array of objects containing information about the wrapper functions returned by `calls`.
122
134
  */
123
135
  report(): CallTrackerReportInformation[];
124
136
  /**
@@ -136,12 +148,11 @@ declare module 'assert' {
136
148
  *
137
149
  * callsfunc();
138
150
  * // Tracker was called once
139
- * tracker.getCalls(callsfunc).length === 1;
151
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
140
152
  *
141
153
  * tracker.reset(callsfunc);
142
- * tracker.getCalls(callsfunc).length === 0;
154
+ * assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
143
155
  * ```
144
- *
145
156
  * @since v18.8.0, v16.18.0
146
157
  * @param fn a tracked function to reset.
147
158
  */
@@ -151,7 +162,7 @@ declare module 'assert' {
151
162
  * have not been called the expected number of times.
152
163
  *
153
164
  * ```js
154
- * import assert from 'assert';
165
+ * import assert from 'node:assert';
155
166
  *
156
167
  * // Creates call tracker.
157
168
  * const tracker = new assert.CallTracker();
@@ -193,7 +204,7 @@ declare module 'assert' {
193
204
  * it will be thrown instead of the `AssertionError`.
194
205
  *
195
206
  * ```js
196
- * import assert from 'assert/strict';
207
+ * import assert from 'node:assert/strict';
197
208
  *
198
209
  * assert.fail();
199
210
  * // AssertionError [ERR_ASSERTION]: Failed
@@ -231,7 +242,7 @@ declare module 'assert' {
231
242
  * thrown in a file! See below for further details.
232
243
  *
233
244
  * ```js
234
- * import assert from 'assert/strict';
245
+ * import assert from 'node:assert/strict';
235
246
  *
236
247
  * assert.ok(true);
237
248
  * // OK
@@ -266,7 +277,7 @@ declare module 'assert' {
266
277
  * ```
267
278
  *
268
279
  * ```js
269
- * import assert from 'assert/strict';
280
+ * import assert from 'node:assert/strict';
270
281
  *
271
282
  * // Using `assert()` works the same:
272
283
  * assert(0);
@@ -291,7 +302,7 @@ declare module 'assert' {
291
302
  * and treated as being identical if both sides are `NaN`.
292
303
  *
293
304
  * ```js
294
- * import assert from 'assert';
305
+ * import assert from 'node:assert';
295
306
  *
296
307
  * assert.equal(1, 1);
297
308
  * // OK, 1 == 1
@@ -324,7 +335,7 @@ declare module 'assert' {
324
335
  * specially handled and treated as being identical if both sides are `NaN`.
325
336
  *
326
337
  * ```js
327
- * import assert from 'assert';
338
+ * import assert from 'node:assert';
328
339
  *
329
340
  * assert.notEqual(1, 2);
330
341
  * // OK
@@ -371,24 +382,24 @@ declare module 'assert' {
371
382
  * Tests for any deep inequality. Opposite of {@link deepEqual}.
372
383
  *
373
384
  * ```js
374
- * import assert from 'assert';
385
+ * import assert from 'node:assert';
375
386
  *
376
387
  * const obj1 = {
377
388
  * a: {
378
- * b: 1
379
- * }
389
+ * b: 1,
390
+ * },
380
391
  * };
381
392
  * const obj2 = {
382
393
  * a: {
383
- * b: 2
384
- * }
394
+ * b: 2,
395
+ * },
385
396
  * };
386
397
  * const obj3 = {
387
398
  * a: {
388
- * b: 1
389
- * }
399
+ * b: 1,
400
+ * },
390
401
  * };
391
- * const obj4 = Object.create(obj1);
402
+ * const obj4 = { __proto__: obj1 };
392
403
  *
393
404
  * assert.notDeepEqual(obj1, obj1);
394
405
  * // AssertionError: { a: { b: 1 } } notDeepEqual { a: { b: 1 } }
@@ -414,7 +425,7 @@ declare module 'assert' {
414
425
  * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
415
426
  *
416
427
  * ```js
417
- * import assert from 'assert/strict';
428
+ * import assert from 'node:assert/strict';
418
429
  *
419
430
  * assert.strictEqual(1, 2);
420
431
  * // AssertionError [ERR_ASSERTION]: Expected inputs to be strictly equal:
@@ -452,7 +463,7 @@ declare module 'assert' {
452
463
  * determined by [`Object.is()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).
453
464
  *
454
465
  * ```js
455
- * import assert from 'assert/strict';
466
+ * import assert from 'node:assert/strict';
456
467
  *
457
468
  * assert.notStrictEqual(1, 2);
458
469
  * // OK
@@ -483,7 +494,7 @@ declare module 'assert' {
483
494
  * Tests for deep strict inequality. Opposite of {@link deepStrictEqual}.
484
495
  *
485
496
  * ```js
486
- * import assert from 'assert/strict';
497
+ * import assert from 'node:assert/strict';
487
498
  *
488
499
  * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });
489
500
  * // OK
@@ -514,14 +525,14 @@ declare module 'assert' {
514
525
  * Custom validation object/error instance:
515
526
  *
516
527
  * ```js
517
- * import assert from 'assert/strict';
528
+ * import assert from 'node:assert/strict';
518
529
  *
519
530
  * const err = new TypeError('Wrong value');
520
531
  * err.code = 404;
521
532
  * err.foo = 'bar';
522
533
  * err.info = {
523
534
  * nested: true,
524
- * baz: 'text'
535
+ * baz: 'text',
525
536
  * };
526
537
  * err.reg = /abc/i;
527
538
  *
@@ -534,16 +545,16 @@ declare module 'assert' {
534
545
  * message: 'Wrong value',
535
546
  * info: {
536
547
  * nested: true,
537
- * baz: 'text'
538
- * }
548
+ * baz: 'text',
549
+ * },
539
550
  * // Only properties on the validation object will be tested for.
540
551
  * // Using nested objects requires all properties to be present. Otherwise
541
552
  * // the validation is going to fail.
542
- * }
553
+ * },
543
554
  * );
544
555
  *
545
556
  * // Using regular expressions to validate error properties:
546
- * throws(
557
+ * assert.throws(
547
558
  * () => {
548
559
  * throw err;
549
560
  * },
@@ -557,17 +568,17 @@ declare module 'assert' {
557
568
  * info: {
558
569
  * nested: true,
559
570
  * // It is not possible to use regular expressions for nested properties!
560
- * baz: 'text'
571
+ * baz: 'text',
561
572
  * },
562
573
  * // The `reg` property contains a regular expression and only if the
563
574
  * // validation object contains an identical regular expression, it is going
564
575
  * // to pass.
565
- * reg: /abc/i
566
- * }
576
+ * reg: /abc/i,
577
+ * },
567
578
  * );
568
579
  *
569
580
  * // Fails due to the different `message` and `name` properties:
570
- * throws(
581
+ * assert.throws(
571
582
  * () => {
572
583
  * const otherErr = new Error('Not found');
573
584
  * // Copy all enumerable properties from `err` to `otherErr`.
@@ -578,20 +589,20 @@ declare module 'assert' {
578
589
  * },
579
590
  * // The error's `message` and `name` properties will also be checked when using
580
591
  * // an error as validation object.
581
- * err
592
+ * err,
582
593
  * );
583
594
  * ```
584
595
  *
585
596
  * Validate instanceof using constructor:
586
597
  *
587
598
  * ```js
588
- * import assert from 'assert/strict';
599
+ * import assert from 'node:assert/strict';
589
600
  *
590
601
  * assert.throws(
591
602
  * () => {
592
603
  * throw new Error('Wrong value');
593
604
  * },
594
- * Error
605
+ * Error,
595
606
  * );
596
607
  * ```
597
608
  *
@@ -601,13 +612,13 @@ declare module 'assert' {
601
612
  * therefore also include the error name.
602
613
  *
603
614
  * ```js
604
- * import assert from 'assert/strict';
615
+ * import assert from 'node:assert/strict';
605
616
  *
606
617
  * assert.throws(
607
618
  * () => {
608
619
  * throw new Error('Wrong value');
609
620
  * },
610
- * /^Error: Wrong value$/
621
+ * /^Error: Wrong value$/,
611
622
  * );
612
623
  * ```
613
624
  *
@@ -617,7 +628,7 @@ declare module 'assert' {
617
628
  * It will otherwise fail with an `AssertionError`.
618
629
  *
619
630
  * ```js
620
- * import assert from 'assert/strict';
631
+ * import assert from 'node:assert/strict';
621
632
  *
622
633
  * assert.throws(
623
634
  * () => {
@@ -633,7 +644,7 @@ declare module 'assert' {
633
644
  * // possible.
634
645
  * return true;
635
646
  * },
636
- * 'unexpected error'
647
+ * 'unexpected error',
637
648
  * );
638
649
  * ```
639
650
  *
@@ -643,7 +654,7 @@ declare module 'assert' {
643
654
  * a string as the second argument gets considered:
644
655
  *
645
656
  * ```js
646
- * import assert from 'assert/strict';
657
+ * import assert from 'node:assert/strict';
647
658
  *
648
659
  * function throwingFirst() {
649
660
  * throw new Error('First');
@@ -699,20 +710,20 @@ declare module 'assert' {
699
710
  * propagated back to the caller.
700
711
  *
701
712
  * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
702
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
713
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
703
714
  * function. See {@link throws} for more details.
704
715
  *
705
716
  * The following, for instance, will throw the `TypeError` because there is no
706
717
  * matching error type in the assertion:
707
718
  *
708
719
  * ```js
709
- * import assert from 'assert/strict';
720
+ * import assert from 'node:assert/strict';
710
721
  *
711
722
  * assert.doesNotThrow(
712
723
  * () => {
713
724
  * throw new TypeError('Wrong value');
714
725
  * },
715
- * SyntaxError
726
+ * SyntaxError,
716
727
  * );
717
728
  * ```
718
729
  *
@@ -720,27 +731,27 @@ declare module 'assert' {
720
731
  * 'Got unwanted exception...':
721
732
  *
722
733
  * ```js
723
- * import assert from 'assert/strict';
734
+ * import assert from 'node:assert/strict';
724
735
  *
725
736
  * assert.doesNotThrow(
726
737
  * () => {
727
738
  * throw new TypeError('Wrong value');
728
739
  * },
729
- * TypeError
740
+ * TypeError,
730
741
  * );
731
742
  * ```
732
743
  *
733
744
  * 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:
734
745
  *
735
746
  * ```js
736
- * import assert from 'assert/strict';
747
+ * import assert from 'node:assert/strict';
737
748
  *
738
749
  * assert.doesNotThrow(
739
750
  * () => {
740
751
  * throw new TypeError('Wrong value');
741
752
  * },
742
753
  * /Wrong value/,
743
- * 'Whoops'
754
+ * 'Whoops',
744
755
  * );
745
756
  * // Throws: AssertionError: Got unwanted exception: Whoops
746
757
  * ```
@@ -754,7 +765,7 @@ declare module 'assert' {
754
765
  * from the error passed to `ifError()` including the potential new frames for`ifError()` itself.
755
766
  *
756
767
  * ```js
757
- * import assert from 'assert/strict';
768
+ * import assert from 'node:assert/strict';
758
769
  *
759
770
  * assert.ifError(null);
760
771
  * // OK
@@ -800,7 +811,7 @@ declare module 'assert' {
800
811
  * If specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.
801
812
  *
802
813
  * ```js
803
- * import assert from 'assert/strict';
814
+ * import assert from 'node:assert/strict';
804
815
  *
805
816
  * await assert.rejects(
806
817
  * async () => {
@@ -808,13 +819,13 @@ declare module 'assert' {
808
819
  * },
809
820
  * {
810
821
  * name: 'TypeError',
811
- * message: 'Wrong value'
812
- * }
822
+ * message: 'Wrong value',
823
+ * },
813
824
  * );
814
825
  * ```
815
826
  *
816
827
  * ```js
817
- * import assert from 'assert/strict';
828
+ * import assert from 'node:assert/strict';
818
829
  *
819
830
  * await assert.rejects(
820
831
  * async () => {
@@ -824,16 +835,16 @@ declare module 'assert' {
824
835
  * assert.strictEqual(err.name, 'TypeError');
825
836
  * assert.strictEqual(err.message, 'Wrong value');
826
837
  * return true;
827
- * }
838
+ * },
828
839
  * );
829
840
  * ```
830
841
  *
831
842
  * ```js
832
- * import assert from 'assert/strict';
843
+ * import assert from 'node:assert/strict';
833
844
  *
834
845
  * assert.rejects(
835
846
  * Promise.reject(new Error('Wrong value')),
836
- * Error
847
+ * Error,
837
848
  * ).then(() => {
838
849
  * // ...
839
850
  * });
@@ -863,24 +874,24 @@ declare module 'assert' {
863
874
  * error messages as expressive as possible.
864
875
  *
865
876
  * If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
866
- * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
877
+ * [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
867
878
  * function. See {@link throws} for more details.
868
879
  *
869
880
  * Besides the async nature to await the completion behaves identically to {@link doesNotThrow}.
870
881
  *
871
882
  * ```js
872
- * import assert from 'assert/strict';
883
+ * import assert from 'node:assert/strict';
873
884
  *
874
885
  * await assert.doesNotReject(
875
886
  * async () => {
876
887
  * throw new TypeError('Wrong value');
877
888
  * },
878
- * SyntaxError
889
+ * SyntaxError,
879
890
  * );
880
891
  * ```
881
892
  *
882
893
  * ```js
883
- * import assert from 'assert/strict';
894
+ * import assert from 'node:assert/strict';
884
895
  *
885
896
  * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))
886
897
  * .then(() => {
@@ -895,7 +906,7 @@ declare module 'assert' {
895
906
  * Expects the `string` input to match the regular expression.
896
907
  *
897
908
  * ```js
898
- * import assert from 'assert/strict';
909
+ * import assert from 'node:assert/strict';
899
910
  *
900
911
  * assert.match('I will fail', /pass/);
901
912
  * // AssertionError [ERR_ASSERTION]: The input did not match the regular ...
@@ -918,7 +929,7 @@ declare module 'assert' {
918
929
  * Expects the `string` input not to match the regular expression.
919
930
  *
920
931
  * ```js
921
- * import assert from 'assert/strict';
932
+ * import assert from 'node:assert/strict';
922
933
  *
923
934
  * assert.doesNotMatch('I will fail', /fail/);
924
935
  * // AssertionError [ERR_ASSERTION]: The input was expected to not match the ...