@types/node 20.16.5 → 20.16.6

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 v20.16/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 04 Sep 2024 21:35:57 GMT
11
+ * Last updated: Mon, 23 Sep 2024 21:07:32 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.16.5",
3
+ "version": "20.16.6",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -212,6 +212,6 @@
212
212
  "dependencies": {
213
213
  "undici-types": "~6.19.2"
214
214
  },
215
- "typesPublisherContentHash": "0031738d9b4600037faf992f8a3057514a229d4bdf728ed6eb4b4e33cdf5c119",
215
+ "typesPublisherContentHash": "1adb5361b777163d4d3e6fe64ea26e5a57ca250c4ab2d87ef80cfe87040f2555",
216
216
  "typeScriptVersion": "4.8"
217
217
  }
node v20.16/test.d.ts CHANGED
@@ -633,6 +633,22 @@ declare module "node:test" {
633
633
  deepEqual: typeof import("node:assert").deepEqual;
634
634
  /**
635
635
  * Identical to the `deepStrictEqual` function from the `node:assert` module, but bound to the test context.
636
+ *
637
+ * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a
638
+ * type annotation, otherwise an error will be raised by the TypeScript compiler:
639
+ * ```ts
640
+ * import { test, type TestContext } from 'node:test';
641
+ *
642
+ * // The test function's context parameter must have a type annotation.
643
+ * test('example', (t: TestContext) => {
644
+ * t.assert.deepStrictEqual(actual, expected);
645
+ * });
646
+ *
647
+ * // Omitting the type annotation will result in a compilation error.
648
+ * test('example', t => {
649
+ * t.assert.deepStrictEqual(actual, expected); // Error: 't' needs an explicit type annotation.
650
+ * });
651
+ * ```
636
652
  */
637
653
  deepStrictEqual: typeof import("node:assert").deepStrictEqual;
638
654
  /**
@@ -657,6 +673,22 @@ declare module "node:test" {
657
673
  fail: typeof import("node:assert").fail;
658
674
  /**
659
675
  * Identical to the `ifError` function from the `node:assert` module, but bound to the test context.
676
+ *
677
+ * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a
678
+ * type annotation, otherwise an error will be raised by the TypeScript compiler:
679
+ * ```ts
680
+ * import { test, type TestContext } from 'node:test';
681
+ *
682
+ * // The test function's context parameter must have a type annotation.
683
+ * test('example', (t: TestContext) => {
684
+ * t.assert.ifError(err);
685
+ * });
686
+ *
687
+ * // Omitting the type annotation will result in a compilation error.
688
+ * test('example', t => {
689
+ * t.assert.ifError(err); // Error: 't' needs an explicit type annotation.
690
+ * });
691
+ * ```
660
692
  */
661
693
  ifError: typeof import("node:assert").ifError;
662
694
  /**
@@ -681,6 +713,22 @@ declare module "node:test" {
681
713
  notStrictEqual: typeof import("node:assert").notStrictEqual;
682
714
  /**
683
715
  * Identical to the `ok` function from the `node:assert` module, but bound to the test context.
716
+ *
717
+ * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a
718
+ * type annotation, otherwise an error will be raised by the TypeScript compiler:
719
+ * ```ts
720
+ * import { test, type TestContext } from 'node:test';
721
+ *
722
+ * // The test function's context parameter must have a type annotation.
723
+ * test('example', (t: TestContext) => {
724
+ * t.assert.ok(condition);
725
+ * });
726
+ *
727
+ * // Omitting the type annotation will result in a compilation error.
728
+ * test('example', t => {
729
+ * t.assert.ok(condition)); // Error: 't' needs an explicit type annotation.
730
+ * });
731
+ * ```
684
732
  */
685
733
  ok: typeof import("node:assert").ok;
686
734
  /**
@@ -689,6 +737,22 @@ declare module "node:test" {
689
737
  rejects: typeof import("node:assert").rejects;
690
738
  /**
691
739
  * Identical to the `strictEqual` function from the `node:assert` module, but bound to the test context.
740
+ *
741
+ * **Note:** as this method returns a type assertion, the context parameter in the callback signature must have a
742
+ * type annotation, otherwise an error will be raised by the TypeScript compiler:
743
+ * ```ts
744
+ * import { test, type TestContext } from 'node:test';
745
+ *
746
+ * // The test function's context parameter must have a type annotation.
747
+ * test('example', (t: TestContext) => {
748
+ * t.assert.strictEqual(actual, expected);
749
+ * });
750
+ *
751
+ * // Omitting the type annotation will result in a compilation error.
752
+ * test('example', t => {
753
+ * t.assert.strictEqual(actual, expected); // Error: 't' needs an explicit type annotation.
754
+ * });
755
+ * ```
692
756
  */
693
757
  strictEqual: typeof import("node:assert").strictEqual;
694
758
  /**