@types/node 20.17.1 → 20.17.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.
node v20.17/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: Fri, 25 Oct 2024 12:43:47 GMT
11
+ * Last updated: Mon, 28 Oct 2024 20:34:09 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.17.1",
3
+ "version": "20.17.2",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.19.2"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "b76751733a79938f7e78a1425b8fb5d1fb2bac8f121d0cc05e642361c9c1ce88",
223
+ "typesPublisherContentHash": "23799ca41e31e653bce0829df613b9130b8f67657f52d5d074e9e3c876405c27",
224
224
  "typeScriptVersion": "4.8"
225
225
  }
node v20.17/util.d.ts CHANGED
@@ -1517,15 +1517,23 @@ declare module "util" {
1517
1517
  string | boolean
1518
1518
  >;
1519
1519
 
1520
+ type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
1521
+ & { -readonly [LongOption in keyof O]?: V[LongOption] }
1522
+ & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
1523
+ ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
1524
+
1520
1525
  type ParsedValues<T extends ParseArgsConfig> =
1521
1526
  & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1522
- & (T["options"] extends ParseArgsOptionsConfig ? {
1523
- -readonly [LongOption in keyof T["options"]]: IfDefaultsFalse<
1524
- T["options"][LongOption]["multiple"],
1525
- undefined | Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1526
- undefined | ExtractOptionValue<T, T["options"][LongOption]>
1527
- >;
1528
- }
1527
+ & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
1528
+ T["options"],
1529
+ {
1530
+ [LongOption in keyof T["options"]]: IfDefaultsFalse<
1531
+ T["options"][LongOption]["multiple"],
1532
+ Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1533
+ ExtractOptionValue<T, T["options"][LongOption]>
1534
+ >;
1535
+ }
1536
+ >
1529
1537
  : {});
1530
1538
 
1531
1539
  type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<