@types/node 18.19.58 → 18.19.60

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 v18.19/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/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 22 Oct 2024 02:30:55 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
node v18.19/assert.d.ts CHANGED
@@ -31,7 +31,7 @@ declare module "assert" {
31
31
  /** The `operator` property on the error instance. */
32
32
  operator?: string | undefined;
33
33
  /** If provided, the generated stack trace omits frames before this function. */
34
- // eslint-disable-next-line @typescript-eslint/ban-types
34
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
35
35
  stackStartFn?: Function | undefined;
36
36
  });
37
37
  }
@@ -217,7 +217,7 @@ declare module "assert" {
217
217
  expected: unknown,
218
218
  message?: string | Error,
219
219
  operator?: string,
220
- // eslint-disable-next-line @typescript-eslint/ban-types
220
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
221
221
  stackStartFn?: Function,
222
222
  ): never;
223
223
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.58",
3
+ "version": "18.19.60",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -225,6 +225,6 @@
225
225
  "undici-types": "~5.26.4"
226
226
  },
227
227
  "peerDependencies": {},
228
- "typesPublisherContentHash": "aec7dc89479a5ad2bcdc955d181427363333042581937ec611b8e0e50b83e1a0",
228
+ "typesPublisherContentHash": "8a5b574e41d1a71693b1cc467b89abe5419b9be115cfc989c54b8475c8f224fc",
229
229
  "typeScriptVersion": "4.8"
230
230
  }
node v18.19/util.d.ts CHANGED
@@ -1393,15 +1393,23 @@ declare module "util" {
1393
1393
  string | boolean
1394
1394
  >;
1395
1395
 
1396
+ type ApplyOptionalModifiers<O extends ParseArgsOptionsConfig, V extends Record<keyof O, unknown>> = (
1397
+ & { -readonly [LongOption in keyof O]?: V[LongOption] }
1398
+ & { [LongOption in keyof O as O[LongOption]["default"] extends {} ? LongOption : never]: V[LongOption] }
1399
+ ) extends infer P ? { [K in keyof P]: P[K] } : never; // resolve intersection to object
1400
+
1396
1401
  type ParsedValues<T extends ParseArgsConfig> =
1397
1402
  & IfDefaultsTrue<T["strict"], unknown, { [longOption: string]: undefined | string | boolean }>
1398
- & (T["options"] extends ParseArgsOptionsConfig ? {
1399
- -readonly [LongOption in keyof T["options"]]: IfDefaultsFalse<
1400
- T["options"][LongOption]["multiple"],
1401
- undefined | Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1402
- undefined | ExtractOptionValue<T, T["options"][LongOption]>
1403
- >;
1404
- }
1403
+ & (T["options"] extends ParseArgsOptionsConfig ? ApplyOptionalModifiers<
1404
+ T["options"],
1405
+ {
1406
+ [LongOption in keyof T["options"]]: IfDefaultsFalse<
1407
+ T["options"][LongOption]["multiple"],
1408
+ Array<ExtractOptionValue<T, T["options"][LongOption]>>,
1409
+ ExtractOptionValue<T, T["options"][LongOption]>
1410
+ >;
1411
+ }
1412
+ >
1405
1413
  : {});
1406
1414
 
1407
1415
  type ParsedPositionals<T extends ParseArgsConfig> = IfDefaultsTrue<