@augment-vir/core 31.68.4 → 31.69.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.
@@ -34,7 +34,10 @@ export type MaybeTuple<T> = T | AtLeastTuple<T, 1>;
34
34
  * @category Package : @augment-vir/common
35
35
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
36
36
  */
37
- export type RemoveLastTupleEntry<T extends any[]> = T extends [...infer Head, any?] ? Head : any[];
37
+ export type RemoveLastTupleEntry<T extends any[]> = T extends [
38
+ ...infer Head,
39
+ any?
40
+ ] ? Head : any[];
38
41
  /**
39
42
  * Remove the first entry in a tuple.
40
43
  *
@@ -42,7 +45,10 @@ export type RemoveLastTupleEntry<T extends any[]> = T extends [...infer Head, an
42
45
  * @category Package : @augment-vir/common
43
46
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
44
47
  */
45
- export type RemoveFirstTupleEntry<T extends any[]> = T extends [any?, ...infer Tail] ? Tail : any[];
48
+ export type RemoveFirstTupleEntry<T extends any[]> = T extends [
49
+ any?,
50
+ ...infer Tail
51
+ ] ? Tail : any[];
46
52
  /**
47
53
  * A tuple with entries of type `Element` and length of `Length`.
48
54
  *
@@ -51,7 +57,10 @@ export type RemoveFirstTupleEntry<T extends any[]> = T extends [any?, ...infer T
51
57
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
52
58
  */
53
59
  export type Tuple<Element, Length extends number> = Length extends Length ? number extends Length ? Element[] : _TupleOf<Element, Length, []> : never;
54
- type _TupleOf<ArrayElementGeneric, LengthGeneric extends number, FullArrayGeneric extends unknown[]> = FullArrayGeneric['length'] extends LengthGeneric ? FullArrayGeneric : _TupleOf<ArrayElementGeneric, LengthGeneric, [ArrayElementGeneric, ...FullArrayGeneric]>;
60
+ type _TupleOf<ArrayElementGeneric, LengthGeneric extends number, FullArrayGeneric extends unknown[]> = FullArrayGeneric['length'] extends LengthGeneric ? FullArrayGeneric : _TupleOf<ArrayElementGeneric, LengthGeneric, [
61
+ ArrayElementGeneric,
62
+ ...FullArrayGeneric
63
+ ]>;
55
64
  /**
56
65
  * Helper type for {@link TupleIndexes}.
57
66
  *
@@ -59,7 +68,13 @@ type _TupleOf<ArrayElementGeneric, LengthGeneric extends number, FullArrayGeneri
59
68
  * @category Package : @augment-vir/common
60
69
  * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common)
61
70
  */
62
- export type TupleIndexesRecursive<T extends readonly unknown[], Accumulated extends number[] = []> = T extends readonly [any, ...infer Rest] ? Accumulated['length'] | TupleIndexesRecursive<Rest, [...Accumulated, 1]> : never;
71
+ export type TupleIndexesRecursive<T extends readonly unknown[], Accumulated extends number[] = []> = T extends readonly [
72
+ any,
73
+ ...infer Rest
74
+ ] ? Accumulated['length'] | TupleIndexesRecursive<Rest, [
75
+ ...Accumulated,
76
+ 1
77
+ ]> : never;
63
78
  /**
64
79
  * Extracts all the indexes of a tuple.
65
80
  *
@@ -12,7 +12,13 @@
12
12
  * TypedFunction<string, number>; // (input: string) => number
13
13
  * TypedFunction<string[], number>; // (...inputs: string[]) => number
14
14
  * TypedFunction<[string[]], number>; // (input: string[]) => number
15
- * TypedFunction<[string, number], number>; // (input1: string, input2: number) => number
15
+ * TypedFunction<
16
+ * [
17
+ * string,
18
+ * number,
19
+ * ],
20
+ * number
21
+ * >; // (input1: string, input2: number) => number
16
22
  * TypedFunction<[string | undefined], number>; // (input1: string|undefined) => number
17
23
  * ```
18
24
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/core",
3
- "version": "31.68.4",
3
+ "version": "31.69.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": {
@@ -28,14 +28,14 @@
28
28
  "test:update": "npm test update"
29
29
  },
30
30
  "dependencies": {
31
- "@date-vir/duration": "^8.2.1",
31
+ "@date-vir/duration": "^8.3.2",
32
32
  "browser-or-node": "^3.0.0",
33
- "diff": "^8.0.4",
33
+ "diff": "^9.0.0",
34
34
  "json5": "^2.2.3",
35
- "type-fest": "^5.5.0"
35
+ "type-fest": "^5.6.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/node": "^25.5.2",
38
+ "@types/node": "^25.6.0",
39
39
  "c8": "^11.0.0",
40
40
  "istanbul-smart-text-reporter": "^1.1.5",
41
41
  "typescript": "^5.9.3"