@thi.ng/api 7.1.9 → 7.2.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.
package/CHANGELOG.md CHANGED
@@ -3,41 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [7.1.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.8...@thi.ng/api@7.1.9) (2021-08-08)
6
+ # [7.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.9...@thi.ng/api@7.2.0) (2021-09-03)
7
7
 
8
- **Note:** Version bump only for package @thi.ng/api
9
8
 
9
+ ### Features
10
10
 
11
-
12
-
13
-
14
- ## [7.1.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.7...@thi.ng/api@7.1.8) (2021-08-08)
15
-
16
- **Note:** Version bump only for package @thi.ng/api
17
-
18
-
19
-
20
-
21
-
22
- ## [7.1.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.6...@thi.ng/api@7.1.7) (2021-08-04)
23
-
24
- **Note:** Version bump only for package @thi.ng/api
25
-
26
-
27
-
28
-
29
-
30
- ## [7.1.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.5...@thi.ng/api@7.1.6) (2021-07-01)
31
-
32
- **Note:** Version bump only for package @thi.ng/api
33
-
34
-
35
-
36
-
37
-
38
- ## [7.1.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/api@7.1.4...@thi.ng/api@7.1.5) (2021-06-08)
39
-
40
- **Note:** Version bump only for package @thi.ng/api
11
+ * **api:** add DeepArrayValue type ([a309fac](https://github.com/thi-ng/umbrella/commit/a309faca831651f611b9b056d9c7587f85b60087))
41
12
 
42
13
 
43
14
 
package/api/tuple.d.ts CHANGED
@@ -1,7 +1,16 @@
1
+ import type { TypedArray } from "./typedarray";
1
2
  /**
2
- * Returns an array's value type.
3
+ * Returns an array's value type. Assumes array is homogeneous (only type of
4
+ * first element will be considered).
3
5
  */
4
6
  export declare type ArrayValue<T extends unknown[]> = T[0];
7
+ /**
8
+ * Somewhat similar, but recursive version of {@link ArrayValue}. If `T` is an
9
+ * array/typedarray recursively descends into it or (if not an array) returns
10
+ * `T`. Assumes arrays at each level are homogeneous (only type of first
11
+ * elements will be considered).
12
+ */
13
+ export declare type DeepArrayValue<T> = T extends unknown[] ? DeepArrayValue<T[0]> : T extends TypedArray ? number : T;
5
14
  /**
6
15
  * Defines a fixed sized, iterable tuple with elements of type `T` and
7
16
  * length `N`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/api",
3
- "version": "7.1.9",
3
+ "version": "7.2.0",
4
4
  "description": "Common, generic types, interfaces & mixins",
5
5
  "module": "./index.js",
6
6
  "main": "./lib/index.js",
@@ -63,5 +63,5 @@
63
63
  "setTimeout": false
64
64
  },
65
65
  "sideEffects": false,
66
- "gitHead": "538019e9d8ca6c5fee4754af93ad454c0674dc72"
66
+ "gitHead": "d971cb3f9b215a95483f78f1a8614015e331146f"
67
67
  }