@augment-vir/core 31.71.0 → 31.71.1

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.
@@ -5,7 +5,7 @@
5
5
  * @category Package : @augment-vir/common
6
6
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
7
7
  */
8
- export type ArrayElement<ArrayType extends ReadonlyArray<any>> = ArrayType[number];
8
+ export type ArrayElement<T extends ReadonlyArray<any>> = T[number];
9
9
  /**
10
10
  * Either an array of `T` or just `T` itself.
11
11
  *
@@ -1,3 +1,4 @@
1
+ import { type ArrayElement } from '../array/array.js';
1
2
  import { type CompleteRequire } from './required-keys.js';
2
3
  /**
3
4
  * Gets the value types of an object with all parts of that object required.
@@ -14,7 +15,7 @@ export type CompleteValues<T> = CompleteRequire<T>[keyof T];
14
15
  * @category Package : @augment-vir/common
15
16
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
16
17
  */
17
- export type Values<T> = T[keyof T];
18
+ export type Values<T> = T extends ReadonlyArray<unknown> ? ArrayElement<T> : T[keyof T];
18
19
  /**
19
20
  * Gets the value within an object when all its keys are required.
20
21
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.71.0",
3
+ "version": "31.71.1",
4
4
  "description": "Core augment-vir augments. Use @augment-vir/common instead.",
5
5
  "homepage": "https://github.com/electrovir/augment-vir",
6
6
  "bugs": {