@augment-vir/core 31.38.0 → 31.40.0
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.
|
@@ -52,4 +52,20 @@ export type RemoveFirstTupleEntry<T extends any[]> = T extends [any?, ...infer T
|
|
|
52
52
|
*/
|
|
53
53
|
export type Tuple<Element, Length extends number> = Length extends Length ? number extends Length ? Element[] : _TupleOf<Element, Length, []> : never;
|
|
54
54
|
type _TupleOf<ArrayElementGeneric, LengthGeneric extends number, FullArrayGeneric extends unknown[]> = FullArrayGeneric['length'] extends LengthGeneric ? FullArrayGeneric : _TupleOf<ArrayElementGeneric, LengthGeneric, [ArrayElementGeneric, ...FullArrayGeneric]>;
|
|
55
|
+
/**
|
|
56
|
+
* Helper type for {@link TupleIndexes}.
|
|
57
|
+
*
|
|
58
|
+
* @category Array
|
|
59
|
+
* @category Package : @augment-vir/common
|
|
60
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
61
|
+
*/
|
|
62
|
+
export type TupleIndexesRecursive<T extends readonly unknown[], Accumulated extends number[] = []> = T extends readonly [any, ...infer Rest] ? Accumulated['length'] | TupleIndexesRecursive<Rest, [...Accumulated, 1]> : never;
|
|
63
|
+
/**
|
|
64
|
+
* Extracts all the indexes of a tuple.
|
|
65
|
+
*
|
|
66
|
+
* @category Array
|
|
67
|
+
* @category Package : @augment-vir/common
|
|
68
|
+
* @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
|
|
69
|
+
*/
|
|
70
|
+
export type TupleIndexes<T extends readonly unknown[]> = number extends T['length'] ? number : TupleIndexesRecursive<T>;
|
|
55
71
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augment-vir/core",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.40.0",
|
|
4
4
|
"description": "Core augment-vir augments. Use @augment-vir/common instead.",
|
|
5
5
|
"homepage": "https://github.com/electrovir/augment-vir",
|
|
6
6
|
"bugs": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"type-fest": "^5.0.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^24.
|
|
38
|
+
"@types/node": "^24.6.2",
|
|
39
39
|
"c8": "^10.1.3",
|
|
40
40
|
"istanbul-smart-text-reporter": "^1.1.5",
|
|
41
|
-
"typescript": "^5.9.
|
|
41
|
+
"typescript": "^5.9.3"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=22"
|