@thi.ng/api 8.3.1 → 8.3.4
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 +1 -1
- package/README.md +2 -2
- package/deref.d.ts +1 -1
- package/deref.js +1 -1
- package/keyval.d.ts +10 -10
- package/package.json +6 -6
- package/typedarray.d.ts +4 -4
- package/typedarray.js +4 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ node --experimental-repl-await
|
|
|
60
60
|
> const api = await import("@thi.ng/api");
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Package sizes (gzipped, pre-treeshake): ESM: 2.
|
|
63
|
+
Package sizes (gzipped, pre-treeshake): ESM: 2.25 KB
|
|
64
64
|
|
|
65
65
|
## Dependencies
|
|
66
66
|
|
|
@@ -93,4 +93,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
93
93
|
|
|
94
94
|
## License
|
|
95
95
|
|
|
96
|
-
© 2016 -
|
|
96
|
+
© 2016 - 2022 Karsten Schmidt // Apache Software License 2.0
|
package/deref.d.ts
CHANGED
package/deref.js
CHANGED
package/keyval.d.ts
CHANGED
|
@@ -49,9 +49,9 @@ export declare type Val8<T, A extends Keys<T>, B extends Keys1<T, A>, C extends
|
|
|
49
49
|
*
|
|
50
50
|
* @internal
|
|
51
51
|
*
|
|
52
|
-
* @param T
|
|
53
|
-
* @param C
|
|
54
|
-
* @param R
|
|
52
|
+
* @param T - he structure to get the values from.
|
|
53
|
+
* @param C - he current key.
|
|
54
|
+
* @param R - he remaining keys
|
|
55
55
|
*/
|
|
56
56
|
declare type ValNReducer<T, C, R extends unknown[]> = C extends keyof T ? {
|
|
57
57
|
0: T[C];
|
|
@@ -91,9 +91,9 @@ export declare type Without8<T, A extends Keys<T>, B extends Keys1<T, A>, C exte
|
|
|
91
91
|
*
|
|
92
92
|
* @internal
|
|
93
93
|
*
|
|
94
|
-
* @param T
|
|
95
|
-
* @param C
|
|
96
|
-
* @param R
|
|
94
|
+
* @param T - he structure to remove keys from.
|
|
95
|
+
* @param C - he current key.
|
|
96
|
+
* @param R - he remaining keys.
|
|
97
97
|
*/
|
|
98
98
|
declare type WithoutNReducer<T, C, R extends unknown[]> = C extends keyof T ? {
|
|
99
99
|
0: Without<T, C>;
|
|
@@ -135,10 +135,10 @@ export declare type Replace8<T, A extends Keys<T>, B extends Keys1<T, A>, C exte
|
|
|
135
135
|
*
|
|
136
136
|
* @internal
|
|
137
137
|
*
|
|
138
|
-
* @param T
|
|
139
|
-
* @param C
|
|
140
|
-
* @param R
|
|
141
|
-
* @param V
|
|
138
|
+
* @param T - he structure to remove keys from.
|
|
139
|
+
* @param C - he current key.
|
|
140
|
+
* @param R - he remaining keys.
|
|
141
|
+
* @param V - he type to use for the replacement.
|
|
142
142
|
*/
|
|
143
143
|
declare type ReplaceNReducer<T, C, R extends unknown[], V> = C extends keyof T ? {
|
|
144
144
|
0: Replace<T, C, V>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/api",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.4",
|
|
4
4
|
"description": "Common, generic types, interfaces & mixins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@microsoft/api-extractor": "^7.
|
|
38
|
-
"@thi.ng/testament": "^0.2.
|
|
37
|
+
"@microsoft/api-extractor": "^7.19.4",
|
|
38
|
+
"@thi.ng/testament": "^0.2.4",
|
|
39
39
|
"rimraf": "^3.0.2",
|
|
40
40
|
"tools": "^0.0.1",
|
|
41
|
-
"typedoc": "^0.22.
|
|
42
|
-
"typescript": "^4.
|
|
41
|
+
"typedoc": "^0.22.13",
|
|
42
|
+
"typescript": "^4.6.2"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
45
45
|
"assert",
|
|
@@ -222,5 +222,5 @@
|
|
|
222
222
|
"import": "./watch.js"
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
|
-
"gitHead": "
|
|
225
|
+
"gitHead": "0fc692a3225c068aacafdc4cb6140cf603c67ad8\n"
|
|
226
226
|
}
|
package/typedarray.d.ts
CHANGED
|
@@ -115,7 +115,7 @@ export declare const asInt: (...args: number[]) => number[];
|
|
|
115
115
|
/**
|
|
116
116
|
* Returns byte size for given {@link Type} ID or {@link GLType} enum.
|
|
117
117
|
*
|
|
118
|
-
* @param type
|
|
118
|
+
* @param type -
|
|
119
119
|
*/
|
|
120
120
|
export declare const sizeOf: (type: GLType | Type) => number;
|
|
121
121
|
/**
|
|
@@ -131,7 +131,7 @@ export declare function typedArray<T extends Type | GLType>(type: T, buf: ArrayB
|
|
|
131
131
|
* Takes an {@link NumericArray} and returns its corresponding {@link Type} ID.
|
|
132
132
|
* Standard JS arrays will default to {@link "f64"}.
|
|
133
133
|
*
|
|
134
|
-
* @param x
|
|
134
|
+
* @param x -
|
|
135
135
|
*/
|
|
136
136
|
export declare const typedArrayType: (x: NumericArray) => Type;
|
|
137
137
|
/**
|
|
@@ -151,13 +151,13 @@ export declare const intTypeForSize: (x: number) => IntType;
|
|
|
151
151
|
/**
|
|
152
152
|
* Returns suitable {@link UintType} for given bit size (`[0,32]` range)
|
|
153
153
|
*
|
|
154
|
-
* @param x
|
|
154
|
+
* @param x -
|
|
155
155
|
*/
|
|
156
156
|
export declare const uintTypeForBits: (x: number) => UintType;
|
|
157
157
|
/**
|
|
158
158
|
* Returns suitable {@link IntType} for given bit size (`[0,32]` range)
|
|
159
159
|
*
|
|
160
|
-
* @param x
|
|
160
|
+
* @param x -
|
|
161
161
|
*/
|
|
162
162
|
export declare const intTypeForBits: (x: number) => IntType;
|
|
163
163
|
//# sourceMappingURL=typedarray.d.ts.map
|
package/typedarray.js
CHANGED
|
@@ -118,7 +118,7 @@ export const asInt = (...args) => args.map((x) => x | 0);
|
|
|
118
118
|
/**
|
|
119
119
|
* Returns byte size for given {@link Type} ID or {@link GLType} enum.
|
|
120
120
|
*
|
|
121
|
-
* @param type
|
|
121
|
+
* @param type -
|
|
122
122
|
*/
|
|
123
123
|
export const sizeOf = (type) => SIZEOF[asNativeType(type)];
|
|
124
124
|
export function typedArray(type, ...xs) {
|
|
@@ -128,7 +128,7 @@ export function typedArray(type, ...xs) {
|
|
|
128
128
|
* Takes an {@link NumericArray} and returns its corresponding {@link Type} ID.
|
|
129
129
|
* Standard JS arrays will default to {@link "f64"}.
|
|
130
130
|
*
|
|
131
|
-
* @param x
|
|
131
|
+
* @param x -
|
|
132
132
|
*/
|
|
133
133
|
export const typedArrayType = (x) => {
|
|
134
134
|
if (Array.isArray(x))
|
|
@@ -156,12 +156,12 @@ export const intTypeForSize = (x) => x >= -0x80 && x < 0x80 ? "i8" : x >= -0x800
|
|
|
156
156
|
/**
|
|
157
157
|
* Returns suitable {@link UintType} for given bit size (`[0,32]` range)
|
|
158
158
|
*
|
|
159
|
-
* @param x
|
|
159
|
+
* @param x -
|
|
160
160
|
*/
|
|
161
161
|
export const uintTypeForBits = (x) => x > 16 ? "u32" : x > 8 ? "u16" : "u8";
|
|
162
162
|
/**
|
|
163
163
|
* Returns suitable {@link IntType} for given bit size (`[0,32]` range)
|
|
164
164
|
*
|
|
165
|
-
* @param x
|
|
165
|
+
* @param x -
|
|
166
166
|
*/
|
|
167
167
|
export const intTypeForBits = (x) => x > 16 ? "i32" : x > 8 ? "i16" : "i8";
|